-
Notifications
You must be signed in to change notification settings - Fork 77
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
chore: reuse parameters to make the openapi file smaller #2382
Conversation
- $ref: "./parameters.yaml#/components/parameters/take" | ||
- $ref: "./parameters.yaml#/components/parameters/skip" | ||
- $ref: "./parameters.yaml#/components/parameters/query" | ||
- $ref: "./parameters.yaml#/components/parameters/runnableResourceSortBy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: is there a way to "override" ref attributes? I believe that we have many similar sortBy
fields with only the enum
with different values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, no :(
api/openapi.yaml
Outdated
- $ref: "./parameters.yaml#/components/parameters/take" | ||
- $ref: "./parameters.yaml#/components/parameters/skip" | ||
- $ref: "./parameters.yaml#/components/parameters/query" | ||
- $ref: "./parameters.yaml#/components/parameters/sortBy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here it should be a runnableResourceSortBy, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
b7a8dcd
to
b46ecbb
Compare
b46ecbb
to
8bea17d
Compare
This PR reduces the size of the openapi file by reusing the common parameters when defining endpoints
Checklist