enable-rule, enable-decorator args
See original GitHub issueIs your feature request related to a problem? Please describe.
There is a way to skip rules and decorators but no way to enable them by args.
I think this causes a user experience problem. This means to enable any decorator or rule requires adding it explicitly to the .redocly.yaml
file. This is problematic when someone doesn’t even have a .redocly.yaml
file – they need to:
- Create a
.redocly.yaml
file (which has its own challenges because commonly used operating systems hide dot files by default) - Learn the structure of the file and fill it out to enable a rule or decorator. Save the file.
- Commit to source control, upload, or CLI push again.
Describe the solution you’d like
I would like to be able to specify enabling some rule or decorator at runtime. For example, removing internal APIs…
--enable-decorator=remove-x-internal,remove-unused-components
Describe alternatives you’ve considered
Auto-generating .redocly.yaml
file on the fly from a wizard.
Additional context
I am envisioning what the usage may be like from within the API registry in workflows, where someone may be able to select from specific rules and decorators.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Thank you @andriyl – I like the
{key:value,key2:value2}
. But, don’t proceed yet – let’s get more feedback. As it turns out this issue exists for decorators and rules.Suggestions about parameters:
--enable-decorator=remove-x-internal{key:value,key2:value2},remove-unused-components
--enable-decorator=remove-x-internal@key:value,key2:value2,remove-unused-components