Skip to content

Commit f1f52d7

Browse files
committed
Regenerate samples
1 parent 60c03e0 commit f1f52d7

File tree

12 files changed

+16
-44
lines changed

12 files changed

+16
-44
lines changed

samples/client/echo_api/java/feign-gson/build.gradle

-7
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ test {
102102

103103
ext {
104104
swagger_annotations_version = "1.6.11"
105-
jackson_version = "2.14.3"
106-
jackson_databind_version = "2.14.3"
107105
jackson_databind_nullable_version = "0.2.6"
108106
jakarta_annotation_version = "1.3.5"
109107
feign_version = "10.12"
@@ -116,15 +114,10 @@ dependencies {
116114
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
117115
implementation "com.google.code.findbugs:jsr305:3.0.2"
118116
implementation "io.github.openfeign:feign-core:$feign_version"
119-
implementation "io.github.openfeign:feign-jackson:$feign_version"
120117
implementation "io.github.openfeign:feign-slf4j:$feign_version"
121118
implementation "io.github.openfeign:feign-okhttp:$feign_version"
122119
implementation "io.github.openfeign.form:feign-form:$feign_form_version"
123-
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
124-
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
125-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
126120
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
127-
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
128121
implementation "com.brsanthu:migbase64:2.2"
129122
implementation "com.github.scribejava:scribejava-core:$scribejava_version"
130123
implementation "com.brsanthu:migbase64:2.2"

samples/client/echo_api/java/feign-gson/build.sbt

-6
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,9 @@ lazy val root = (project in file(".")).
1212
"io.swagger" % "swagger-annotations" % "1.6.11" % "compile",
1313
"com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile",
1414
"io.github.openfeign" % "feign-core" % "10.12" % "compile",
15-
"io.github.openfeign" % "feign-jackson" % "10.12" % "compile",
1615
"io.github.openfeign" % "feign-slf4j" % "10.12" % "compile",
1716
"io.github.openfeign.form" % "feign-form" % "3.8.0" % "compile",
1817
"io.github.openfeign" % "feign-okhttp" % "10.12" % "compile",
19-
"com.fasterxml.jackson.core" % "jackson-core" % "2.14.3" % "compile",
20-
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.14.3" % "compile",
21-
"com.fasterxml.jackson.core" % "jackson-databind" % "2.14.3" % "compile",
22-
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile",
23-
"com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.9.10" % "compile",
2418
"com.github.scribejava" % "scribejava-core" % "8.0.0" % "compile",
2519
"com.brsanthu" % "migbase64" % "2.2" % "compile",
2620
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",

samples/client/echo_api/java/feign-gson/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@
304304
<feign-form-version>3.8.0</feign-form-version>
305305
<gson-version>2.10.1</gson-version>
306306
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
307-
<jackson-databind-version>2.15.2</jackson-databind-version>
308307
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
309308
<junit-version>5.10.0</junit-version>
310309
<maven-plugin-version>1.0.0</maven-plugin-version>

samples/client/echo_api/java/okhttp-gson-user-defined-templates/src/main/java/org/openapitools/client/JSON.java

+6-13
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313

1414
package org.openapitools.client;
1515

16-
import com.fasterxml.jackson.databind.util.StdDateFormat;
1716
import com.google.gson.Gson;
1817
import com.google.gson.GsonBuilder;
1918
import com.google.gson.JsonParseException;
2019
import com.google.gson.TypeAdapter;
20+
import com.google.gson.internal.bind.util.ISO8601Utils;
2121
import com.google.gson.stream.JsonReader;
2222
import com.google.gson.stream.JsonWriter;
2323
import com.google.gson.JsonElement;
@@ -31,16 +31,14 @@
3131
import java.lang.reflect.Type;
3232
import java.text.DateFormat;
3333
import java.text.ParseException;
34+
import java.text.ParsePosition;
3435
import java.time.LocalDate;
3536
import java.time.OffsetDateTime;
36-
import java.time.ZoneId;
37-
import java.time.ZoneOffset;
3837
import java.time.format.DateTimeFormatter;
3938
import java.util.Date;
4039
import java.util.Locale;
4140
import java.util.Map;
4241
import java.util.HashMap;
43-
import java.util.TimeZone;
4442

4543
/*
4644
* A JSON utility class
@@ -57,11 +55,6 @@ public class JSON {
5755
private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
5856
private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
5957

60-
private static final StdDateFormat sdf = new StdDateFormat()
61-
.withTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault()))
62-
.withColonInTimeZone(true);
63-
private static final DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
64-
6558
@SuppressWarnings("unchecked")
6659
public static GsonBuilder createGson() {
6760
GsonFireBuilder fireBuilder = new GsonFireBuilder()
@@ -338,7 +331,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
338331
if (dateFormat != null) {
339332
return new java.sql.Date(dateFormat.parse(date).getTime());
340333
}
341-
return new java.sql.Date(sdf.parse(date).getTime());
334+
return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
342335
} catch (ParseException e) {
343336
throw new JsonParseException(e);
344337
}
@@ -348,7 +341,7 @@ public java.sql.Date read(JsonReader in) throws IOException {
348341

349342
/**
350343
* Gson TypeAdapter for java.util.Date type
351-
* If the dateFormat is null, DateTimeFormatter will be used.
344+
* If the dateFormat is null, ISO8601Utils will be used.
352345
*/
353346
public static class DateTypeAdapter extends TypeAdapter<Date> {
354347

@@ -373,7 +366,7 @@ public void write(JsonWriter out, Date date) throws IOException {
373366
if (dateFormat != null) {
374367
value = dateFormat.format(date);
375368
} else {
376-
value = date.toInstant().atOffset(ZoneOffset.UTC).format(dtf);
369+
value = ISO8601Utils.format(date, true);
377370
}
378371
out.value(value);
379372
}
@@ -392,7 +385,7 @@ public Date read(JsonReader in) throws IOException {
392385
if (dateFormat != null) {
393386
return dateFormat.parse(date);
394387
}
395-
return sdf.parse(date);
388+
return ISO8601Utils.parse(date, new ParsePosition(0));
396389
} catch (ParseException e) {
397390
throw new JsonParseException(e);
398391
}

samples/client/petstore/java/feign/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ dependencies {
123123
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
124124
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
125125
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
126-
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
127126
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
127+
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
128128
implementation "com.brsanthu:migbase64:2.2"
129129
implementation "com.github.scribejava:scribejava-core:$scribejava_version"
130130
implementation "com.brsanthu:migbase64:2.2"

samples/client/petstore/java/feign/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@
319319
<feign-version>13.2.1</feign-version>
320320
<feign-form-version>3.8.0</feign-form-version>
321321
<jackson-version>2.15.2</jackson-version>
322-
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
323322
<jackson-databind-version>2.15.2</jackson-databind-version>
323+
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
324324
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
325325
<junit-version>5.10.0</junit-version>
326326
<maven-plugin-version>1.0.0</maven-plugin-version>

samples/client/petstore/java/rest-assured/pom.xml

-6
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,6 @@
226226
<artifactId>gson-fire</artifactId>
227227
<version>${gson-fire-version}</version>
228228
</dependency>
229-
<dependency>
230-
<groupId>com.fasterxml.jackson.core</groupId>
231-
<artifactId>jackson-databind</artifactId>
232-
<version>${jackson-databind-version}</version>
233-
</dependency>
234229
<dependency>
235230
<groupId>com.squareup.okio</groupId>
236231
<artifactId>okio</artifactId>
@@ -262,7 +257,6 @@
262257
<rest-assured.version>5.3.2</rest-assured.version>
263258
<gson-version>2.10.1</gson-version>
264259
<gson-fire-version>1.9.0</gson-fire-version>
265-
<jackson-databind-version>2.15.2</jackson-databind-version>
266260
<jakarta-annotation-version>1.3.5</jakarta-annotation-version>
267261
<beanvalidation-version>3.0.2</beanvalidation-version>
268262
<okio-version>3.6.0</okio-version>

samples/client/petstore/java/retrofit2-play26/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ if(hasProperty('target') && target == 'android') {
9999
ext {
100100
oltu_version = "1.0.1"
101101
retrofit_version = "2.3.0"
102-
jackson_databind_version = "2.15.2"
103102
jackson_version = "2.15.2"
103+
jackson_databind_version = "2.15.2"
104104
javax_ws_rs_api_version = "2.1.1"
105105
jackson_databind_nullable_version = "0.2.6"
106106
play_version = "2.6.7"
@@ -125,10 +125,10 @@ dependencies {
125125
implementation "com.squareup.retrofit2:converter-jackson:$retrofit_version"
126126
implementation "com.fasterxml.jackson.core:jackson-core:$jackson_version"
127127
implementation "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
128+
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
128129
implementation "javax.ws.rs:javax.ws.rs-api:$javax_ws_rs_api_version"
129130
implementation "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version"
130131
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
131-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
132132
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
133133
testImplementation "junit:junit:$junit_version"
134134
}

samples/client/petstore/java/retrofit2-play26/pom.xml

+6-1
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,11 @@
277277
<artifactId>play-ahc-ws_2.12</artifactId>
278278
<version>${play-version}</version>
279279
</dependency>
280+
<dependency>
281+
<groupId>jakarta.validation</groupId>
282+
<artifactId>jakarta.validation-api</artifactId>
283+
<version>${beanvalidation-version}</version>
284+
</dependency>
280285
<dependency>
281286
<groupId>jakarta.annotation</groupId>
282287
<artifactId>jakarta.annotation-api</artifactId>
@@ -297,8 +302,8 @@
297302
<maven.compiler.source>${java.version}</maven.compiler.source>
298303
<maven.compiler.target>${java.version}</maven.compiler.target>
299304
<swagger-annotations-version>1.6.3</swagger-annotations-version>
300-
<jackson-version>2.15.2</jackson-version>
301305
<jackson-databind-version>2.15.2</jackson-databind-version>
306+
<jackson-version>2.15.2</jackson-version>
302307
<jackson-databind-nullable-version>0.2.6</jackson-databind-nullable-version>
303308
<javax.ws.rs-api-version>2.1.1</javax.ws.rs-api-version>
304309
<play-version>2.6.7</play-version>

samples/client/petstore/java/retrofit2/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ if(hasProperty('target') && target == 'android') {
9999
ext {
100100
oltu_version = "1.0.1"
101101
retrofit_version = "2.3.0"
102-
jackson_databind_version = "2.15.2"
103102
jakarta_annotation_version = "1.3.5"
104103
swagger_annotations_version = "1.5.22"
105104
junit_version = "4.13.2"
@@ -116,7 +115,6 @@ dependencies {
116115
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
117116
}
118117
implementation "io.gsonfire:gson-fire:$json_fire_version"
119-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
120118
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
121119
testImplementation "junit:junit:$junit_version"
122120
}

samples/client/petstore/java/retrofit2rx2/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ if(hasProperty('target') && target == 'android') {
9999
ext {
100100
oltu_version = "1.0.1"
101101
retrofit_version = "2.3.0"
102-
jackson_databind_version = "2.15.2"
103102
jakarta_annotation_version = "1.3.5"
104103
swagger_annotations_version = "1.5.22"
105104
junit_version = "4.13.2"
@@ -119,7 +118,6 @@ dependencies {
119118
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
120119
}
121120
implementation "io.gsonfire:gson-fire:$json_fire_version"
122-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
123121
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
124122
testImplementation "junit:junit:$junit_version"
125123
}

samples/client/petstore/java/retrofit2rx3/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ if(hasProperty('target') && target == 'android') {
9999
ext {
100100
oltu_version = "1.0.1"
101101
retrofit_version = "2.3.0"
102-
jackson_databind_version = "2.15.2"
103102
jakarta_annotation_version = "1.3.5"
104103
swagger_annotations_version = "1.5.22"
105104
junit_version = "4.13.2"
@@ -119,7 +118,6 @@ dependencies {
119118
exclude group:'org.apache.oltu.oauth2' , module: 'org.apache.oltu.oauth2.common'
120119
}
121120
implementation "io.gsonfire:gson-fire:$json_fire_version"
122-
implementation "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version"
123121
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
124122
testImplementation "junit:junit:$junit_version"
125123
}

0 commit comments

Comments
 (0)