Skip to content

License Schema Inconsistency between XML/JSON  #133

@TiberiusDRAIG

Description

@TiberiusDRAIG

The XML schema does not require an ID for the license property, whereas the JSON schema not only requires it but also enforces that it be one of the SPDX values specified.

This causes problems when a package does not provide an SPDX ID; for example, Microsoft's System.IO package, which only provides a URL, results in the cyclonedx-dotnet tool generating this:

<license> <url>http://go.microsoft.com/fwlink/?LinkId=329770</url> </license>

This validates successfully against the XML schema.

The equivalent JSON:

"license": { "url": "http://go.microsoft.com/fwlink/?LinkId=329770" }

...is considered invalid as it has no ID.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions