Repository navigation
Closed
Milestone
Description
I just tried a new JSON schema validator, AJV, and this tool found some issues in current schema 1.4, that should be fixed in 1.5
Need to dig into the details. here are quick findings.
strict mode: missing type "object" for keyword "additionalProperties" at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items" (strictTypes)
strict mode: missing type "object" for keyword "properties" at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items" (strictTypes)
strict mode: missing type "object" for keyword "required" at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items/oneOf/0" (strictTypes)
strict mode: required property "version" is not defined at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items/oneOf/0" (strictRequired)
strict mode: missing type "object" for keyword "required" at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items/oneOf/1" (strictTypes)
strict mode: required property "range" is not defined at "http://cyclonedx.org/schema/bom-1.4.schema.json#/properties/affects/items/properties/versions/items/oneOf/1" (strictRequired)
strict mode: "additionalItems" is ignored when "items" is not an array of schemas
!! another thing:
- remove the
bom.versionfrom the required properties in JSON spec.
Having it required just makes no sense, as the property has a default value.
a default value is to be used when the element was missing – why would it be required, if it was allowed to be missing in the beginning??? see adjust/fix default values #216
Reacted by Paul Horton
Metadata
Metadata
Assignees
Labels
No labels
Activity
jkowalleck commentedon Apr 7, 2023
will research the reasons and try to fix them in current 1.5 draft.
I might also add another schema validator to the CI.
stevespringett commentedon Apr 7, 2023
Perhaps wait until more things are merged into the 1.5 branch so we can do them all at once?
jkowalleck commentedon May 29, 2023
fixed by #230