Allow generation of reactive APIs w/o wrapping Mono<ResponseEntity>
Created by: jrobison153
Description
We've been looking at the generated Spring Web Reactive interfaces and the response type wrappings seem superfluous, this is using version openapi-generator:3.3.1. For an API that returns a collection of type T, we get a Java interface with the following response signature
Mono<ResponseEntity<Flux<T>>>
From all of our testing this behaves identically to Flux<T>
from a reactive client's perspective. The additional Mono<ResponseEntity>
adds additional code to each controller to add the type wrappings.
Since the ServerWebExchange is already present and gives all the control over the HTTP session needed. It seems the generated code could be simplified
The suggestion is that an option could be added to generate the reactive interfaces w/o the wrapping Mono<ResponseEntity>
openapi-generator version
openapi-generator:3.3.1