specification icon indicating copy to clipboard operation
specification copied to clipboard

test(js): compile CycloneDX 2.0 schema in lint harness

Open Mehrn0ush opened this issue 9 months ago • 0 comments

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

Mehrn0ush avatar Feb 21 '26 15:02 Mehrn0ush