spdx-spec
spdx-spec copied to clipboard
JSON schema uses licenseInfoInSnippets (plural) instead of licenseInfoInSnippet
I assume this is a typo: In the json schema, the property name is in plural, whereas it's singular in the spec (rdf and tagValue examples).
The singular version makes more sense, imho, since it describes the license info contained in a single snippet.
I'm happy to put up a small PR to fix this if everyone agrees it should be fixed (there may be "breaking change" considerations involved...)
@nicoweidner The schema is actually generated from the OWL Ontology using the Schema converter utility.
The utility converts any property with a cardinality allowing more than 1 to plural.
In this particular case, it should be licenseInfosInSnippet
rather than licenseInfoInSnippets
- however, the utility isn't smart enough to do that type of conversion.
One fix would be to special case the licenseInfoInSnippet
property in the generator code. A bit hacky, but probably an OK approach.
In terms of a breaking change, it would break existing JSON files - so I'm a bit reluctant to make the change even though the change does make sense.
@goneall Thanks for the explanation (and I agree the correct plural version is hard for a tool to determine). I agree it's probably not worth it to break existing files for this change. 3.0 can fix it...
Setting a 3.0 Milestone and opening a parallel issue for the schema generator utility: https://github.com/spdx/tools-java/issues/92
For 3.0, we might not have licenseInfoInSnippet
, as licensing information may be abstracted to artefacts in general (files, packages, snippets etc.). However, the method of representing licensing information in 3.0 is still the subject of active discussion within the Legal and Tech teams.
In 3.0 we decided to only use the singular form (even if the cardinality is more than one).
Closing this issue.