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

fix issue with openapi error response examples #152

Merged
merged 3 commits into from
Mar 27, 2024
Merged

Conversation

lewisjkl
Copy link
Contributor

Fixes an issue where openapi conversion would put all examples (including error cases) on the 200 response. This updates so that the error cases are instead grouped with the correct status codes.

Comment on lines +175 to +191
"404": {
"description": "NotFound404response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundResponseContent"
},
"examples": {
"TWO": {
"value": {
"message": "Notfoundmessage"
}
}
}
}
}
},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an example of what wasn't happening prior, but is now.

@lewisjkl lewisjkl merged commit 1ea08ae into main Mar 27, 2024
3 checks passed
@lewisjkl lewisjkl deleted the openapi-error-examples branch March 27, 2024 18:33
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

Successfully merging this pull request may close these issues.

None yet

3 participants