[Android] update httpclient version, fix compilation issue in the sample (#9728)

* update httpclient version, fix compilation issue in the sample

* add new file
This commit is contained in:
William Cheng
2021-06-09 13:21:10 +08:00
committed by GitHub
parent 8d2d4ac154
commit 85e77e77fc
31 changed files with 354 additions and 217 deletions

View File

@@ -1,7 +1,9 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
@@ -10,3 +12,4 @@ Name | Type | Description | Notes

View File

@@ -1,7 +1,9 @@
# Category
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
@@ -9,3 +11,4 @@ Name | Type | Description | Notes

View File

@@ -1,7 +1,9 @@
# Order
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
@@ -12,10 +14,11 @@ Name | Type | Description | Notes
**complete** | **Boolean** | | [optional]
<a name="StatusEnum"></a>
## Enum: StatusEnum
Name | Value
---- | -----

View File

@@ -1,7 +1,9 @@
# Pet
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
@@ -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
---- | -----

View File

@@ -14,21 +14,23 @@ Method | HTTP request | Description
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
<a name="addPet"></a>
# **addPet**
> addPet(pet)
## addPet
> addPet(body)
Add a new pet to the store
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
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();
@@ -37,9 +39,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -51,16 +54,18 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
## deletePet
<a name="deletePet"></a>
# **deletePet**
> deletePet(petId, apiKey)
Deletes a pet
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -78,6 +83,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| Pet id to delete | [default to null]
@@ -93,11 +99,12 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
## findPetsByStatus
<a name="findPetsByStatus"></a>
# **findPetsByStatus**
> List&lt;Pet&gt; findPetsByStatus(status)
Finds Pets by status
@@ -105,6 +112,7 @@ Finds Pets by status
Multiple status values can be provided with comma separated strings
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -122,6 +130,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for filter | [default to null] [enum: available, pending, sold]
@@ -136,11 +145,12 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
## findPetsByTags
<a name="findPetsByTags"></a>
# **findPetsByTags**
> List&lt;Pet&gt; findPetsByTags(tags)
Finds Pets by tags
@@ -148,6 +158,7 @@ Finds Pets by tags
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -165,6 +176,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | [default to null]
@@ -179,11 +191,12 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
## getPetById
<a name="getPetById"></a>
# **getPetById**
> Pet getPetById(petId)
Find pet by ID
@@ -191,6 +204,7 @@ Find pet by ID
Returns a single pet
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -208,6 +222,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to return | [default to null]
@@ -222,24 +237,26 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
<a name="updatePet"></a>
# **updatePet**
> updatePet(pet)
## updatePet
> updatePet(body)
Update an existing pet
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
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.updatePet(pet);
apiInstance.updatePet(body);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace();
@@ -248,9 +265,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -262,16 +280,18 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
- **Content-Type**: application/json, application/xml
- **Accept**: Not defined
## updatePetWithForm
<a name="updatePetWithForm"></a>
# **updatePetWithForm**
> updatePetWithForm(petId, name, status)
Updates a pet in the store with form data
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -290,6 +310,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be updated | [default to null]
@@ -306,16 +327,18 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: Not defined
## uploadFile
<a name="uploadFile"></a>
# **uploadFile**
> ApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image
### Example
```java
// Import classes:
//import org.openapitools.client.api.PetApi;
@@ -335,6 +358,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to update | [default to null]
@@ -351,6 +375,6 @@ Name | Type | Description | Notes
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
- **Content-Type**: multipart/form-data
- **Accept**: application/json

View File

@@ -10,8 +10,9 @@ Method | HTTP request | Description
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
<a name="deleteOrder"></a>
# **deleteOrder**
## deleteOrder
> deleteOrder(orderId)
Delete purchase order by ID
@@ -19,6 +20,7 @@ Delete purchase order by ID
For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
### Example
```java
// Import classes:
//import org.openapitools.client.api.StoreApi;
@@ -35,6 +37,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of the order that needs to be deleted | [default to null]
@@ -49,11 +52,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
## getInventory
<a name="getInventory"></a>
# **getInventory**
> Map&lt;String, Integer&gt; getInventory()
Returns pet inventories by status
@@ -61,6 +65,7 @@ Returns pet inventories by status
Returns a map of status codes to quantities
### Example
```java
// Import classes:
//import org.openapitools.client.api.StoreApi;
@@ -76,6 +81,7 @@ try {
```
### Parameters
This endpoint does not need any parameter.
### Return type
@@ -88,11 +94,12 @@ This endpoint does not need any parameter.
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
- **Content-Type**: Not defined
- **Accept**: application/json
## getOrderById
<a name="getOrderById"></a>
# **getOrderById**
> Order getOrderById(orderId)
Find purchase order by ID
@@ -100,6 +107,7 @@ Find purchase order by ID
For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
### Example
```java
// Import classes:
//import org.openapitools.client.api.StoreApi;
@@ -117,6 +125,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched | [default to null]
@@ -131,24 +140,26 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(order)
## placeOrder
> Order placeOrder(body)
Place an order for a pet
### Example
```java
// Import classes:
//import org.openapitools.client.api.StoreApi;
StoreApi apiInstance = new StoreApi();
Order order = new Order(); // Order | order placed for purchasing the pet
Order body = new Order(); // Order | order placed for purchasing the pet
try {
Order result = apiInstance.placeOrder(order);
Order result = apiInstance.placeOrder(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -158,9 +169,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -172,6 +184,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json

View File

@@ -1,7 +1,9 @@
# Tag
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
@@ -9,3 +11,4 @@ Name | Type | Description | Notes

View File

@@ -1,7 +1,9 @@
# User
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **Long** | | [optional]
@@ -15,3 +17,4 @@ Name | Type | Description | Notes

View File

@@ -14,23 +14,25 @@ Method | HTTP request | Description
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
<a name="createUser"></a>
# **createUser**
> createUser(user)
## createUser
> createUser(body)
Create user
This can only be done by the logged in user.
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
UserApi apiInstance = new UserApi();
User user = new User(); // User | Created user object
User body = new User(); // User | Created user object
try {
apiInstance.createUser(user);
apiInstance.createUser(body);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace();
@@ -39,9 +41,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**User**](User.md)| Created user object |
**body** | [**User**](User.md)| Created user object |
### Return type
@@ -53,24 +56,26 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(user)
## createUsersWithArrayInput
> createUsersWithArrayInput(body)
Creates list of users with given input array
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
UserApi apiInstance = new UserApi();
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
try {
apiInstance.createUsersWithArrayInput(user);
apiInstance.createUsersWithArrayInput(body);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace();
@@ -79,9 +84,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -93,24 +99,26 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(user)
## createUsersWithListInput
> createUsersWithListInput(body)
Creates list of users with given input array
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
UserApi apiInstance = new UserApi();
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
try {
apiInstance.createUsersWithListInput(user);
apiInstance.createUsersWithListInput(body);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace();
@@ -119,9 +127,10 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -133,11 +142,12 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
## deleteUser
<a name="deleteUser"></a>
# **deleteUser**
> deleteUser(username)
Delete user
@@ -145,6 +155,7 @@ Delete user
This can only be done by the logged in user.
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
@@ -161,6 +172,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be deleted | [default to null]
@@ -175,16 +187,18 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
## getUserByName
<a name="getUserByName"></a>
# **getUserByName**
> User getUserByName(username)
Get user by user name
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
@@ -202,6 +216,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be fetched. Use user1 for testing. | [default to null]
@@ -216,16 +231,18 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
## loginUser
<a name="loginUser"></a>
# **loginUser**
> String loginUser(username, password)
Logs user into the system
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
@@ -244,6 +261,7 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The user name for login | [default to null]
@@ -259,16 +277,18 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
## logoutUser
<a name="logoutUser"></a>
# **logoutUser**
> logoutUser()
Logs out current logged in user session
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
@@ -283,6 +303,7 @@ try {
```
### Parameters
This endpoint does not need any parameter.
### Return type
@@ -295,27 +316,29 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, user)
## updateUser
> updateUser(username, body)
Updated user
This can only be done by the logged in user.
### Example
```java
// Import classes:
//import org.openapitools.client.api.UserApi;
UserApi apiInstance = new UserApi();
String username = null; // String | name that need to be deleted
User user = new User(); // User | Updated user object
User body = new User(); // User | Updated user object
try {
apiInstance.updateUser(username, user);
apiInstance.updateUser(username, body);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace();
@@ -324,10 +347,11 @@ try {
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted | [default to null]
**user** | [**User**](User.md)| Updated user object |
**body** | [**User**](User.md)| Updated user object |
### Return type
@@ -339,6 +363,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
- **Content-Type**: Not defined
- **Accept**: Not defined