Skip to content

Commit cb547b9

Browse files
committed
Update samples and docs
1 parent 04f653b commit cb547b9

85 files changed

Lines changed: 809 additions & 806 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.

docs/generators/java-microprofile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
9797
|useBeanValidation|Use BeanValidation API annotations| |false|
9898
|useEnumCaseInsensitive|Use `equalsIgnoreCase` when String for enum comparison| |false|
9999
|useGzipFeature|Send gzip-encoded requests| |false|
100-
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
101100
|useJackson3|Use Jackson 3 instead of Jackson 2 for JSON processing. Only supported for 'native' and 'webclient' libraries.| |false|
101+
|useJakartaEe|whether to use Jakarta EE namespace instead of javax| |false|
102102
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped. Only jersey2, jersey3, native, okhttp-gson support this option.| |false|
103103
|useOneOfInterfaces|whether to use a java interface to describe a set of oneOf options, where each option is a class that implements the interface| |false|
104104
|usePlayWS|Use Play! Async HTTP client (Play WS API)| |false|

samples/client/others/java/webclient-sealedInterface/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ dependencies {
129129
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
130130
implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version"
131131
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
132-
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
133132
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
134133
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
135-
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
136134
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
135+
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
136+
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
137137
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
138138
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
139139
}

samples/client/others/java/webclient-sealedInterface/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<jackson-version>2.19.2</jackson-version>
124124
<jackson-databind-version>2.19.2</jackson-databind-version>
125125
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version>
126-
<spring-boot-version>2.7.17</spring-boot-version>
126+
<spring-boot-version>3.2.12</spring-boot-version>
127127
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
128128
<reactor-version>3.4.34</reactor-version>
129129
<reactor-netty-version>1.2.8</reactor-netty-version>

samples/client/others/java/webclient-sealedInterface_3_1/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ dependencies {
129129
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
130130
implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version"
131131
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
132-
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
133132
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
134133
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
135-
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
136134
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
135+
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
136+
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
137137
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
138138
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
139139
}

samples/client/others/java/webclient-sealedInterface_3_1/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<jackson-version>2.19.2</jackson-version>
124124
<jackson-databind-version>2.19.2</jackson-databind-version>
125125
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version>
126-
<spring-boot-version>2.7.17</spring-boot-version>
126+
<spring-boot-version>3.2.12</spring-boot-version>
127127
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
128128
<reactor-version>3.4.34</reactor-version>
129129
<reactor-netty-version>1.2.8</reactor-netty-version>

samples/client/others/java/webclient-useAbstractionForFiles/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ dependencies {
129129
implementation "org.springframework.boot:spring-boot-starter-webflux:$spring_boot_version"
130130
implementation "io.projectreactor.netty:reactor-netty-http:$reactor_netty_version"
131131
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
132-
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
133132
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
134133
implementation "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
135-
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
136134
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
135+
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
136+
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
137137
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
138138
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
139139
}

samples/client/others/java/webclient-useAbstractionForFiles/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<jackson-version>2.19.2</jackson-version>
124124
<jackson-databind-version>2.19.2</jackson-databind-version>
125125
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version>
126-
<spring-boot-version>2.7.17</spring-boot-version>
126+
<spring-boot-version>3.2.12</spring-boot-version>
127127
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
128128
<reactor-version>3.4.34</reactor-version>
129129
<reactor-netty-version>1.2.8</reactor-netty-version>

samples/client/petstore/java/webclient-jackson3/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# petstore-webclient
1+
# petstore-webclient-jackson3
22

33
OpenAPI Petstore
44

@@ -41,7 +41,7 @@ Add this dependency to your project's POM:
4141
```xml
4242
<dependency>
4343
<groupId>org.openapitools</groupId>
44-
<artifactId>petstore-webclient</artifactId>
44+
<artifactId>petstore-webclient-jackson3</artifactId>
4545
<version>1.0.0</version>
4646
<scope>compile</scope>
4747
</dependency>
@@ -53,12 +53,12 @@ Add this dependency to your project's build file:
5353

5454
```groovy
5555
repositories {
56-
mavenCentral() // Needed if the 'petstore-webclient' jar has been published to maven central.
57-
mavenLocal() // Needed if the 'petstore-webclient' jar has been published to the local maven repo.
56+
mavenCentral() // Needed if the 'petstore-webclient-jackson3' jar has been published to maven central.
57+
mavenLocal() // Needed if the 'petstore-webclient-jackson3' jar has been published to the local maven repo.
5858
}
5959
6060
dependencies {
61-
implementation "org.openapitools:petstore-webclient:1.0.0"
61+
implementation "org.openapitools:petstore-webclient-jackson3:1.0.0"
6262
}
6363
```
6464

@@ -72,7 +72,7 @@ mvn clean package
7272

7373
Then manually install the following JARs:
7474

75-
- `target/petstore-webclient-1.0.0.jar`
75+
- `target/petstore-webclient-jackson3-1.0.0.jar`
7676
- `target/lib/*.jar`
7777

7878
## Getting Started

samples/client/petstore/java/webclient-jackson3/build.gradle

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ if(hasProperty('target') && target == 'android') {
3232
}
3333

3434
compileOptions {
35-
sourceCompatibility JavaVersion.VERSION_1_8
36-
targetCompatibility JavaVersion.VERSION_1_8
35+
sourceCompatibility JavaVersion.VERSION_17
36+
targetCompatibility JavaVersion.VERSION_17
3737
}
3838

3939
// Rename the aar correctly
@@ -78,13 +78,13 @@ if(hasProperty('target') && target == 'android') {
7878
apply plugin: 'java'
7979
apply plugin: 'maven-publish'
8080

81-
sourceCompatibility = JavaVersion.VERSION_1_8
82-
targetCompatibility = JavaVersion.VERSION_1_8
81+
sourceCompatibility = JavaVersion.VERSION_17
82+
targetCompatibility = JavaVersion.VERSION_17
8383

8484
publishing {
8585
publications {
8686
maven(MavenPublication) {
87-
artifactId = 'petstore-webclient'
87+
artifactId = 'petstore-webclient-jackson3'
8888
from components.java
8989
}
9090
}
@@ -119,8 +119,9 @@ ext {
119119
reactor_netty_version = "1.2.8"
120120
jackson_version = "3.1.0"
121121
jackson_databind_version = "3.1.0"
122-
jackson_databind_nullable_version = "0.2.9" // TODO waiting for https://github.com/OpenAPITools/jackson-databind-nullable/pull/117
123-
jackson_annotations = "2.19.2"
122+
jackson_annotations_version = "2.19.2"
123+
jackson_databind_version = "2.19.2"
124+
jackson_databind_nullable_version = "0.2.9"
124125
junit_version = "5.10.2"
125126
}
126127

@@ -132,7 +133,7 @@ dependencies {
132133
implementation "tools.jackson.core:jackson-core:$jackson_version"
133134
implementation "tools.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
134135
implementation "tools.jackson.core:jackson-databind:$jackson_databind_version"
135-
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations"
136+
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_annotations_version"
136137
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
137138
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
138139
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"

samples/client/petstore/java/webclient-jackson3/pom.xml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.openapitools</groupId>
5-
<artifactId>petstore-webclient</artifactId>
5+
<artifactId>petstore-webclient-jackson3</artifactId>
66
<packaging>jar</packaging>
7-
<name>petstore-webclient</name>
7+
<name>petstore-webclient-jackson3</name>
88
<version>1.0.0</version>
99
<url>https://github.com/openapitools/openapi-generator</url>
1010
<description>OpenAPI Java</description>
@@ -38,8 +38,8 @@
3838
<artifactId>maven-compiler-plugin</artifactId>
3939
<version>3.13.0</version>
4040
<configuration>
41-
<source>1.8</source>
42-
<target>1.8</target>
41+
<source>17</source>
42+
<target>17</target>
4343
</configuration>
4444
</plugin>
4545
<plugin>
@@ -117,10 +117,11 @@
117117
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
118118
<jackson-version>3.1.0</jackson-version>
119119
<jackson-databind-version>3.1.0</jackson-databind-version>
120-
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version> <!-- TODO waiting for https://github.com/OpenAPITools/jackson-databind-nullable/pull/117 -->
120+
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version>
121121
<spring-boot-version>4.0.3</spring-boot-version>
122-
<jakarta-annotation-version>3.0.0</jakarta-annotation-version>
123-
<reactor-version>3.4.34</reactor-version>
122+
<spring-boot-version>3.2.12</spring-boot-version>
123+
<jakarta-annotation-version>2.1.1</jakarta-annotation-version>
124+
<reactor-version>3.5.12</reactor-version>
124125
<reactor-netty-version>1.2.8</reactor-netty-version>
125126
<junit-version>5.10.2</junit-version>
126127
</properties>

0 commit comments

Comments
 (0)