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 hibernate-reactive-rest-data-panache when adding smallrye openapi #26048

Closed
wants to merge 1 commit into from

Conversation

Sgitario
Copy link
Contributor

As generating a parameterized type is too complex to do with gizmo (it will be addressed in quarkusio/gizmo#70), these changes implement a workaround so the extension hibernate-reactive-rest-data-panache does not fail when adding the smallrye openapi extension.

The ultimate solution should be:

  • to generate parameterized types (Uni<Entity> instead of only Uni).
  • to make smallrye openapi more robust (see related comment here and here).

Fix #25990

@geoand
Copy link
Contributor

geoand commented Jun 10, 2022

to generate parameterized types (Uni instead of only Uni)

Why can't we do this now? It should not be too hard to add a method signature manually (we already do this in some places)

@Sgitario
Copy link
Contributor Author

to generate parameterized types (Uni instead of only Uni)

Why can't we do this now? It should not be too hard to add a method signature manually (we already do this in some places)

This was my first approach and could not make it work with a simple get method (I always got exceptions when generating the method) - and the signature seems to be right.
For sure, it's technically possible, but honestly, I think it does not worth it as it could be easily done after quarkusio/gizmo#70.

@geoand
Copy link
Contributor

geoand commented Jun 10, 2022

This was my first approach and could not make it work with a simple get method (I always got exceptions when generating the method) - and the signature seems to be right.

When I had to do this in other cases, I would see what javac generated (using javap -v ... ) for a comparable Java method.

@Sgitario Sgitario force-pushed the panache_uni_param branch from f664de6 to 9a8b6e2 Compare June 10, 2022 13:53
@Sgitario
Copy link
Contributor Author

This was my first approach and could not make it work with a simple get method (I always got exceptions when generating the method) - and the signature seems to be right.

When I had to do this in other cases, I would see what javac generated (using javap -v ... ) for a comparable Java method.

Thanks to this tool, I could see what I was doing wrong with the signature.
Closing and the final fix will be done in #26074.

@Sgitario Sgitario closed this Jun 13, 2022
@quarkus-bot quarkus-bot bot added the triage/invalid This doesn't seem right label Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache triage/invalid This doesn't seem right
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reactive-rest-data not compliant with openapi
2 participants