Support per-format rulesets
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 228
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 48
Description
Is your feature request related to a problem? Please describe.
When I specify a ruleset in extends, such as recommended, it applies to all formats. I want to be able to apply recommended for OpenAPI and minimal for AsyncAPI.
Describe the solution you'd like
I'm actually not sure what would make sense here, since extends is an array. I'm open to suggestions and we should consider this alongside proposed changes in #1723 so they make sense together.
Per-format sections could work? Like the per-api sections, but different?
openapi-31:
extends:
- recommended
- my-super-rules.yaml
rules:
security-defined: error
Describe alternatives you've considered
Changing extends completely to be an object.
extends:
all:
- minimal
openapi-31:
- recommended
arazzo-10:
- recommended-strict
- spot
Another alternative:
- tell users who lint multiple formats not to use
extendsat all but to use the per-format rules sections and provide copy/paste versions of our built in rulesets for each format (this is the short-term solution whatever we decide)
Additional context
From a conversation with @DmitryAnansky and @tatomyr about multi-format linting features.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Start by reviewing proposed changes in #1723 and the existing multi-format linting discussion, then trace how extends and per-format sections are currently represented. Done means an agreed, documented configuration design that supports different rulesets per format and is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100