Skip to content

Commit 5b99f6f

Browse files
committed
[android] Regenerate samples
1 parent a12807d commit 5b99f6f

File tree

15 files changed

+61
-34
lines changed

15 files changed

+61
-34
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.0-SNAPSHOT
1+
7.7.0-SNAPSHOT

samples/client/petstore/android/httpclient/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,6 @@ Class | Method | HTTP request | Description
117117
## Documentation for Authorization
118118

119119
Authentication schemes defined for the API:
120-
### api_key
121-
122-
- **Type**: API key
123-
124-
- **API key parameter name**: api_key
125-
- **Location**: HTTP header
126-
127120
### petstore_auth
128121

129122

@@ -134,6 +127,13 @@ Authentication schemes defined for the API:
134127
- write:pets: modify pets in your account
135128
- read:pets: read your pets
136129

130+
### api_key
131+
132+
- **Type**: API key
133+
134+
- **API key parameter name**: api_key
135+
- **Location**: HTTP header
136+
137137

138138
## Recommendation
139139

samples/client/petstore/android/httpclient/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ android {
5050

5151
ext {
5252
swagger_annotations_version = "1.6.6"
53-
gson_version = "2.8.9"
53+
gson_version = "2.10.1"
5454
httpclient_version = "4.5.13"
5555
httpcore_version = "4.4.4"
5656
junit_version = "4.13"
@@ -75,9 +75,9 @@ afterEvaluate {
7575
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
7676
task.description = "Create jar artifact for ${variant.name}"
7777
task.dependsOn variant.javaCompile
78-
task.from variant.javaCompile.destinationDir
79-
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
80-
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
78+
task.from variant.javaCompile.destinationDirectory
79+
task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
80+
task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar"
8181
artifacts.add('archives', task);
8282
}
8383
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/client/petstore/android/httpclient/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@
3939
<artifactId>maven-surefire-plugin</artifactId>
4040
<version>2.12</version>
4141
<configuration>
42-
<systemProperties>
42+
<systemPropertyVariables>
4343
<property>
4444
<name>loggerPath</name>
4545
<value>conf/log4j.properties</value>
4646
</property>
47-
</systemProperties>
47+
</systemPropertyVariables>
4848
<argLine>-Xms512m -Xmx1500m</argLine>
4949
<parallel>methods</parallel>
5050
<forkMode>pertest</forkMode>
@@ -172,7 +172,7 @@
172172
<properties>
173173
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
174174
<swagger-core-version>1.6.6</swagger-core-version>
175-
<gson-version>2.8.9</gson-version>
175+
<gson-version>2.10.1</gson-version>
176176
<maven-plugin-version>1.0.0</maven-plugin-version>
177177
<junit-version>4.13.2</junit-version>
178178
<httpclient-version>4.5.13</httpclient-version>

samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/ApiException.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@ public String getMessage() {
3838
public void setMessage(String message) {
3939
this.message = message;
4040
}
41+
42+
@Override
43+
public String toString() {
44+
return "ApiException{" +
45+
"code=" + code +
46+
", message=" + message +
47+
'}';
48+
}
4149
}

samples/client/petstore/android/httpclient/src/main/java/org/openapitools/client/api/PetApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
import org.openapitools.client.model.ApiResponse;
2424
import java.io.File;
25+
import java.util.*;
2526
import org.openapitools.client.model.Pet;
2627

2728
import org.apache.http.entity.mime.MultipartEntityBuilder;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0.0-SNAPSHOT
1+
7.7.0-SNAPSHOT

samples/client/petstore/android/volley/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,6 @@ Class | Method | HTTP request | Description
117117
## Documentation for Authorization
118118

119119
Authentication schemes defined for the API:
120-
### api_key
121-
122-
- **Type**: API key
123-
124-
- **API key parameter name**: api_key
125-
- **Location**: HTTP header
126-
127120
### petstore_auth
128121

129122

@@ -134,6 +127,13 @@ Authentication schemes defined for the API:
134127
- write:pets: modify pets in your account
135128
- read:pets: read your pets
136129

130+
### api_key
131+
132+
- **Type**: API key
133+
134+
- **API key parameter name**: api_key
135+
- **Location**: HTTP header
136+
137137

138138
## Recommendation
139139

samples/client/petstore/android/volley/build.gradle

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ android {
4141
lintOptions {
4242
abortOnError false
4343
}
44+
packagingOptions {
45+
resources.excludes += "META-INF/DEPENDENCIES"
46+
}
4447

4548
// Rename the aar correctly
4649
libraryVariants.all { variant ->
@@ -58,8 +61,9 @@ android {
5861

5962
ext {
6063
swagger_annotations_version = "1.6.6"
61-
gson_version = "2.8.9"
62-
httpmime_version = "4.5.13"
64+
gson_version = "2.10.1"
65+
httpcore_version = "4.4.16"
66+
httpmime_version = "4.5.14"
6367
volley_version = "1.2.1"
6468
junit_version = "4.13.2"
6569
robolectric_version = "4.5.1"
@@ -69,7 +73,12 @@ ext {
6973
dependencies {
7074
implementation "io.swagger:swagger-annotations:$swagger_annotations_version"
7175
implementation "com.google.code.gson:gson:$gson_version"
72-
implementation "org.apache.httpcomponents:httpmime:$httpmime_version"
76+
implementation ("org.apache.httpcomponents:httpcore:$httpcore_version") {
77+
exclude(group: "org.apache.httpcomponents", module: "httpclient")
78+
}
79+
implementation ("org.apache.httpcomponents:httpmime:$httpmime_version") {
80+
exclude(group: "org.apache.httpcomponents", module: "httpclient")
81+
}
7382
implementation "com.android.volley:volley:${volley_version}"
7483
testImplementation "junit:junit:$junit_version"
7584
testImplementation "org.robolectric:robolectric:${robolectric_version}"
@@ -81,9 +90,9 @@ afterEvaluate {
8190
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
8291
task.description = "Create jar artifact for ${variant.name}"
8392
task.dependsOn variant.javaCompile
84-
task.from variant.javaCompile.destinationDir
85-
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
86-
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
93+
task.from variant.javaCompile.destinationDirectory
94+
task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
95+
task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar"
8796
artifacts.add('archives', task);
8897
}
8998
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

samples/client/petstore/android/volley/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
<properties>
5555
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5656
<swagger-annotations-version>1.6.6</swagger-annotations-version>
57-
<httpcomponents-httpmime-version>4.5.13</httpcomponents-httpmime-version>
58-
<google-code-gson-version>2.8.9</google-code-gson-version>
57+
<httpcomponents-httpmime-version>4.5.14</httpcomponents-httpmime-version>
58+
<google-code-gson-version>2.10.1</google-code-gson-version>
5959
<volley-library-version>1.2.1</volley-library-version>
6060
<android-platform-version>4.1.1.4</android-platform-version>
6161
</properties>

samples/client/petstore/android/volley/src/main/java/org/openapitools/client/ApiException.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,12 @@ public String getMessage() {
5858
public void setMessage(String message) {
5959
this.message = message;
6060
}
61+
62+
@Override
63+
public String toString() {
64+
return "ApiException{" +
65+
"code=" + code +
66+
", message=" + message +
67+
'}';
68+
}
6169
}

samples/client/petstore/android/volley/src/main/java/org/openapitools/client/ApiInvoker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ public static void initializeInstance(Cache cache, Network network, int threadPo
203203

204204
// Setup authentications (key: authentication name, value: authentication).
205205
INSTANCE.authentications = new HashMap<String, Authentication>();
206-
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
207206
// TODO: comment out below as OAuth does not exist
208207
//INSTANCE.authentications.put("petstore_auth", new OAuth());
208+
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
209209
// Prevent the authentications from being modified.
210210
INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications);
211211
}

samples/client/petstore/android/volley/src/main/java/org/openapitools/client/api/PetApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
import org.openapitools.client.model.ApiResponse;
2727
import java.io.File;
28+
import java.util.*;
2829
import org.openapitools.client.model.Pet;
2930

3031
import org.apache.http.HttpEntity;

0 commit comments

Comments
 (0)