-
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fixes #371 - [x] fixed JSON - [x] added examples and tests
- Loading branch information
Showing
7 changed files
with
221 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"bomFormat": "CycloneDX", | ||
"specVersion": "1.6", | ||
"serialNumber": "urn:uuid:bcb403ae-91fa-436e-bc93-84d1078cdeed", | ||
"version": 1, | ||
"metadata": { | ||
"properties": [ | ||
{ | ||
"value": "missing a name" | ||
}, | ||
{ | ||
"unexpected-property": "foo" | ||
}, | ||
{} | ||
] | ||
}, | ||
"components": [ | ||
{ | ||
"type": "library", | ||
"name": "acme-library", | ||
"version": "1.0.0", | ||
"licenses": [ | ||
{ | ||
"license": { | ||
"id": "Apache-2.0", | ||
"properties": [ | ||
{ | ||
"value": "missing a name" | ||
}, | ||
{ | ||
"unexpected-property": "foo" | ||
}, | ||
{} | ||
] | ||
} | ||
} | ||
], | ||
"properties": [ | ||
{ | ||
"value": "missing a name" | ||
}, | ||
{ | ||
"unexpected-property": "foo" | ||
}, | ||
{} | ||
] | ||
} | ||
], | ||
"services": [ | ||
{ | ||
"bom-ref": "b2a46a4b-8367-4bae-9820-95557cfe03a8", | ||
"group": "org.partner", | ||
"name": "Stock ticker service", | ||
"endpoints": [ | ||
"https://partner.org/api/v1/stock" | ||
], | ||
"properties": [ | ||
{ | ||
"value": "missing a name" | ||
}, | ||
{ | ||
"unexpected-property": "foo" | ||
}, | ||
{} | ||
] | ||
} | ||
] | ||
} |
45 changes: 45 additions & 0 deletions
45
tools/src/test/resources/1.6/invalid-properties-1.6.textproto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
spec_version: "1.6" | ||
version: 1 | ||
serial_number: "urn:uuid:bcb403ae-91fa-436e-bc93-84d1078cdeed" | ||
metadata { | ||
properties { | ||
value: "missing a name" | ||
} | ||
properties { | ||
# no name and no value | ||
} | ||
} | ||
components { | ||
type: CLASSIFICATION_LIBRARY | ||
name: "acme-library" | ||
version: "1.0.0" | ||
licenses { | ||
license { | ||
id: "Apache-2.0" | ||
properties { | ||
value: "missing a name" | ||
} | ||
properties { | ||
# no name and no value | ||
} | ||
} | ||
} | ||
properties { | ||
value: "missing a name" | ||
} | ||
properties { | ||
# no name and no value | ||
} | ||
} | ||
services { | ||
bom_ref: "b2a46a4b-8367-4bae-9820-95557cfe03a8" | ||
group: "org.partner" | ||
name: "Stock ticker service" | ||
endpoints: "https://partner.org/api/v1/stock" | ||
properties { | ||
value: "missing a name" | ||
} | ||
properties { | ||
# no name and no value | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0"?> | ||
<bom serialNumber="urn:uuid:bcb403ae-91fa-436e-bc93-84d1078cdeed" version="1" xmlns="http://cyclonedx.org/schema/bom/1.6"> | ||
<metadata> | ||
<properties> | ||
<property>missing a name</property> | ||
<property><!-- no name and no value --></property> | ||
</properties> | ||
</metadata> | ||
<components> | ||
<component type="library"> | ||
<name>acme-library</name> | ||
<version>1.0.0</version> | ||
<licenses> | ||
<license> | ||
<id>Apache-2.0</id> | ||
<properties> | ||
<property>missing a name</property> | ||
<property><!-- no name and no value --></property> | ||
</properties> | ||
</license> | ||
</licenses> | ||
<properties> | ||
<property>missing a name</property> | ||
<property><!-- no name and no value --></property> | ||
</properties> | ||
</component> | ||
</components> | ||
<services> | ||
<service bom-ref="b2a46a4b-8367-4bae-9820-95557cfe03a8"> | ||
<group>org.partner</group> | ||
<name>Stock ticker service</name> | ||
<endpoints> | ||
<endpoint>https://partner.org/api/v1/stock</endpoint> | ||
</endpoints> | ||
<properties> | ||
<property>missing a name</property> | ||
<property><!-- no name and no value --></property> | ||
</properties> | ||
</service> | ||
</services> | ||
</bom> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters