-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Complete OpenAPI for PanacheEntityResource #28786
Labels
Milestone
Comments
cc @Sgitario |
I think that this was already done in #26074. Are you using the Quarkus Smallrye OpenApi extension? |
Oh, I see what is going on. This works for the reactive version of REST Data Panache because Uni is generic, but not for the classic one because Response is not a generic type. |
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Oct 25, 2022
Before these changes, Open API could not deduct the return type when using Response.class (in Rest Data Panache classic). Also, for Rest Data Panache reactive, the return object for the endpoint '/get' was wrongly saying that was a single entity when is an array of entities. And finally, for the update and delete endpoints, the result status code was wrong (for update should be 201 and for delete 204). After these changes, all the above issues are fixed and covered using the existing test. Fix quarkusio#28786
tmihalac
pushed a commit
to tmihalac/quarkus
that referenced
this issue
Oct 27, 2022
Before these changes, Open API could not deduct the return type when using Response.class (in Rest Data Panache classic). Also, for Rest Data Panache reactive, the return object for the endpoint '/get' was wrongly saying that was a single entity when is an array of entities. And finally, for the update and delete endpoints, the result status code was wrong (for update should be 201 and for delete 204). After these changes, all the above issues are fixed and covered using the existing test. Fix quarkusio#28786
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Dec 14, 2022
Before these changes, Open API could not deduct the return type when using Response.class (in Rest Data Panache classic). Also, for Rest Data Panache reactive, the return object for the endpoint '/get' was wrongly saying that was a single entity when is an array of entities. And finally, for the update and delete endpoints, the result status code was wrong (for update should be 201 and for delete 204). After these changes, all the above issues are fixed and covered using the existing test. Fix quarkusio#28786 (cherry picked from commit cb8bffb)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Description
PanacheEntityResource is using Resource as return value and therefore the OpenAPI is not picking up the correct return type. It would be great if this could be fixed. Including the correct return types for errors.
Thank you!
Implementation ideas
No response
The text was updated successfully, but these errors were encountered: