Skip to content
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
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions schema/bom-1.2-strict.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -27,14 +26,12 @@
]
},
"specVersion": {
"$id": "#/properties/specVersion",
Copy link
Member Author

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.

"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.2"]
},
"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.",
Expand All @@ -43,42 +40,36 @@
"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,
Expand Down Expand Up @@ -446,7 +437,6 @@
"title": "External References"
},
"components": {
"$id": "#/properties/components",
"type": "array",
"items": {"$ref": "#/definitions/component"},
"uniqueItems": true,
Expand Down Expand Up @@ -985,7 +975,6 @@
"title": "External References"
},
"services": {
"$id": "#/properties/services",
"type": "array",
"items": {"$ref": "#/definitions/service"},
"uniqueItems": true,
Expand Down
11 changes: 0 additions & 11 deletions schema/bom-1.2.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -20,14 +19,12 @@
]
},
"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.2"]
},
"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.",
Expand All @@ -36,42 +33,36 @@
"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,
Expand Down Expand Up @@ -432,7 +423,6 @@
"title": "External References"
},
"components": {
"$id": "#/properties/components",
"type": "array",
"items": {"$ref": "#/definitions/component"},
"uniqueItems": true,
Expand Down Expand Up @@ -957,7 +947,6 @@
"title": "External References"
},
"services": {
"$id": "#/properties/services",
"type": "array",
"items": {"$ref": "#/definitions/service"},
"uniqueItems": true,
Expand Down
13 changes: 0 additions & 13 deletions schema/bom-1.3-strict.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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,
Expand Down Expand Up @@ -408,7 +398,6 @@
"title": "External References"
},
"components": {
"$id": "#/properties/components",
"type": "array",
"items": {"$ref": "#/definitions/component"},
"uniqueItems": true,
Expand Down Expand Up @@ -834,7 +823,6 @@
]
},
"hashes": {
"$id": "#/properties/hashes",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was a duplicate.

"type": "array",
"items": {"$ref": "#/definitions/hash"},
"title": "Hashes",
Expand Down Expand Up @@ -945,7 +933,6 @@
"title": "External References"
},
"services": {
"$id": "#/properties/services",
"type": "array",
"items": {"$ref": "#/definitions/service"},
"uniqueItems": true,
Expand Down
13 changes: 0 additions & 13 deletions schema/bom-1.3.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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,
Expand Down Expand Up @@ -395,7 +385,6 @@
"title": "External References"
},
"components": {
"$id": "#/properties/components",
"type": "array",
"items": {"$ref": "#/definitions/component"},
"uniqueItems": true,
Expand Down Expand Up @@ -809,7 +798,6 @@
]
},
"hashes": {
"$id": "#/properties/hashes",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was a duplicate

"type": "array",
"items": {"$ref": "#/definitions/hash"},
"title": "Hashes",
Expand Down Expand Up @@ -918,7 +906,6 @@
"title": "External References"
},
"services": {
"$id": "#/properties/services",
"type": "array",
"items": {"$ref": "#/definitions/service"},
"uniqueItems": true,
Expand Down