Skip to content

Commit

Permalink
[Android] update httpclient version, fix compilation issue in the sam…
Browse files Browse the repository at this point in the history
…ple (#9728)

* update httpclient version, fix compilation issue in the sample

* add new file
  • Loading branch information
wing328 authored Jun 9, 2021
1 parent 8d2d4ac commit 85e77e7
Show file tree
Hide file tree
Showing 31 changed files with 354 additions and 217 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ android {
ext {
swagger_annotations_version = "1.5.0"
gson_version = "2.3.1"
httpclient_version = "4.5.2"
httpclient_version = "4.5.13"
httpcore_version = "4.4.4"
junit_version = "4.13"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import java.util.List;
{{#hasModel}}
import {{modelPackage}}.*;
{{/hasModel}}

public class JsonUtil {
public static GsonBuilder gsonBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,6 @@
<junit-version>4.13.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<httpclient-version>4.3.6</httpclient-version>
<httpclient-version>4.5.13</httpclient-version>
</properties>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
.gitignore
README.md
build.gradle
docs/ApiResponse.md
docs/Category.md
docs/Order.md
docs/Pet.md
docs/PetApi.md
docs/StoreApi.md
docs/Tag.md
docs/User.md
docs/UserApi.md
git_push.sh
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.properties
gradlew
gradlew.bat
pom.xml
settings.gradle
src/main/AndroidManifest.xml
src/main/java/org/openapitools/client/ApiException.java
src/main/java/org/openapitools/client/ApiInvoker.java
src/main/java/org/openapitools/client/HttpPatch.java
src/main/java/org/openapitools/client/JsonUtil.java
src/main/java/org/openapitools/client/Pair.java
src/main/java/org/openapitools/client/api/PetApi.java
src/main/java/org/openapitools/client/api/StoreApi.java
src/main/java/org/openapitools/client/api/UserApi.java
src/main/java/org/openapitools/client/model/ApiResponse.java
src/main/java/org/openapitools/client/model/Category.java
src/main/java/org/openapitools/client/model/Order.java
src/main/java/org/openapitools/client/model/Pet.java
src/main/java/org/openapitools/client/model/Tag.java
src/main/java/org/openapitools/client/model/User.java
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0-SNAPSHOT
5.2.0-SNAPSHOT
10 changes: 6 additions & 4 deletions samples/client/petstore/android/httpclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ At first generate the JAR by executing:

Then manually install the following JARs:

* target/openapi-android-client-1.0.0.jar
* target/lib/*.jar
- target/openapi-android-client-1.0.0.jar
- target/lib/*.jar

## Getting Started

Expand All @@ -64,9 +64,9 @@ public class PetApiExample {

public static void main(String[] args) {
PetApi apiInstance = new PetApi();
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
try {
apiInstance.addPet(pet);
apiInstance.addPet(body);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
Expand Down Expand Up @@ -120,11 +120,13 @@ Authentication schemes defined for the API:
### api_key

- **Type**: API key

- **API key parameter name**: api_key
- **Location**: HTTP header

### petstore_auth


- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
Expand Down
4 changes: 2 additions & 2 deletions samples/client/petstore/android/httpclient/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project.version = '1.0.0'

buildscript {
repositories {
mavenCentral()
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
Expand Down Expand Up @@ -51,7 +51,7 @@ android {
ext {
swagger_annotations_version = "1.5.0"
gson_version = "2.3.1"
httpclient_version = "4.5.2"
httpclient_version = "4.5.13"
httpcore_version = "4.4.4"
junit_version = "4.13"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# ApiResponse

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
Expand All @@ -10,3 +12,4 @@ Name | Type | Description | Notes




3 changes: 3 additions & 0 deletions samples/client/petstore/android/httpclient/docs/Category.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@


# Category

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
**name** | **String** | | [optional]




5 changes: 4 additions & 1 deletion samples/client/petstore/android/httpclient/docs/Order.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# Order

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
Expand All @@ -12,10 +14,11 @@ Name | Type | Description | Notes
**complete** | **Boolean** | | [optional]


<a name="StatusEnum"></a>
## Enum: StatusEnum

Name | Value
---- | -----




5 changes: 4 additions & 1 deletion samples/client/petstore/android/httpclient/docs/Pet.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@


# Pet

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
Expand All @@ -12,10 +14,11 @@ Name | Type | Description | Notes
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]


<a name="StatusEnum"></a>
## Enum: StatusEnum

Name | Value
---- | -----




Loading

0 comments on commit 85e77e7

Please sign in to comment.