tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

The LicenseRef prefix should not be required for standard licenses

Open Zhuochengyu opened this issue 1 year ago • 1 comments

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 "-". 

Zhuochengyu avatar Apr 24 '24 22:04 Zhuochengyu

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?

armintaenzertng avatar Jul 26 '24 08:07 armintaenzertng