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

JSON and XML schemas differ for licenses #204

Closed
madpah opened this issue Apr 3, 2023 · 2 comments · Fixed by #205
Closed

JSON and XML schemas differ for licenses #204

madpah opened this issue Apr 3, 2023 · 2 comments · Fixed by #205

Comments

@madpah
Copy link

madpah commented Apr 3, 2023

As noted in CycloneDX/cyclonedx-python-lib#365, there is a discrepancy between JSON and XML schemas for CycloneDX v1.4 with how licenses are defined.

JSON
licenses is an Array of either expression or license - i.e. 0 or more expression or 0 or more license see here

XML
licenses is an complex type defined as either 0 or more license OR 0 or 1 expression see here

@jkowalleck
Copy link
Member

jkowalleck commented Apr 3, 2023

@pombredanne taught me, that a license list's order is important, and that a license list is not a "any of these" choice but has other juridical implications.
So I understood, that a SPDX license expression is superior, as it knows "AND"/"OR" logic and exclusions.

This gave me the impression, that there should be EITHER an expression OR a list of licenses.
So I see the XML as the definition of my desire. SO I'd propose to "fix" the JSON.

To "fix" the JSON, we would define licenses as a choice of

  • Array of 0 to n license items
  • Array of exactly one expression element`

i'll draft a change request soon, to showcase the solution, so we could discuss the implications.

PS: proposed fix: #205

@jkowalleck
Copy link
Member

i will close this issue, as it will be fixed in upcoming v1.5 -- see #205

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants