Created by: andriy-dmytruk
Based on this feature request: https://github.com/OpenAPITools/openapi-generator/issues/12059
Adds 2 options to describe in what to wrap the return types of operations:
-
reactive=true
will wrap the result inMono
-
wrapInHttpResponse=true
will wrap the result in micronautHttpResponse
As an example the following method signatures can be produced:
Pet getPet(...args);
Mono<Pet> getPet(...args);
HttpResponse<Pet> getPet(...args);
Mono<HttpResponse> getPet(...args);
Also, based on PR https://github.com/OpenAPITools/openapi-generator/issues/12058 removes the parameter to reduce @Controller("${context-path}")
to simply @Controller
.
I ran the following to validate build:
./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
./mvnw integration-test -P "java-micronaut-client,java-micronaut-server"
feature request author: @pbthorste
Java technical committee: @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608