Apicurio / apicurio-codegen

Repository to hold some code generation utilities.
Apache License 2.0
4 stars 13 forks source link

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

Open StepanOrt opened 1 month ago

StepanOrt commented 1 month ago

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.