Linter rulesOpenAPIlicense-defined
license-defined
Since 0.0.1
This rule checks whether the licensing information is present in an OpenAPI schema.
Rule Details
The license-defined rule is designed to ensure that the licensing information
is defined in an OpenAPI schema. This information is crucial as it specifies
the terms under which the API can be used.
The rationale behind this rule is to enforce the inclusion of licensing information in the API specification. This helps users of the API to understand the terms of use and any restrictions that may apply.
Configuration
None.
Examples
This rule should be used whenever an OpenAPI schema is being defined.
Good. The following schema provides a link to its license, thus making it easier to understand how it can be used.
info:
license:
name: Apache 2.0
url: https://your-company.com/api/LICENSE
Bad. The following API does not specify the licensing terms, thus forcing potential users to spend time on searching for it elsewhere.
When Not to Use It
You may skip licensing information for team-level APIs.
Compatibility
This rule is compatible with all OpenAPI 3.x version.