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

Rest Data Panache: Correct Open API integration #28811

Merged
merged 1 commit into from
Oct 25, 2022
Merged

Conversation

Sgitario
Copy link
Contributor

This pull request fixes the following issues:

  • Open API could not deduct the return type when using Response.class (in Rest Data Panache classic).
  • 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.
  • Finally, for the update and delete endpoints, the result status code was wrong (for update should be 201 and for delete 204).

Fix #28786

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
@Sgitario
Copy link
Contributor Author

Sgitario commented Oct 25, 2022

@gmuellerinform @geoand

Copy link
Contributor

@geoand geoand left a comment

Choose a reason for hiding this comment

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

LGTM

@geoand geoand merged commit 84f7bea into quarkusio:main Oct 25, 2022
@quarkus-bot quarkus-bot bot added this to the 2.14 - main milestone Oct 25, 2022
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Oct 25, 2022
@Sgitario Sgitario deleted the 28786 branch October 26, 2022 05:09
@gsmet
Copy link
Member

gsmet commented Oct 31, 2022

@Sgitario I tried backporting this one but it has a lot of conflicts. Either we just skip it or we need a separate PR to backport it (or we need to backport something else to make it less painful).

@Sgitario
Copy link
Contributor Author

Sgitario commented Nov 2, 2022

For me, it's ok to not backport it to 2.13. This has not been working for a while, so I guess it's not an urgent change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Complete OpenAPI for PanacheEntityResource
3 participants