Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve JSON validation #317

Merged
merged 4 commits into from
Aug 11, 2024

Conversation

andreas-hilti
Copy link
Contributor

Improve JSON validation, in particular if you don't specify the specification version.

This helps to address #221.

On the given example, it will result in:

cyclonedx.exe validate --input-file badType_log4j_2.17.2_cyclonedx_1.3_sbom.json
Validation failed: Value is "boolean" but should be "string"
#/properties/dependencies/items/$ref/properties/ref/type
On instance: #/dependencies/0/ref:
True
Unable to validate against any JSON schemas.
BOM is not valid.

Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
@andreas-hilti
Copy link
Contributor Author

There are a couple of merge tests that fail due to the update of CycloneDX.Utils; however, they are unrelated to the changes in the validation.

Signed-off-by: andreas hilti <andreas.hilti@bluewin.ch>
@mtsfoni mtsfoni added this to the next-version milestone May 22, 2024
@mtsfoni mtsfoni merged commit 4f578ad into CycloneDX:main Aug 11, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants