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.
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 nowcyclonedx-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 separatedspecs
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.