specification
specification copied to clipboard
test(js): compile CycloneDX 2.0 schema in lint harness
What
Extend the JS schema compile test (tools/src/test/js/json-schema-lint-tests.js) to include CycloneDX 2.0 by compiling:
schema/2.0/cyclonedx-2.0-bundled.schema.json(draft 2020-12) using Ajv 2020.
Also hardens the 1.x version parsing / strict-mode selection by using numeric parsing (supports multi-digit minors).
Why
npm run test:json-schema-lint previously only compiled schema/bom-*.schema.json (1.x), so it provided no coverage that 2.0 schemas are compilable.
Testing
cd tools/src/test/js && npm install && npm run test:json-schema-lint
Closes #837