Skip to content

Latest commit

 

History

History
78 lines (53 loc) · 1.82 KB

info-license-url.md

File metadata and controls

78 lines (53 loc) · 1.82 KB
slug
/docs/cli/rules/oas/info-license-url

info-license-url

Requires the license URL in your API descriptions.

OAS Compatibility
2.0
3.0
3.1
flowchart TD

root ==> Info --> License --> url

style url fill:#codaf9,stroke:#0044d4,stroke-width:5px
Loading

API design principles

The principle of providing your users with accurate and relevant information does not apply to API design only, but to any product-related communication in general.

Before they can work with your API, your users must understand the terms and conditions of your API usage.

By being upfront with the API license, you can reduce friction and encourage API adoption.

Configuration

Option Type Description
severity string Possible values: off, warn, error. Default warn (in recommended configuration).

An example configuration:

rules:
  info-license-url: error

Examples

Given the following configuration:

rules:
  info-license-url: error

Example of an incorrect license URL:

info:
  license:
    name: MIT

Example of a correct license URL:

info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html

Related rules

Resources