FAQ

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


    Formats: Severity:

    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 two properties.

    • name
    • url

    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