JPEWdev / shacl2code

Convert SHACL model to code bindings
MIT License
2 stars 4 forks source link

Missing definition for "software_SoftwareArtifact" #26

Closed goneall closed 2 months ago

goneall commented 2 months ago

The schema generated from the current SPDX model is not passing validation with the error:

Could not resolve schema reference '#/$defs/software_SoftwareArtifact'. Path '$defs.Artifact_derived.anyOf[0].anyOf[6]', line 3294, position 25.

Attached is the JSON Schema output: json-schema-3.0.1.json.txt

Below is the input model and context file: spdx-context.jsonld.txt spdx-model.json-ld.txt

goneall commented 2 months ago

Removing the reference to the missing def, I found the additional validation for misisng defs. They all seem to be in the xxx_derived.anyOf.

Examples:


Could not resolve schema reference '#/$defs/Artifact'. Path '$defs.Artifact_derived.anyOf[0].anyOf[6]', line 3294, position 25.

Could not resolve schema reference '#/$defs/IntegrityMethod'. Path '$defs.IntegrityMethod_derived.anyOf[0].anyOf[3]', line 1206, position 25.

Could not resolve schema reference '#/$defs/Artifact'. Path '$defs.Element_derived.anyOf[0].anyOf[4]', line 498, position 25.

Could not resolve schema reference '#/$defs/ElementCollection'. Path '$defs.Element_derived.anyOf[0].anyOf[6]', line 500, position 25.

Could not resolve schema reference '#/$defs/expandedlicensing_ExtendableLicense'. Path '$defs.Element_derived.anyOf[0].anyOf[18]', line 512, position 25.
goneall commented 2 months ago

Pilot error - testing on the wrong version