Open mrutkows opened 6 months ago
Hi, I would like to contribute to this issue. Just to confirm that we need to move to using pointer to struct in all the places in cyclonedx_formulation.go, right?
And in cyclonedx_modelcard.go there is only 1 place where pointer to struct is not used, otherwise all the places uses pointer, should I change CDXComponentData
to *CDXComponentData
?
type CDXDataset struct {
CDXComponentData
Ref *CDXRefLinkType `json:"ref,omitempty" cdx:"+1.5"` // v1.5
}
@mohitsethia Hi! Sorry that it took me so long to respond, but July was a very busy month inside my company with a shift in my job role to support AI GPU software stack which has a steep learning curve as well as being on vacation. Would very much like to replace all structure (bindings) to use pointers as the utility now supports "write" (output) for some new commands. I tried very hard to do so for the latest release, but you found a struct member I missed under the model card structs):
Please do submit a PR with the fix (and believe it should pass existing functional tests as we do not have any specific to testing "update"/change of that field)
The CycloneDX schema file:
/Users/Matt_1/Projects/CycloneDX/sbom-utility/schema/cyclonedx_formulation.go
defines all the structures used for "formulation" which was added in v1.5; however, these structs should be updated to use pointers to structs in all cases to improve performance during JSON Marshal (decoding).
The same should be done for the added ModelCard data (as part of the Component type):
/Users/Matt_1/Projects/CycloneDX/sbom-utility/schema/cyclonedx_modelcard.go