mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-08 04:21:15 +00:00
* docs: Add resolve config reference * docs: Start API reference, needs child config entries * docs: Add sidebar entries for config reference pages * docs: Add rules and decorators config pages * docs: Fix links and format * docs: Fix links and formatting * docs: Add extends and plugins config reference pages * docs: Add a basic preprocessor page * docs: Update from review feedback * Apply suggestions from code review Co-authored-by: Heather Cloward <heathercloward@gmail.com> * docs: Reformat required labels * Apply suggestions from code review Co-authored-by: Heather Cloward <heathercloward@gmail.com> * docs: Fix misspelling --------- Co-authored-by: Heather Cloward <heathercloward@gmail.com>
42 lines
1.4 KiB
Markdown
42 lines
1.4 KiB
Markdown
# `extends`
|
|
|
|
## Introduction
|
|
|
|
The `extends` configuration entry allows your project configuration to extend an existing configuration set.
|
|
Multiple values are supported, and can include:
|
|
|
|
- the name of a [built-in ruleset](../../rules.md#rulesets)
|
|
- configuration defined in a [custom plugin](../../custom-plugins/index.md)
|
|
- a path or URL to another `redocly.yaml` file
|
|
|
|
Extends is useful if you use a common ruleset across multiple projects.
|
|
Define a ruleset in one location, and each project can `extend` it, with or without modification.
|
|
|
|
{% admonition type="info" name="Default ruleset: recommended" %}
|
|
If there is no `redocly.yaml` configuration file, the [recommended ruleset](../../rules/recommended.md) is used by default.
|
|
{% /admonition %}
|
|
|
|
## Options
|
|
|
|
The `extends` configuration is an array of strings.
|
|
|
|
The array is parsed in the order it is defined, so the later entries in the array overwrite the earlier ones.
|
|
|
|
## Examples
|
|
|
|
To get started, try the following example to configure your project to be based on the [minimal ruleset](../../rules/minimal.md):
|
|
|
|
```yaml
|
|
extends:
|
|
- minimal
|
|
```
|
|
|
|
## Related options
|
|
|
|
- [apis](./apis.md) configuration options allow setting per-API configuration in `redocly.yaml`.
|
|
- [rules](./rules.md) settings define the linting rules that are used.
|
|
|
|
## Resources
|
|
|
|
- Detailed documentation and examples on [extending configuration](../extends.md).
|