Skip to content

Commit e20cb39

Browse files
authored
Merge pull request #9866 from swagger-api/jackson-bump-v1
bump jackson to 2.10.1 and related changes
2 parents f37acad + 4ffdddb commit e20cb39

File tree

200 files changed

+1117
-644
lines changed

Some content is hidden

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

200 files changed

+1117
-644
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
169169

170170

171171
### Prerequisites
172-
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 7 runtime at a minimum):
172+
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
173173

174174
```sh
175175
wget http://central.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.9/swagger-codegen-cli-2.4.9.jar -O swagger-codegen-cli.jar
@@ -186,12 +186,12 @@ brew install swagger-codegen
186186

187187
To build from source, you need the following installed and available in your `$PATH:`
188188

189-
* [Java 7 or 8](http://java.oracle.com)
189+
* [Java 8+](http://java.oracle.com)
190190

191191
* [Apache maven 3.3.3 or greater](http://maven.apache.org/)
192192

193193
#### OS X Users
194-
Don't forget to install Java 7 or 8. You probably have 1.6.
194+
Don't forget to install Java 8+.
195195

196196
Export `JAVA_HOME` in order to use the supported Java version:
197197
```sh

modules/swagger-codegen-maven-plugin/examples/java-client.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119

120120
<properties>
121121
<swagger-annotations-version>1.5.21</swagger-annotations-version>
122-
<jersey-version>2.25.1</jersey-version>
123-
<jackson-version>2.9.10</jackson-version>
122+
<jersey-version>2.29.1</jersey-version>
123+
<jackson-version>2.10.1</jackson-version>
124124
<jodatime-version>2.7</jodatime-version>
125125
<maven-plugin-version>1.0.0</maven-plugin-version>
126126
<junit-version>4.8.1</junit-version>

modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,16 @@ public JavaClientCodegen() {
7474
cliOptions.add(CliOption.newBoolean(USE_GZIP_FEATURE, "Send gzip-encoded requests"));
7575
cliOptions.add(CliOption.newBoolean(USE_RUNTIME_EXCEPTION, "Use RuntimeException instead of Exception"));
7676

77-
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.9.10. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
78-
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.9.10");
79-
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.10");
77+
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.4. JSON processing: Jackson 2.10.1. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
78+
supportedLibraries.put("feign", "HTTP client: OpenFeign 9.4.0. JSON processing: Jackson 2.10.1");
79+
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.29.1. JSON processing: Jackson 2.10.1");
8080
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.8.1. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
8181
supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.3.1 (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.");
8282
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.8.0. JSON processing: Gson 2.6.1 (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)");
83-
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.9.10");
84-
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.9.10");
85-
supportedLibraries.put("vertx", "HTTP client: VertX client 3.2.4. JSON processing: Jackson 2.9.10");
86-
supportedLibraries.put("google-api-client", "HTTP client: Google API client 1.23.0. JSON processing: Jackson 2.9.10");
83+
supportedLibraries.put("resttemplate", "HTTP client: Spring RestTemplate 4.3.9-RELEASE. JSON processing: Jackson 2.10.1");
84+
supportedLibraries.put("resteasy", "HTTP client: Resteasy client 3.1.3.Final. JSON processing: Jackson 2.10.1");
85+
supportedLibraries.put("vertx", "HTTP client: VertX client 3.2.4. JSON processing: Jackson 2.10.1");
86+
supportedLibraries.put("google-api-client", "HTTP client: Google API client 1.23.0. JSON processing: Jackson 2.10.1");
8787
supportedLibraries.put("rest-assured", "HTTP client: rest-assured : 3.1.0. JSON processing: Gson 2.6.1. Only for Java8");
8888

8989
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");

modules/swagger-codegen/src/main/resources/Groovy/build.gradle.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repositories {
2424

2525
ext {
2626
swagger_annotations_version = "1.5.8"
27-
jackson_version = "2.9.10"
27+
jackson_version = "2.10.1"
2828
}
2929

3030
dependencies {

modules/swagger-codegen/src/main/resources/Java/build.gradle.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ if(hasProperty('target') && target == 'android') {
121121

122122
ext {
123123
swagger_annotations_version = "1.5.17"
124-
jackson_version = "{{^threetenbp}}2.9.10{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}"
124+
jackson_version = "{{^threetenbp}}2.10.1{{/threetenbp}}{{#threetenbp}}2.6.4{{/threetenbp}}"
125125
jersey_version = "1.19.4"
126126
jodatime_version = "2.9.9"
127127
junit_version = "4.12"

modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.gradle.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ if(hasProperty('target') && target == 'android') {
101101

102102
ext {
103103
swagger_annotations_version = "1.5.9"
104-
jackson_version = "2.9.10"
104+
jackson_version = "2.10.1"
105105
{{#threetenbp}}
106106
threepane_version = "2.6.4"
107107
{{/threetenbp}}

modules/swagger-codegen/src/main/resources/Java/libraries/feign/build.sbt.mustache

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ lazy val root = (project in file(".")).
1414
"io.github.openfeign" % "feign-jackson" % "9.4.0" % "compile",
1515
"io.github.openfeign" % "feign-slf4j" % "9.4.0" % "compile",
1616
"io.github.openfeign.form" % "feign-form" % "2.1.0" % "compile",
17-
"com.fasterxml.jackson.core" % "jackson-core" % "2.9.10" % "compile",
18-
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.10" % "compile",
19-
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.10" % "compile",
20-
"com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.9.10" % "compile",
17+
"com.fasterxml.jackson.core" % "jackson-core" % "2.10.1" % "compile",
18+
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.1" % "compile",
19+
"com.fasterxml.jackson.core" % "jackson-databind" % "2.10.1" % "compile",
20+
"com.fasterxml.jackson.datatype" % "jackson-datatype-{{^java8}}joda{{/java8}}{{#java8}}jsr310{{/java8}}" % "2.10.1" % "compile",
2121
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
2222
"com.brsanthu" % "migbase64" % "2.2" % "compile",
2323
"junit" % "junit" % "4.12" % "test",

modules/swagger-codegen/src/main/resources/Java/libraries/feign/pom.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@
297297
<swagger-core-version>1.5.18</swagger-core-version>
298298
<feign-version>9.4.0</feign-version>
299299
<feign-form-version>2.1.0</feign-form-version>
300-
<jackson-version>2.9.10</jackson-version>
300+
<jackson-version>2.10.1</jackson-version>
301301
{{#threetenbp}}
302302
<jackson-threetenbp-version>2.6.4</jackson-threetenbp-version>
303303
{{/threetenbp}}

modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public class {{classname}} {
5858
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException {
5959
{{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
6060
TypeReference typeRef = new TypeReference<{{{returnType}}}>() {};
61-
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
61+
return ({{{returnType}}})apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
6262
}
6363

6464
/**{{#summary}}
@@ -77,7 +77,7 @@ public class {{classname}} {
7777
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#bodyParam}}{{^required}}{{{dataType}}} {{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}Map<String, Object> params) throws IOException {
7878
{{#returnType}}HttpResponse response = {{/returnType}}{{operationId}}ForHttpResponse({{#bodyParam}}{{^required}}{{paramName}}, {{/required}}{{/bodyParam}}{{#requiredParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}{{#hasRequiredParams}}, {{/hasRequiredParams}}params);{{#returnType}}
7979
TypeReference typeRef = new TypeReference<{{{returnType}}}>() {};
80-
return apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
80+
return ({{{returnType}}})apiClient.getObjectMapper().readValue(response.getContent(), typeRef);{{/returnType}}
8181
}
8282

8383
public HttpResponse {{operationId}}ForHttpResponse({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws IOException {

modules/swagger-codegen/src/main/resources/Java/libraries/google-api-client/build.gradle.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ if(hasProperty('target') && target == 'android') {
107107

108108
ext {
109109
swagger_annotations_version = "1.5.17"
110-
jackson_version = "2.9.10"
110+
jackson_version = "2.10.1"
111111
google_api_client_version = "1.23.0"
112-
jersey_common_version = "2.25.1"
112+
jersey_common_version = "2.29.1"
113113
jodatime_version = "2.9.9"
114114
junit_version = "4.12"
115115
{{#threetenbp}}

0 commit comments

Comments
 (0)