Redocly supports custom plugins for extending lint and decorator behavior. Use plugins when you need to add rules beyond the built-in and configurable, or decorators beyond the built-in decorators.
The plugins
configuration is an array of paths to plugin files, relative to the config file. You can include as many plugins as you need.
A basic example of including two plugins from a directory named plugins/
is shown in the example below:
plugins:
- plugins/my-best-plugin.js
- plugins/another-plugin.js
Remember that you need to include plugins in the plugins
section before you can use the content of the plugin elsewhere in the configuration file.
- APIs configuration - Set per-API configuration options in redocly.yaml for customized plugin behavior across different API specifications
- Rules configuration - Define linting rules that work with plugins for comprehensive API validation and quality enforcement
- Decorators - Apply transformations to your OpenAPI documents for enhanced functionality when used with plugins
- Redocly CLI cookbook - Find many practical examples of plugins and their implementation in real-world scenarios
- Configuration options - Explore other project configuration options for comprehensive documentation and platform customization