tools-python
tools-python copied to clipboard
The LicenseRef prefix should not be required for standard licenses
I noticed this error when validating my SPDX JSON file:
license_id must only contain letters, numbers, "." and "-" and must begin with "LicenseRef-", but is: Apache-1.1
Apache-1.1 is on the standard license list according to https://spdx.org/licenses/Apache-1.1.html. The LicenseRef prefix shouldn't be required for this license.
Spec (https://spdx.org/rdf/spdx-terms-v2.3):
The license ID is either on the standard license list or the form "LicenseRef-[idString]" where [idString] is a unique string containing letters, numbers, "." or "-".
Hi @Zhuochengyu, thanks for using the spdx-tools!
Unfortunately, I am unable to reproduce your issue. When using for example "licenseDeclared" : "Apache-1.1" in a JSON SPDX file, the file validates just fine.
Can you provide a file that triggers the error you describe?