spdx-spec icon indicating copy to clipboard operation
spdx-spec copied to clipboard

JSON schema uses licenseInfoInSnippets (plural) instead of licenseInfoInSnippet

Open nicoweidner opened this issue 2 years ago • 4 comments

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 avatar Oct 31 '22 09:10 nicoweidner

@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 avatar Oct 31 '22 17:10 goneall

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

nicoweidner avatar Nov 02 '22 08:11 nicoweidner

Setting a 3.0 Milestone and opening a parallel issue for the schema generator utility: https://github.com/spdx/tools-java/issues/92

goneall avatar Nov 02 '22 17:11 goneall

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.

seabass-labrax avatar Feb 07 '23 00:02 seabass-labrax

In 3.0 we decided to only use the singular form (even if the cardinality is more than one).

Closing this issue.

goneall avatar Apr 04 '24 16:04 goneall