Created by: andriy-dmytruk
This PR includes multiple improvements:
Application name parameter
Added applicationName
parameter that will also be used to distinguish base-path
for different clients allowing multiple clients to be used in one application. Based on https://github.com/OpenAPITools/openapi-generator/issues/11150.
Swagger annotations parameter
Changed the swagger annotations version to swagger2 (io.swagger.core.v3:swagger-annotations
). The version can be configured using the generateSwaggerAnnotations
option that supports values true
(equivalent to swagger2
), false
, swagger1
, swagger2
. By default no annotations are generated for client and swagger2
for server. This supports what is requested in https://github.com/OpenAPITools/openapi-generator/issues/12223 (with just supplying the value false
).
Operations generated only for first tag
Added option to generate operations only for first tag. The issue is described in detail in https://github.com/OpenAPITools/openapi-generator/issues/12224. The default behavior is to generate operation for each tag, so for definition
paths:
/configureProfile:
get:
operationId: configureProfile
# ...
tags: [users, management]
the operation configureProfile
will be repeated twice (once in Users
and once in Management
). This can be avoided by setting the generateOperationOnlyForFirstTag=true
. By default it is set to true
for server and false
for client.
Sample, Docs generation, and tests
Ran:
./mvnw clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
./bin/meta-codegen.sh
Tested the generation locally.
@wing328 @mshannongit
Java technical committee: @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608