Skip to content

Add option to wrap return type in a generic class#295

Closed
StepanOrt wants to merge 1 commit into
Apitomy:mainfrom
StepanOrt:main
Closed

Add option to wrap return type in a generic class#295
StepanOrt wants to merge 1 commit into
Apitomy:mainfrom
StepanOrt:main

Conversation

@StepanOrt

Copy link
Copy Markdown

JAX RS code generator actully doesn't take into consideration response status. The problem is that if the methods of API's interface return POJO, the assumed response code is 200. To define alternative status, either all the methods would have to return jakarta.ws.rs.Response which is not very useful or the impelemntation of JAX RS has a generic class which represents response with option to specify status or headers. In RestEasy such class is org.jboss.resteasy.reactive.RestResponse.

This PR is adding configuration to define such generic class name to use it instead of model class directly.

@EricWittmann

Copy link
Copy Markdown
Contributor

This PR is stale due to the package rename and other codebase changes since July 2024, but the idea is still valid. Opened #430 to track a fresh implementation based on the approach here.

@EricWittmann

Copy link
Copy Markdown
Contributor

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.

2 participants