Last updated

Configure Redocly

The redocly.yaml file is the single place to configure everything Redocly.

Here's one way we could organize the list into groups with short name separators:

API management

User interface

Content management

Security and access management

Customization

Analytics and SEO

Developer experience

Example

logo:
  srcSet: './images/redocly-logo.svg light, ./images/redocly-logo-inverted.svg dark'
  altText: Redocly logo
  link: '/'
navbar:
  items:
    - page: index.md
      label: Home
    - page: config/index.md
      label: Config
feedback:
  type: sentiment
  settings:
    comment:
      likeLabel: What was most helpful?
      dislikeLabel: What can we improve?

apis:
  redocly-museum:
    root: './openapi-files/redocly-museum.yaml'

extends:
  - recommended

rules:
  info-license: error
  no-ambiguous-paths: error
  no-http-verbs-in-paths:
    severity: error
    splitIntoWords: true
  rule/operationId-casing:
    subject:
      type: Operation
      property: operationId
    assertions:
      casing: camelCase
  rule/no-description-start-with-the-a-an:
    subject:
      type: any
      property: description
    assertions:
      notPattern: /^(The\s|A\s|An\s)/

rbac:
  defaults:
    anonymous: none

redirects:
  '/concepts/categories/':
    to: 'author/concepts/categories/'
  '/concepts/navigation/':
    to: 'author/concepts/navigation/'

Configuration principles

Redocly has a few important configuration philosophies:

  • universal config (all configuration in one place)
  • zero config (you don't need to do any configuration because we have sane defaults)
  • config-as-code (all configuration should be writable in a simple source-control friendly format)

Some options have multiple levels of nesting. Pay attention to the indentation and nesting when modifying the file.