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

Split specs module for XML and JSON #697

Open
pvdrz opened this issue May 9, 2024 · 0 comments
Open

Split specs module for XML and JSON #697

pvdrz opened this issue May 9, 2024 · 0 comments

Comments

@pvdrz
Copy link
Contributor

pvdrz commented May 9, 2024

While implementing the formula type for the XML and JSON schemas. I noticed that the two specs don't actually agree on the structure of some fields: This is the XML schema for dependencies and this is the JSON one. In the former, dependencies are a tree, and the latter, they are a list of unique items.

I'm not sure how those two could be reconciled in the models module. But right now cyclonedx-bom rejects a valid XML bom if it has a tree of dependencies instead of a proper list. I think the best path here would be to keep separated specs modules. One for JSON and another for XML. This could open the door to generating the JSON and XML types for the specs automatically using crates like typify and the like.

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

No branches or pull requests

1 participant