Support per-format configurable rules
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.
We have a (very cool!) configurable rules feature that also works well for all the different formats we support (OpenAPI, AsyncAPI, Arazzo - of various versions). However, the rules defined in a configuration file apply to all API descriptions of all formats when linting. It would be better to be able to define rules for each API description format/version to avoid having to pre-process, repeat-define rules in per-api configurations, or use multiple config files (these are the existing alternatives as I see them).
Describe the solution you'd like
I would like us to support configurable rules alongside per-format rules configuration (which exists and is under renaming discussion in #1723 ):
oas3_1Rules:
rule/info-description:
subject:
type: Info
property: description
assertions:
defined: true
minLength: 300
Describe alternatives you've considered
Everyone has to write their rules in plugins, so they can be exported for different types and included in the per-format sections of the config file.
Additional context
From a discussion about support and documentation for linting multiple API description formats in a single project with @DmitryAnansky and @tatomyr .
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
The issue names no files, tests, or entry points. Start by tracing the existing configurable-rules handling and the per-format configuration referenced in #1723; done means rules can be scoped to each format/version without requiring preprocessing, duplicated per-API rules, multiple config files, or plugins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100