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

Only resolve relevant $refs #12

Open
charjr opened this issue Mar 23, 2023 · 0 comments
Open

Only resolve relevant $refs #12

charjr opened this issue Mar 23, 2023 · 0 comments

Comments

@charjr
Copy link
Collaborator

charjr commented Mar 23, 2023

Current Behaviour

All references are resolved.

Issue

The router only needs to know the following:

  • OpenAPI Object
    • Servers (list of Server Objects)
    • Paths Object (array of relativeUrl => Path Object)
      • PathObject
        • Servers (list of Server Objects)
        • Parameters (list of Parameter Objects)
        • Operations(array of method => Operation Object)
          • Servers (list of Server Objects)
          • Parameters(list of Parameter Objects)

Resolving references outside of this adds unnecessary workload.

Desired Behaviour

Only resolve necessary references:

What can be a Reference?

A common misconception is that $ref is allowed anywhere in an OpenAPI specification file. Actually $ref is only allowed in places where the OpenAPI 3.0 Specification explicitly states that the value may be a reference.

Below is a list of what I can confirm is the OpenAPI 3.0 Specification has explicitly stated can be a reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant