-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
fixed JSON schema id #84
Closed
jkowalleck
wants to merge
2
commits into
CycloneDX:master
from
jkowalleck:bugfix/83_duplicate_ids_in_JSON
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
|
@@ -18,7 +18,6 @@ | |
] | ||
}, | ||
"bomFormat": { | ||
"$id": "#/properties/bomFormat", | ||
"type": "string", | ||
"title": "BOM Format", | ||
"description": "Specifies the format of the BOM. This helps to identify the file as CycloneDX since BOMs do not have a filename convention nor does JSON schema support namespaces.", | ||
|
@@ -27,65 +26,56 @@ | |
] | ||
}, | ||
"specVersion": { | ||
"$id": "#/properties/specVersion", | ||
"type": "string", | ||
"title": "CycloneDX Specification Version", | ||
"description": "The version of the CycloneDX specification a BOM is written to (starting at version 1.2)", | ||
"examples": ["1.3"] | ||
}, | ||
"serialNumber": { | ||
"$id": "#/properties/serialNumber", | ||
"type": "string", | ||
"title": "BOM Serial Number", | ||
"description": "Every BOM generated should have a unique serial number, even if the contents of the BOM being generated have not changed over time. The process or tool responsible for creating the BOM should create random UUID's for every BOM generated.", | ||
"examples": ["urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"], | ||
"pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" | ||
}, | ||
"version": { | ||
"$id": "#/properties/version", | ||
"type": "integer", | ||
"title": "BOM Version", | ||
"description": "The version allows component publishers/authors to make changes to existing BOMs to update various aspects of the document such as description or licenses. When a system is presented with multiple BOMs for the same component, the system should use the most recent version of the BOM. The default version is '1' and should be incremented for each version of the BOM that is published. Each version of a component should have a unique BOM and if no changes are made to the BOMs, then each BOM will have a version of '1'.", | ||
"default": 1, | ||
"examples": [1] | ||
}, | ||
"metadata": { | ||
"$id": "#/properties/metadata", | ||
"$ref": "#/definitions/metadata", | ||
"title": "BOM Metadata", | ||
"description": "Provides additional information about a BOM." | ||
}, | ||
"components": { | ||
"$id": "#/properties/components", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/component"}, | ||
"uniqueItems": true, | ||
"title": "Components" | ||
}, | ||
"services": { | ||
"$id": "#/properties/services", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/service"}, | ||
"uniqueItems": true, | ||
"title": "Services" | ||
}, | ||
"externalReferences": { | ||
"$id": "#/properties/externalReferences", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/externalReference"}, | ||
"title": "External References", | ||
"description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." | ||
}, | ||
"dependencies": { | ||
"$id": "#/properties/dependencies", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/dependency"}, | ||
"uniqueItems": true, | ||
"title": "Dependencies", | ||
"description": "Provides the ability to document dependency relationships." | ||
}, | ||
"compositions": { | ||
"$id": "#/properties/compositions", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/compositions"}, | ||
"uniqueItems": true, | ||
|
@@ -408,7 +398,6 @@ | |
"title": "External References" | ||
}, | ||
"components": { | ||
"$id": "#/properties/components", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/component"}, | ||
"uniqueItems": true, | ||
|
@@ -834,7 +823,6 @@ | |
] | ||
}, | ||
"hashes": { | ||
"$id": "#/properties/hashes", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was a duplicate. |
||
"type": "array", | ||
"items": {"$ref": "#/definitions/hash"}, | ||
"title": "Hashes", | ||
|
@@ -945,7 +933,6 @@ | |
"title": "External References" | ||
}, | ||
"services": { | ||
"$id": "#/properties/services", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/service"}, | ||
"uniqueItems": true, | ||
|
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 |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
], | ||
"properties": { | ||
"bomFormat": { | ||
"$id": "#/properties/bomFormat", | ||
"type": "string", | ||
"title": "BOM Format", | ||
"description": "Specifies the format of the BOM. This helps to identify the file as CycloneDX since BOMs do not have a filename convention nor does JSON schema support namespaces.", | ||
|
@@ -20,65 +19,56 @@ | |
] | ||
}, | ||
"specVersion": { | ||
"$id": "#/properties/specVersion", | ||
"type": "string", | ||
"title": "CycloneDX Specification Version", | ||
"description": "The version of the CycloneDX specification a BOM is written to (starting at version 1.2)", | ||
"examples": ["1.3"] | ||
}, | ||
"serialNumber": { | ||
"$id": "#/properties/serialNumber", | ||
"type": "string", | ||
"title": "BOM Serial Number", | ||
"description": "Every BOM generated should have a unique serial number, even if the contents of the BOM being generated have not changed over time. The process or tool responsible for creating the BOM should create random UUID's for every BOM generated.", | ||
"examples": ["urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"], | ||
"pattern": "^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" | ||
}, | ||
"version": { | ||
"$id": "#/properties/version", | ||
"type": "integer", | ||
"title": "BOM Version", | ||
"description": "The version allows component publishers/authors to make changes to existing BOMs to update various aspects of the document such as description or licenses. When a system is presented with multiple BOMs for the same component, the system should use the most recent version of the BOM. The default version is '1' and should be incremented for each version of the BOM that is published. Each version of a component should have a unique BOM and if no changes are made to the BOMs, then each BOM will have a version of '1'.", | ||
"default": 1, | ||
"examples": [1] | ||
}, | ||
"metadata": { | ||
"$id": "#/properties/metadata", | ||
"$ref": "#/definitions/metadata", | ||
"title": "BOM Metadata", | ||
"description": "Provides additional information about a BOM." | ||
}, | ||
"components": { | ||
"$id": "#/properties/components", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/component"}, | ||
"uniqueItems": true, | ||
"title": "Components" | ||
}, | ||
"services": { | ||
"$id": "#/properties/services", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/service"}, | ||
"uniqueItems": true, | ||
"title": "Services" | ||
}, | ||
"externalReferences": { | ||
"$id": "#/properties/externalReferences", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/externalReference"}, | ||
"title": "External References", | ||
"description": "External references provide a way to document systems, sites, and information that may be relevant but which are not included with the BOM." | ||
}, | ||
"dependencies": { | ||
"$id": "#/properties/dependencies", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/dependency"}, | ||
"uniqueItems": true, | ||
"title": "Dependencies", | ||
"description": "Provides the ability to document dependency relationships." | ||
}, | ||
"compositions": { | ||
"$id": "#/properties/compositions", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/compositions"}, | ||
"uniqueItems": true, | ||
|
@@ -395,7 +385,6 @@ | |
"title": "External References" | ||
}, | ||
"components": { | ||
"$id": "#/properties/components", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/component"}, | ||
"uniqueItems": true, | ||
|
@@ -809,7 +798,6 @@ | |
] | ||
}, | ||
"hashes": { | ||
"$id": "#/properties/hashes", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was a duplicate |
||
"type": "array", | ||
"items": {"$ref": "#/definitions/hash"}, | ||
"title": "Hashes", | ||
|
@@ -918,7 +906,6 @@ | |
"title": "External References" | ||
}, | ||
"services": { | ||
"$id": "#/properties/services", | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/service"}, | ||
"uniqueItems": true, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$id
is the same value the JSON pointer has. so the$id
is shadowing the exact same element and can therefore be removed.