info-license
JSON Path: $.info
The Info Object should have a license
defined.
What is a license for?
It helps consumers of the API understand how it can be used when consumed for commercial purposes. To help choose a license, Choose A License can help.
A License Object has three properties.
- name
- url
- identifier
Why did this violation appear?
There is no license
object defined as part of the info
object. The info
object may also be missing entirely.
Bad example
info:
title: Chicken Nuggets Inc. Developer API
Good example
info:
title: Chicken Nuggets Inc. Developer API
license:
name: "MIT"
url: https://opensource.org/licenses/MIT
How do I fix this violation?
Ensure there is a license
definition as part of the Info Object
Spectral Equivalent
The rule is equivalent to info-license