Skip to content
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

Should operation-tag-defined continue to exist? #6

Open
philsturgeon opened this issue Dec 28, 2022 · 0 comments
Open

Should operation-tag-defined continue to exist? #6

philsturgeon opened this issue Dec 28, 2022 · 0 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@philsturgeon
Copy link
Contributor

philsturgeon commented Dec 28, 2022

I am curious about whether or not operation-tag-defined should be moved over here from spectral:oas, as it does not belong in the newer spectral-openapi ruleset.

Context

This is the old rule in spectral:oas:

    "operation-tag-defined": {
      message: "Operation tags must be defined in global tags.",
      description: "Not all tags that are used by the Operation Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic.",
      recommended: true,
      given: "$",
      then: {
        function: oasTagDefined,
      },
    },

Current Behavior

Currently Spectral with the default spectral:oas ruleset will tell everyone that tags defined in operation must be defined in global tags, but OpenAPI v3.x says quite the opposite.

A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the Operation Object 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.

Emphasis mine. Full quote here.

Expected Behavior

I think the spectral:oas ruleset lose this change, but I am not sure if it adds anything to have it in spectral-documentation.

Fundamentally, what does this add?

Possible Solution(s)

Do not add the rule here, and let it die when spectral:oas goes away.

@philsturgeon philsturgeon changed the title Does operation-tag-defined belong here (or anywhere)? Should operation-tag-defined continue to exist? Dec 28, 2022
@philsturgeon philsturgeon added enhancement New feature or request question Further information is requested labels Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant