Skip to content

Commit 72e4629

Browse files
authored
Merge pull request #243 from madpah/fix/component-data-schema
2 parents a39bf6b + 6636ce3 commit 72e4629

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

cyclonedx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ type Component struct {
252252
Evidence *Evidence `json:"evidence,omitempty" xml:"evidence,omitempty"`
253253
ReleaseNotes *ReleaseNotes `json:"releaseNotes,omitempty" xml:"releaseNotes,omitempty"`
254254
ModelCard *MLModelCard `json:"modelCard,omitempty" xml:"modelCard,omitempty"`
255-
Data *ComponentData `json:"data,omitempty" xml:"data,omitempty"`
255+
Data *[]ComponentData `json:"data,omitempty" xml:"data,omitempty"`
256256
CryptoProperties *CryptoProperties `json:"cryptoProperties,omitempty" xml:"cryptoProperties,omitempty"`
257257
Tags *[]string `json:"tags,omitempty" xml:"tags>tag,omitempty"`
258258
Signature *JSFSignature `json:"signature,omitempty" xml:"-"`

testdata/snapshots/cyclonedx-go-TestRoundTripJSON-func1-valid-bom.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
"tagId": "swidgen-242eb18a-503e-ca37-393b-cf156ef09691_9.1.1",
6565
"name": "Acme Application",
6666
"version": "9.1.1"
67-
}
67+
},
68+
"data": []
6869
},
6970
"manufacture": {
7071
"name": "Acme, Inc.",

testdata/valid-bom.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"author": "Acme Super Heros",
5656
"name": "Acme Application",
5757
"version": "9.1.1",
58+
"data": [],
5859
"swid": {
5960
"tagId": "swidgen-242eb18a-503e-ca37-393b-cf156ef09691_9.1.1",
6061
"name": "Acme Application",

0 commit comments

Comments
 (0)