I try to generate Java api interface with openapi-generator-maven-plugin:
public interface MyInterface {
ResponseEntity<InputStreamResource> download(String path);
SomeReturnType<SomeClass> upload(MultipartFile file, String entity) throws IOException;
}
Openapi-generator-maven-plugin’s spring
generator can be configured with responseWrapper
configuration option, where response wrapper class name can be specified, but it will be applied for all endpoints.
For example, if we specify <responseWrapper>us.myorg.SomeReturnType</responseWrapper>
then interface will be generated as:
public interface MyInterface {
SomeReturnType<InputStreamResource> download(String path);
SomeReturnType<SomeClass> upload(MultipartFile file, String entity) throws IOException;
}
Hope you can help me find a workaround. Thank you!