-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
fix!: support $ref from endpoint response to components/responses #1148
base: main
Are you sure you want to change the base?
Conversation
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.
Looks good to me! Will include as a breaking change, since documents which previously generated (even though the responses would be empty) may stop generating.
You mean they would stop generating if there was an invalid response in the spec? Is it always the policy for this project that "it used to incorrectly pass when you used an invalid spec (even though the generated code wouldn't actually work), now it errors out" would constitute a breaking change rather than a bugfix or feature addition? |
(Sorry, deleted the branch by total stupid accident) |
@eli-bl any chance you would re-open this PR to try merging again? The lack of this basic OpenAPI functionality is a big gap in the project. |
@squat Thanks for reminding me - I had closed this by accident earlier, then I saw that I needed to resolve conflicts due to other changes in the meantime, now I've resolved them. |
Fixes #1125.
This makes it so the following—
—is exactly equivalent to:
Previously, it would have failed to follow the response reference and behaved as if the response had no content.
This still requires the response to be fully defined inline in
components/responses
; it can't itself consist of just a$ref
.