-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support per-format rulesets #1724
Comments
Please note that it applies the rules according to the specification. For example,
This is what I'd expect. Well, not exactly, but I'd expect to extend rules from something (either extends:
- minimal
async2Rules:
...
oas3_1Rules:
... If they want to reuse the same configuration later, they can simply extend from their new config. |
I know what you're trying to say but I really think this is a problem for some quite valid use cases where multiple API formats are used, maybe for different purposes. For example I can't configure:
Where the rule in the recommended set is valid for any format, it'll be applied. The custom rulesets are a bit easier because you can restrict the formats that the rule is exported for. Another alternative that occurred to me since is to allow grouping APIs by something other than format, more like the functionality in the scorecard linting so your "Gold standard" APIs have one set of rules but all the descriptions used for internal warehouse integrations are at some other standard. |
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 applyrecommended
for OpenAPI andminimal
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?
Describe alternatives you've considered
Changing
extends
completely to be an object.Another alternative:
extends
at 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.
The text was updated successfully, but these errors were encountered: