info-license-spdx
JSON Path: $.info.license
The License Object should have a url
or an identifier
defined.
But not both
Why exactly?
The specification states:
An SPDX license expression for the API. The identifier field is mutually exclusive of the url field.
A License Object has three properties.
- name
- url
- identifier
Why did this violation appear?
There is both a url
and identifier
set on the license
object defined as part of the info
object.
Bad example
info:
title: Chicken Nuggets Inc. Developer API
license:
name: "MIT License"
url: https://opensource.org/licenses/MIT
identifier: MIT
Good example
info:
title: Chicken Nuggets Inc. Developer API
license:
name: "MIT"
url: https://opensource.org/licenses/MIT
Another good example
info:
title: Chicken Nuggets Inc. Developer API
license:
name: "MIT License"
identifier: MIT
How do I fix this violation?
Ensure there is a license
definition as part of the Info Object