-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Unrecommend openapi-tags #1132
Comments
I wonder if we could move to having a "minimally-valid" ruleset and then "probably-best-practice" ones? I agree with most of the current setup but always turn off tags since they don't make sense in our many small APIs. We use them in a few places, but not many. |
Although it's not explicitly stated anywhere, this is what
Having all rules is basically the "strict mode" from speccy (remember openapi-tags has felt out of place in this model, as its more of a strict thing than other rules so we're moving it over. |
If you want to use it, switch from to fixes #1132
If you want to use it, switch from to fixes #1132
* BREAKING: removed operation-default-response The spec says: The default MAY be used as a default response object for all HTTP codes that are not covered individually by the specification. There's no need to suggest anyone default is any more important than optional. * chore: remove nvmrc lets let people run this with whatever version and the CI will confirm it works with versions we care about. * fixes #1273: allow 2xx or 3xx responses * BREAKING: Made openapi-tags not recommended If you want to use it, switch from to fixes #1132 * put nvmrc back Co-authored-by: Phil Sturgeon <me@philsturgeon.uk>
User story.
As a non-Stoplight user I do not understand the importance of tags, so it is a surprise when im told I absolutely must add them.
Is your feature request related to a problem?
Spectral users occasionally ask why Spectral is telling them to do things not in the OpenAPI spec. The answer is usually "this is a linter, not a validator" and that most of the rules are useful: avoiding bugs, stopping them getting hacked, etc.
One rule which doesn't fit the description is
openapi-tags
. It is useful for bigger APIs, but I'm working on a single endpoint OpenAPI description and adding tags to that is pretty redundant. It's there because Stoplight docs like tags, but for a single endpoint API I don't need my docs grouped like that anyhow.Describe the solution you'd like
For v6.0 we should just make this one rule
recommended: false
.Additional context
In the future I'd like to look into a
spectral-stoplight-ruleset
with all sorts of rules relevant to Stoplight but not particularly relevant to other tools. Food for thought whilst working on this so we know the direction at least.The text was updated successfully, but these errors were encountered: