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

allow vendor extensions next to $refs #586

Closed
BentEngbers opened this issue Nov 22, 2024 · 2 comments
Closed

allow vendor extensions next to $refs #586

BentEngbers opened this issue Nov 22, 2024 · 2 comments
Labels
wontfix This will not be worked on

Comments

@BentEngbers
Copy link

In the following example, vacuum reports an oas3-no-$ref-siblings error.

openapi: 3.1.0
paths:
  /example:
    get:
      operationId: example
      responses:
        "200":
          content:
            application/json:
              schema:
                x-test: foo
                $ref: "#/components/schemas/response"
components:
  schemas:
    response:
      type: string

The error:

 a `$ref` can only be placed next to `summary` and `description` but got:x-test      | oas3-no-$ref-siblings
@LasneF
Copy link

LasneF commented Nov 25, 2024

looking on the rules here
https://learn.openapis.org/referencing/overview.html#a-taxonomy-of-references

summary and description has an explicit specification , whereas it has not for extension

the key being if the reference should override the parent or not , this behavior is only specified for description and summary

then to me the rule as it is looks fair ,

2 options for work around :
@BentEngbers disable the rules as it does not suits your need
@daveshanley having a mechanism of rules extension so that the end user can add others key word to the rules (may be simple to say , but complex to specify with dedicated configuration file/ model )

@daveshanley
Copy link
Owner

I am going to say the same thing I said here: #608

The spec says everything else is ignored, which means they are not supposed to be there. The purpose of vacuum is tell you when you are rolling off the road and deviating from the standard.

The rule as it is, is accurate in my opinion, I won't be changing this. Just disable the rule if you want to use this design.

@daveshanley daveshanley added the wontfix This will not be worked on label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants