Skip to content

Commit b38e317

Browse files
committed
Merge branch 'master' into csharp-refactor-improvements
* master: (40 commits) [Python] remove default value from being fallback to example (#2213) Add petstore integration tests to Ruby OAS3 client (#2211) Gradle - make GenerateTask properties optional (#2185) skip bats installation (#2198) Something in the dependencies changed. This switch is no longer needed. (#1850) Use oauth token for basic bearer auth in Rust. (#2161) Fix missing nullable (#2189) Enable error handling in Java WebClient library, fixes #1243 (#1244) [core] fix referenced enum case (#2175) rest-template: allow array parameters in path using collectionFormat (#2177) update go petstore samples Fix string types for cpprestsdk client generator (#1676) update kotline samples Remove API Key Authentication code for go when cookie is used. (#1601) changed the package install instructions to install the .tgz package … (#1989) okhttp-gson: allow array parameters in path using collectionFormat (#2137) [Ruby] Fix regualr expression in error message (#2069) (#2139) [kotlin][client] bytearray conversion (#2166) [rust-server] Added client documentation to rust-server (#2159) [Java] Getter/Setter naming convention not followed in generated models (#2095) ...
2 parents b2b1666 + f2002b2 commit b38e317

File tree

720 files changed

+29770
-3708
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

720 files changed

+29770
-3708
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ before_install:
6969
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
7070
- docker ps -a
7171
# Add bats test framework and cURL for Bash script integration tests
72-
- sudo add-apt-repository ppa:duggan/bats --yes
73-
- sudo apt-get update -qq
74-
- sudo apt-get install -qq bats
75-
- sudo apt-get install -qq curl
72+
#- sudo add-apt-repository ppa:duggan/bats --yes
73+
#- sudo apt-get update -qq
74+
#- sudo apt-get install -qq bats
75+
#- sudo apt-get install -qq curl
7676
# install dart
7777
#- sudo apt-get update
7878
#- sudo apt-get install apt-transport-https
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
while [ -h "$SCRIPT" ] ; do
7+
ls=`ls -ld "$SCRIPT"`
8+
link=`expr "$ls" : '.*-> \(.*\)$'`
9+
if expr "$link" : '/.*' > /dev/null; then
10+
SCRIPT="$link"
11+
else
12+
SCRIPT=`dirname "$SCRIPT"`/"$link"
13+
fi
14+
done
15+
16+
if [ ! -d "${APP_DIR}" ]; then
17+
APP_DIR=`dirname "$SCRIPT"`/..
18+
APP_DIR=`cd "${APP_DIR}"; pwd`
19+
fi
20+
21+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
22+
23+
if [ ! -f "$executable" ]
24+
then
25+
mvn -B clean package
26+
fi
27+
28+
# if you've executed sbt assembly previously it will use that instead.
29+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
30+
31+
ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go-gin-server -o samples/openapi3/server/petstore/go-gin-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
32+
33+
java $JAVA_OPTS -jar $executable $ags
34+
#!/usr/bin/env bash

bin/openapi3/go-petstore-server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ fi
2828
# if you've executed sbt assembly previously it will use that instead.
2929
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
3030

31-
ags="generate -t modules/openapi-generator/src/main/resources/go-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g go-server -o samples/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
31+
ags="generate -t modules/openapi-generator/src/main/resources/go-server -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g go-server -o samples/openapi3/server/petstore/go-api-server -DpackageName=petstoreserver --additional-properties hideGenerationTimestamp=true -Dservice $@"
3232

3333
java $JAVA_OPTS -jar $executable $ags

bin/openapi3/go-petstore.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
3+
SCRIPT="$0"
4+
echo "# START SCRIPT: $SCRIPT"
5+
6+
while [ -h "$SCRIPT" ] ; do
7+
ls=`ls -ld "$SCRIPT"`
8+
link=`expr "$ls" : '.*-> \(.*\)$'`
9+
if expr "$link" : '/.*' > /dev/null; then
10+
SCRIPT="$link"
11+
else
12+
SCRIPT=`dirname "$SCRIPT"`/"$link"
13+
fi
14+
done
15+
16+
if [ ! -d "${APP_DIR}" ]; then
17+
APP_DIR=`dirname "$SCRIPT"`/..
18+
APP_DIR=`cd "${APP_DIR}"; pwd`
19+
fi
20+
21+
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
22+
23+
if [ ! -f "$executable" ]
24+
then
25+
mvn -B clean package
26+
fi
27+
28+
SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml"
29+
GENERATOR="go"
30+
STUB_DIR="samples/openapi3/client/petstore/go/go-petstore"
31+
echo "Removing files and folders under $STUB_DIR"
32+
rm -rf $STUB_DIR
33+
34+
# if you've executed sbt assembly previously it will use that instead.
35+
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
36+
ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR -DpackageName=petstore $@"
37+
38+
java $JAVA_OPTS -jar $executable $ags

bin/typescript-axios-petstore-all.sh

100644100755
File mode changed.

bin/typescript-axios-petstore-interfaces.sh

100644100755
File mode changed.

bin/typescript-axios-petstore-target-es6.json

100644100755
File mode changed.

bin/typescript-axios-petstore-target-es6.sh

100644100755
File mode changed.

bin/typescript-axios-petstore-with-npm-version.json

100644100755
File mode changed.

bin/typescript-axios-petstore-with-npm-version.sh

100644100755
File mode changed.

bin/typescript-axios-petstore.sh

100644100755
File mode changed.

bin/utils/openapi-generator-cli.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ done
2929

3030
function latest.tag {
3131
local uri="https://api.github.com/repos/${1}/releases"
32-
curl -s ${uri} | jq -r 'first(.[]|select(.prerelease==false)).tag_name
32+
curl -s ${uri} | jq -r 'first(.[]|select(.prerelease==false)).tag_name'
3333
}
3434

3535
ghrepo=openapitools/openapi-generator

docs/generators/groovy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,5 @@ sidebar_label: groovy
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|configPackage|configuration package for generated code| |null|

docs/generators/java-inflector.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ sidebar_label: java-inflector
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|

docs/generators/java-msf4j.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: java-msf4j
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/java-pkmst.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: java-pkmst
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|groupId|groupId in generated pom.xml| |null|
4546
|artifactId|artifactId in generated pom.xml| |null|
4647
|artifactVersion|artifact version in generated pom.xml| |null|

docs/generators/java-play-framework.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: java-play-framework
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|title|server title name or client service name| |null|
4546
|configPackage|configuration package for generated code| |null|
4647
|basePackage|base package for generated code| |null|

docs/generators/java-undertow-server.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ sidebar_label: java-undertow-server
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|

docs/generators/java-vertx.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,6 @@ sidebar_label: java-vertx
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|rxInterface|When specified, API interfaces are generated with RX and methods return Single<> and Comparable.| |false|
4546
|vertxSwaggerRouterVersion|Specify the version of the swagger router library| |null|

docs/generators/java.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: java
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|useRxJava|Whether to use the RxJava adapter with the retrofit2 library.| |false|
4546
|useRxJava2|Whether to use the RxJava2 adapter with the retrofit2 library.| |false|
4647
|parcelableModel|Whether to generate models for Android that implement Parcelable with the okhttp-gson library.| |false|

docs/generators/jaxrs-cxf-cdi.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-cxf-cdi
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/jaxrs-cxf-client.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-cxf-client
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|useBeanValidation|Use BeanValidation API annotations| |false|
4546
|useGzipFeatureForTests|Use Gzip Feature for tests| |false|
4647
|useLoggingFeatureForTests|Use Logging Feature for tests| |false|

docs/generators/jaxrs-cxf.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-cxf
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/jaxrs-jersey.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-jersey
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/jaxrs-resteasy-eap.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-resteasy-eap
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/jaxrs-resteasy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-resteasy
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/jaxrs-spec.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: jaxrs-spec
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|implFolder|folder for generated implementation code| |null|
4546
|title|a title describing the application| |null|
4647
|useBeanValidation|Use BeanValidation API annotations| |true|

docs/generators/spring.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ sidebar_label: spring
4141
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4242
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
4343
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
44+
|snapshotVersion|Uses a SNAPSHOT version.| |null|
4445
|title|server title name or client service name| |null|
4546
|configPackage|configuration package for generated code| |null|
4647
|basePackage|base package (invokerPackage) for generated code| |null|

docs/generators/typescript-angular.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sidebar_label: typescript-angular
2020
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
2121
|taggedUnions|Use discriminators to create tagged unions instead of extending interfaces.| |false|
2222
|providedInRoot|Use this property to provide Injectables in root (it is only valid in angular version greater or equal to 6.0.0).| |false|
23-
|ngVersion|The version of Angular. Default is '4.3'| |null|
23+
|ngVersion|The version of Angular. Default is '7.0.0'| |null|
2424
|serviceSuffix|The suffix of the generated service. Default is 'Service'.| |null|
2525
|serviceFileSuffix|The suffix of the file of the generated service (service<suffix>.ts). Default is '.service'.| |null|
2626
|modelSuffix|The suffix of the generated model. Default is ''.| |null|

modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/Generate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public class Generate implements Runnable {
120120
name = {"--type-mappings"},
121121
title = "type mappings",
122122
description = "sets mappings between OpenAPI spec types and generated code types "
123-
+ "in the format of OpenaAPIType=generatedType,OpenAPIType=generatedType. For example: array=List,map=Map,string=String."
123+
+ "in the format of OpenAPIType=generatedType,OpenAPIType=generatedType. For example: array=List,map=Map,string=String."
124124
+ " You can also have multiple occurrences of this option.")
125125
private List<String> typeMappings = new ArrayList<>();
126126

modules/openapi-generator-gradle-plugin/src/main/kotlin/org/openapitools/generator/gradle/plugin/tasks/GenerateTask.kt

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,25 @@ open class GenerateTask : DefaultTask() {
403403
GeneratorProperties.clearProperty(CodegenConstants.APIS)
404404
}
405405

406-
GeneratorProperties.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.get().toString())
407-
GeneratorProperties.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.get().toString())
408-
GeneratorProperties.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.get().toString())
409-
GeneratorProperties.setProperty(CodegenConstants.API_TESTS, generateApiTests.get().toString())
410-
GeneratorProperties.setProperty(CodegenConstants.WITH_XML, withXml.get().toString())
406+
if (generateApiDocumentation.isPresent) {
407+
GeneratorProperties.setProperty(CodegenConstants.API_DOCS, generateApiDocumentation.get().toString())
408+
}
409+
410+
if (generateModelDocumentation.isPresent) {
411+
GeneratorProperties.setProperty(CodegenConstants.MODEL_DOCS, generateModelDocumentation.get().toString())
412+
}
413+
414+
if (generateModelTests.isPresent) {
415+
GeneratorProperties.setProperty(CodegenConstants.MODEL_TESTS, generateModelTests.get().toString())
416+
}
417+
418+
if (generateApiTests.isPresent) {
419+
GeneratorProperties.setProperty(CodegenConstants.API_TESTS, generateApiTests.get().toString())
420+
}
421+
422+
if (withXml.isPresent) {
423+
GeneratorProperties.setProperty(CodegenConstants.WITH_XML, withXml.get().toString())
424+
}
411425

412426
// now override with any specified parameters
413427
verbose.ifNotEmpty { value ->

0 commit comments

Comments
 (0)