Skip to content

Commit b9662dc

Browse files
[java] Intro openApiNullable property to enable/disable OpenAPI Jackson Nullable library (#6154)
* Add option to prevent usage of jackson-nullable (#2901) Add a option for all java client and server to prevent usage of third party library (jackson-databind-nullable) which may be forbidden in some company Add samples for Vertx, Spring MVC, Spring Cloud, Feign and Play Upgrade dependencies for org.openapitools:jackson-databind-nullable * Samples - Remove dependency org.openapitools:jackson-databind-nullable (#2901) * Fix generation of gradle file for vertx (#2901) * Regenerate samples (#2901) * Fix documentation and up to date (#2901) * Fix forgotten regeneration of vertx after dependency integration (#2901) * Regenerate template after rebase (#2901) * Use yaml config files introduce in #6509 to manage samples (#2901) * Regenerate template using the config (#2901) * Fix bad version during testing generated samples (#2901) * Regenerate template after fix bad version (#2901) * Fix merge, allow for set importing on codegen model Co-authored-by: Jim Schubert <james.schubert@gmail.com>
1 parent 7032c40 commit b9662dc

688 files changed

Lines changed: 68382 additions & 388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/feign-no-nullable
3+
library: feign
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
booleanGetterPrefix: is
8+
artifactId: petstore-feign-no-nullable
9+
hideGenerationTimestamp: "true"
10+
additionalModelTypeAnnotations: '@javax.annotation.concurrent.Immutable'
11+
openApiNullable: "false"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
generatorName: java-play-framework
2+
outputDir: samples/server/petstore/java-play-framework-no-nullable
3+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"
7+
openApiNullable: "false"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
generatorName: java
2+
outputDir: samples/client/petstore/java/vertx-no-nullable
3+
library: vertx
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/Java
6+
additionalProperties:
7+
artifactId: petstore-vertx-no-nullable
8+
hideGenerationTimestamp: "true"
9+
openApiNullable: "false"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
generatorName: spring
2+
outputDir: samples/server/petstore/springboot-beanvalidation-no-nullable
3+
library: spring-boot
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
java8: "false"
8+
useBeanValidation: true
9+
artifactId: spring-boot-beanvalidation-no-nullable
10+
hideGenerationTimestamp: "true"
11+
openApiNullable: "false"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: spring
2+
outputDir: samples/client/petstore/spring-cloud-no-nullable
3+
library: spring-cloud
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud
6+
additionalProperties:
7+
artifactId: petstore-spring-cloud-no-nullable
8+
responseWrapper: HystrixCommand
9+
hideGenerationTimestamp: "true"
10+
openApiNullable: "false"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
generatorName: spring
2+
outputDir: samples/server/petstore/spring-mvc-no-nullable
3+
library: spring-mvc
4+
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
5+
templateDir: modules/openapi-generator/src/main/resources/JavaSpring
6+
additionalProperties:
7+
artifactId: spring-mvc-server-no-nullable
8+
openApiNullable: "false"
9+
serverPort: "8002"
10+
hideGenerationTimestamp: "true"

docs/generators/groovy.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ sidebar_label: groovy
3030
|licenseName|The name of the license| |Unlicense|
3131
|licenseUrl|The URL of the license| |http://unlicense.org|
3232
|modelPackage|package for generated models| |org.openapitools.model|
33+
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
3334
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3435
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3536
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-inflector.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ sidebar_label: java-inflector
3232
|licenseName|The name of the license| |Unlicense|
3333
|licenseUrl|The URL of the license| |http://unlicense.org|
3434
|modelPackage|package for generated models| |org.openapitools.model|
35+
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
3536
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3637
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3738
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-msf4j.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sidebar_label: java-msf4j
3434
|licenseName|The name of the license| |Unlicense|
3535
|licenseUrl|The URL of the license| |http://unlicense.org|
3636
|modelPackage|package for generated models| |org.openapitools.model|
37+
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
3738
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3839
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3940
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

docs/generators/java-pkmst.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ sidebar_label: java-pkmst
3434
|licenseName|The name of the license| |Unlicense|
3535
|licenseUrl|The URL of the license| |http://unlicense.org|
3636
|modelPackage|package for generated models| |com.prokarma.pkmst.model|
37+
|openApiNullable|Enable OpenAPI Jackson Nullable library| |true|
3738
|parentArtifactId|parent artifactId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3839
|parentGroupId|parent groupId in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|
3940
|parentVersion|parent version in generated pom N.B. parentGroupId, parentArtifactId and parentVersion must all be specified for any of them to take effect| |null|

0 commit comments

Comments
 (0)