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

Spring ResponseEntity<T> equivalent #825

Closed
ghost opened this issue Oct 18, 2024 · 5 comments
Closed

Spring ResponseEntity<T> equivalent #825

ghost opened this issue Oct 18, 2024 · 5 comments
Labels
area:client This item is related to the client extension Stale

Comments

@ghost
Copy link

ghost commented Oct 18, 2024

I need the generated java code include both response body and headers.

I know there is return-response option to return javax.ws.rs.core.Response but that class is not generic and requires casting all the time.

Is there anything similar to spring ResponseEntity<T> in quarkus?

@ricardozanini
Copy link
Member

@ghost
Copy link
Author

ghost commented Oct 20, 2024

Yes. Is there any way to generate RestResponse<T> instead of javax.ws.rs.core.Response ?

@ricardozanini
Copy link
Member

No, but you can send a PR proposal extending this use case:
https://docs.quarkiverse.io/quarkus-openapi-generator/dev/client.html#returning-response-objects

So, one can have:

quarkus.openapi-generator.codegen.spec.my_openapi_yaml.return-response=RestResponse

or

quarkus.openapi-generator.codegen.spec.my_openapi_yaml.return-response=Response

But still fallback to

quarkus.openapi-generator.codegen.spec.my_openapi_yaml.return-response=true

To not break anything.

@ricardozanini ricardozanini added the area:client This item is related to the client extension label Nov 25, 2024
Copy link
Contributor

@ricardozanini @hbelmiro This is being labeled as Stale.

@github-actions github-actions bot added the Stale label Jan 25, 2025
Copy link
Contributor

github-actions bot commented Feb 1, 2025

@ricardozanini @hbelmiro This is being closed due to inactivity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:client This item is related to the client extension Stale
Projects
None yet
Development

No branches or pull requests

1 participant