FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • license-url


    Formats: Severity:

    JSON Path: $.info.license

    A License Object should have a url 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.

    Why did this violation appear?

    There is no url object defined as part of the license object. The license object may also be missing entirely.

    Bad example

    info:
      title: Chicken Nuggets Inc. Developer API
      license:
        name: "MIT"

    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 url definition as part of the A License Object

    Spectral Equivalent

    The rule is equivalent to license-url