The configuration file controls configuration options of the CLI tool. It may be passed as metadata to the API registry which can then subsequently be used to build the docs.
The CLI tool will search the current working directory for a configuration file named
The configuration file is expected to be in YAML format.
The contents of the YAML are according to the following structure:
apiDefinitions: # a set of named keys and values of entrypoints to OpenAPI 3 definitions. # example petstore: ./openapi/openapi.yaml caretaker: ./openapi/caretaker.yaml lint: # the lint options referenceDocs: # the API reference docs options, including theme options. registry: # the API registry options # future products may be configured by extending this file
apiDefinitions section's purpose is to define one or more entrypoints to your OpenAPI 3 definitions.
Redocly supports both multi-file definitions and multiple (multi-file) definitions.
This section is optional.
The validation command uses the
apiDefinitions for providing shortcuts to referencing the definition.
Based on the example
.redocly.yaml file above, here is an example usage:
openapi-cli lint petstore caretaker
In addition, it allows for running the command which will apply to all APIs defined:
lint section's primary purpose is to define options for the
You may also import plugins and extends their configurations.
Read more about the lint configuration section.
referenceDocs section configures features (availability and options) and theming (style, fonts, colors).
There are two products: Redoc Community Edition (CE), and Redocly API reference docs. Reference docs has additional features and theme options.
Read more about the
registry section is reserved for future API registry features.
Read more about the
Array of objects non-empty
A map of aliases and the source of the API definitions. Especially useful for managing multiple API definitions.
A set of configurations to lint and decorate your APIs used when the
These configurations are used when previewing or building the docs.