Last updated

info

REQUIRED

Type: object (map)

Field nameTypeDescription
titlestringREQUIRED. The title of the API.
versionstringREQUIRED. The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
descriptionstringRECOMMENDED. A description of the API (Markdown may be used).
summarystringA short summary of the API.
termsOfServicestringA URL to the Terms of Service for the API.
contactContact objectThe contact information for the exposed API.
licenseLicense objectThe license information for the exposed API.
x-logoLogo objectA commonly used specification extension containing the information about the API logo.

Visuals

The following is an example of a minimally recommended OpenAPI info object:

info:
  title: Example
  version: '1.0'
  description: |
    # My API description in Markdown

    This is a sample of an info description.

See how it renders in Redocly OpenAPI documentation.

info-render

version Examples

The version is required. But sometimes an API document doesn't have a sensible version. To hide it from the documentation, change it to an empty string.

info:
  title: Example
  version: ''
  description: |
    # My API description in Markdown

    This is a sample of an info description.

info without version

description Examples

The H1 and H2 tags from the description are pulled into the sidebar navigation. When an H2 appears after an H1 tag, the preceding H1 tag turns into a group in the sidebar navigation. The chevron indicates that a group can be expanded.

info:
  title: Example
  version: ''
  description: |
    # My API description in Markdown

    This is a sample of an info description.

    # Another H1

    This is body paragraph text.

    ## H2 level heading

headings in info description

The following image shows the expansion of the group.

headings in info description with group expansion

summary Examples

The following example contains a summary.

info:
  title: Example
  version: ''
  description: |
    # My API description in Markdown

    This is a sample of an info description.
  summary: This is a sample summary

The summary renders before the description.

info summary

termsOfService example

The following example defines a termsOfService URL.

info:
  title: Example
  version: ''
  description: |
    # My API description in Markdown

    This is a sample of an info description.
  termsOfService: https://redoc.ly/subscription-agreement/

info termsOfService

Example with everything

info:
  title: Example
  version: ''
  description: |
    # My API description in Markdown

    This is a sample of an info description.
  summary: This is a summary
  termsOfService: https://redoc.ly/subscription-agreement/
  contact:
    name: API team
    email: team@redocly.com
    url: https://redocly.com/contact-us/
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT

info everything

Types

  • Info
const Info: NodeType = {
  properties: {
    title: { type: 'string' },
    version: { type: 'string' },
    description: { type: 'string' },
    termsOfService: { type: 'string' },
    contact: 'Contact',
    license: 'License',
  },
  required: ['title', 'version'],
};