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
[BUG] vacuum reports tag error for allowed use case #215
Comments
This rule (https://quobix.com/vacuum/rules/tags/operation-tag-defined/) is based on this rule from spectral: https://meta.stoplight.io/docs/spectral/4dec24461f3af-open-api-rules#operation-tag-defined It's more of an opinion rather than anything. If there are tags defined globally, why are they not used? its the same as orphaned components/schemas. I don't think this is a bug, but I would be OK with dropping it to a warning by default, it's an opinion being expressed (rather harshly) but still, it's taking a stand on clean/tuned specs. |
Thanks for explaining the logic, a warning would be preferred as the spec does not specify that root level tags MUST or SHALL include all operation tags |
It's not technically an error, but it is bad design. Compensating by reducing serverity of the rule to not bash it too hard in quality results. Signed-off-by: Dave Shanley <dave@quobix.com>
It's not technically an error, but it is bad design. Compensating by reducing serverity of the rule to not bash it too hard in quality results. Signed-off-by: Dave Shanley <dave@quobix.com>
Docs have been updated: https://quobix.com/vacuum/rules/tags/operation-tag-defined/ |
Spec:
vacuum says the lack of tags at the top level of the spec is an error:
Operation tags must be defined in global tags.
But that's not true per the openapi spec:
spec.tags: Not all tags that are used by the [Operation Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operationObject) must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.
The text was updated successfully, but these errors were encountered: