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

chore: deprecate shorthand properties #841

Merged
Changes from 1 commit
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
12 changes: 8 additions & 4 deletions schemas/spdx-schema.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema" : "http://json-schema.org/draft-07/schema#",
"$schema" : "https://json-schema.org/draft/2019-09/schema#",
"$id" : "http://spdx.org/rdf/terms/2.3",
"title" : "SPDX 2.3",
"type" : "object",
Expand Down Expand Up @@ -217,7 +217,9 @@
"description" : "The URI provides an unambiguous mechanism for other SPDX documents to reference SPDX elements within this SPDX document."
},
"documentDescribes" : {
"description" : "Packages, files and/or Snippets described by this SPDX document",
"description" : "DEPRECATED: use relationships instead of this field. Packages, files and/or Snippets described by this SPDX document",
"deprecated": true,
"$comment": "This field has been deprecated as it is a duplicate of using the SPDXRef-DOCUMENT DESCRIBES relationship",
"type" : "array",
"items" : {
"type" : "string",
Expand Down Expand Up @@ -343,7 +345,9 @@
"type" : "boolean"
},
"hasFiles" : {
"description" : "Indicates that a particular file belongs to a package.",
"description" : "DEPRECATED: use relationships instead of this field. Indicates that a particular file belongs to a package.",
"deprecated": true,
"$comment": "This field has been deprecated as it is a duplicate of using SPDXRef-<package-id> CONTAINS SPDXRef-<file-id> relationships",
Copy link

Choose a reason for hiding this comment

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

nit: for consistency, maybe just SPDXRef-PACKAGE CONTAINS?

Copy link
Author

Choose a reason for hiding this comment

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

If you're referring to the SPDXRef-DOCUMENT for the other deprecation text, I don't think there is a consistency problem because that is the actual value, whereas the SPDXRef-<package-id> needs to match the containing package, but I'm happy to change this if people feel strongly. I'll see if I can find a better way to identify this.

Copy link
Author

Choose a reason for hiding this comment

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

I did update the text here a bit, hopefully it's clear enough.

"type" : "array",
"items" : {
"description" : "SPDX ID for File. Indicates that a particular file belongs to a package.",
Expand Down Expand Up @@ -737,4 +741,4 @@
},
"required" : [ "SPDXID", "creationInfo", "dataLicense", "name", "spdxVersion", "documentNamespace" ],
"additionalProperties" : false
}
}