4

We are currently migrating some old rest interfaces from RAML to OpenAPI 3. In the RAML file an HTTP delete operation has the response defined with empty body as follows:

delete:
  responses:
    204:

This generates java-code with a delete method with response type ResponseEntity<?>.
Generating with OpenAPI the same method with response type ResponseEntity<Void> is generated.
We don't want to change the implementation of the interface, so is there a way to generate a ResponseEntity with wildcard generic type from OpenAPI(3)?

observer
  • 2,925
  • 1
  • 19
  • 38
ladonyim
  • 41
  • 1
  • 1
    How is the response currently defined in your OpenAPI file? What code generator do you use - Swagger Codegen, openapi-generator or something else? If you use Swagger Codegen or openapi-generator, what server/client do you generate (e.g. `java` client or `jaxrs-jersey` server or similar)? – Helen Sep 06 '19 at 13:44
  • We don't have a response body defined, the response described above is the whole response. In the original raml it is defined the same way. We are using openapi-generator-maven-plugin 3.3.0 for generating a java interface annotated as Api. – ladonyim Sep 08 '19 at 08:27

0 Answers0