forked from loafle/openapi-generator-original
Update Android Petstore (httpclient, volley) with OAS2, OAS3 (#145)
* restore android samples from codegen 2x * update android volley with oas2 * update android volley oas3 * update android http client petstore (oas2) * update android httpclient petstore (oas3)
This commit is contained in:
parent
80d10e2cba
commit
c20352caab
31
bin/openapi3/android-petstore-httpclient.sh
Executable file
31
bin/openapi3/android-petstore-httpclient.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l android -Dlibrary=httpclient -o samples/client/petstore/android/httpclient $@"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
31
bin/openapi3/android-petstore-volley.sh
Executable file
31
bin/openapi3/android-petstore-volley.sh
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
while [ -h "$SCRIPT" ] ; do
|
||||||
|
ls=`ls -ld "$SCRIPT"`
|
||||||
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
|
SCRIPT="$link"
|
||||||
|
else
|
||||||
|
SCRIPT=`dirname "$SCRIPT"`/"$link"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ ! -d "${APP_DIR}" ]; then
|
||||||
|
APP_DIR=`dirname "$SCRIPT"`/..
|
||||||
|
APP_DIR=`cd "${APP_DIR}"; pwd`
|
||||||
|
fi
|
||||||
|
|
||||||
|
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -l android -c bin/android-petstore-volley.json -o samples/client/petstore/android/volley"
|
||||||
|
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
@ -1 +1 @@
|
|||||||
2.3.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
@ -64,9 +64,9 @@ public class PetApiExample {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.addPet(body);
|
apiInstance.addPet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#addPet");
|
System.err.println("Exception when calling PetApi#addPet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -16,21 +16,19 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
<a name="addPet"></a>
|
<a name="addPet"></a>
|
||||||
# **addPet**
|
# **addPet**
|
||||||
> addPet(body)
|
> addPet(pet)
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.addPet(body);
|
apiInstance.addPet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#addPet");
|
System.err.println("Exception when calling PetApi#addPet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -41,7 +39,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -53,8 +51,8 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="deletePet"></a>
|
<a name="deletePet"></a>
|
||||||
# **deletePet**
|
# **deletePet**
|
||||||
@ -62,15 +60,13 @@ null (empty response body)
|
|||||||
|
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | Pet id to delete
|
Long petId = 56L; // Long | Pet id to delete
|
||||||
String apiKey = "apiKey_example"; // String |
|
String apiKey = "apiKey_example"; // String |
|
||||||
try {
|
try {
|
||||||
apiInstance.deletePet(petId, apiKey);
|
apiInstance.deletePet(petId, apiKey);
|
||||||
@ -98,7 +94,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="findPetsByStatus"></a>
|
<a name="findPetsByStatus"></a>
|
||||||
# **findPetsByStatus**
|
# **findPetsByStatus**
|
||||||
@ -200,7 +196,7 @@ Returns a single pet
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet to return
|
Long petId = 56L; // Long | ID of pet to return
|
||||||
try {
|
try {
|
||||||
Pet result = apiInstance.getPetById(petId);
|
Pet result = apiInstance.getPetById(petId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -231,21 +227,19 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
<a name="updatePet"></a>
|
<a name="updatePet"></a>
|
||||||
# **updatePet**
|
# **updatePet**
|
||||||
> updatePet(body)
|
> updatePet(pet)
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.updatePet(body);
|
apiInstance.updatePet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#updatePet");
|
System.err.println("Exception when calling PetApi#updatePet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -256,7 +250,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -268,8 +262,8 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="updatePetWithForm"></a>
|
<a name="updatePetWithForm"></a>
|
||||||
# **updatePetWithForm**
|
# **updatePetWithForm**
|
||||||
@ -277,15 +271,13 @@ null (empty response body)
|
|||||||
|
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet that needs to be updated
|
Long petId = 56L; // Long | ID of pet that needs to be updated
|
||||||
String name = "name_example"; // String | Updated name of the pet
|
String name = "name_example"; // String | Updated name of the pet
|
||||||
String status = "status_example"; // String | Updated status of the pet
|
String status = "status_example"; // String | Updated status of the pet
|
||||||
try {
|
try {
|
||||||
@ -315,7 +307,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="uploadFile"></a>
|
<a name="uploadFile"></a>
|
||||||
# **uploadFile**
|
# **uploadFile**
|
||||||
@ -323,17 +315,15 @@ null (empty response body)
|
|||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet to update
|
Long petId = 56L; // Long | ID of pet to update
|
||||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
File file = new File("/path/to/file"); // File | file to upload
|
||||||
try {
|
try {
|
||||||
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
|
@ -50,7 +50,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="getInventory"></a>
|
<a name="getInventory"></a>
|
||||||
# **getInventory**
|
# **getInventory**
|
||||||
@ -80,7 +80,7 @@ This endpoint does not need any parameter.
|
|||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
[**Map<String, Integer>**](Map.md)
|
**Map<String, Integer>**
|
||||||
|
|
||||||
### Authorization
|
### Authorization
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
|||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi();
|
StoreApi apiInstance = new StoreApi();
|
||||||
Long orderId = 789L; // Long | ID of pet that needs to be fetched
|
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||||
try {
|
try {
|
||||||
Order result = apiInstance.getOrderById(orderId);
|
Order result = apiInstance.getOrderById(orderId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -119,7 +119,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
**orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -136,21 +136,19 @@ No authorization required
|
|||||||
|
|
||||||
<a name="placeOrder"></a>
|
<a name="placeOrder"></a>
|
||||||
# **placeOrder**
|
# **placeOrder**
|
||||||
> Order placeOrder(body)
|
> Order placeOrder(order)
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi();
|
StoreApi apiInstance = new StoreApi();
|
||||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
Order order = new Order(); // Order | order placed for purchasing the pet
|
||||||
try {
|
try {
|
||||||
Order result = apiInstance.placeOrder(body);
|
Order result = apiInstance.placeOrder(order);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||||
@ -162,7 +160,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -174,6 +172,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
<a name="createUser"></a>
|
<a name="createUser"></a>
|
||||||
# **createUser**
|
# **createUser**
|
||||||
> createUser(body)
|
> createUser(user)
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ This can only be done by the logged in user.
|
|||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
User body = new User(); // User | Created user object
|
User user = new User(); // User | Created user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUser(body);
|
apiInstance.createUser(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUser");
|
System.err.println("Exception when calling UserApi#createUser");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -41,7 +41,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object |
|
**user** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -53,26 +53,24 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="createUsersWithArrayInput"></a>
|
<a name="createUsersWithArrayInput"></a>
|
||||||
# **createUsersWithArrayInput**
|
# **createUsersWithArrayInput**
|
||||||
> createUsersWithArrayInput(body)
|
> createUsersWithArrayInput(user)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUsersWithArrayInput(body);
|
apiInstance.createUsersWithArrayInput(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -83,7 +81,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
**user** | [**List<User>**](List.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -96,25 +94,23 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="createUsersWithListInput"></a>
|
<a name="createUsersWithListInput"></a>
|
||||||
# **createUsersWithListInput**
|
# **createUsersWithListInput**
|
||||||
> createUsersWithListInput(body)
|
> createUsersWithListInput(user)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUsersWithListInput(body);
|
apiInstance.createUsersWithListInput(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -125,7 +121,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
**user** | [**List<User>**](List.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -138,7 +134,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="deleteUser"></a>
|
<a name="deleteUser"></a>
|
||||||
# **deleteUser**
|
# **deleteUser**
|
||||||
@ -180,7 +176,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="getUserByName"></a>
|
<a name="getUserByName"></a>
|
||||||
# **getUserByName**
|
# **getUserByName**
|
||||||
@ -188,15 +184,13 @@ No authorization required
|
|||||||
|
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||||
try {
|
try {
|
||||||
User result = apiInstance.getUserByName(username);
|
User result = apiInstance.getUserByName(username);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -210,7 +204,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -231,8 +225,6 @@ No authorization required
|
|||||||
|
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
@ -276,8 +268,6 @@ No authorization required
|
|||||||
|
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
@ -306,11 +296,11 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="updateUser"></a>
|
<a name="updateUser"></a>
|
||||||
# **updateUser**
|
# **updateUser**
|
||||||
> updateUser(username, body)
|
> updateUser(username, user)
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
@ -323,9 +313,9 @@ This can only be done by the logged in user.
|
|||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
String username = "username_example"; // String | name that need to be deleted
|
String username = "username_example"; // String | name that need to be deleted
|
||||||
User body = new User(); // User | Updated user object
|
User user = new User(); // User | Updated user object
|
||||||
try {
|
try {
|
||||||
apiInstance.updateUser(username, body);
|
apiInstance.updateUser(username, user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#updateUser");
|
System.err.println("Exception when calling UserApi#updateUser");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -337,7 +327,7 @@ try {
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| name that need to be deleted |
|
**username** | **String**| name that need to be deleted |
|
||||||
**body** | [**User**](User.md)| Updated user object |
|
**user** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -349,6 +339,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
|||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
else
|
else
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
@ -1,155 +1,175 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-android-client</artifactId>
|
<artifactId>swagger-android-client</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>swagger-android-client</name>
|
<name>swagger-android-client</name>
|
||||||
<version>1.0.0</version>
|
<version>1.0.0</version>
|
||||||
<scm>
|
<scm>
|
||||||
<connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection>
|
<connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection>
|
||||||
<developerConnection>scm:git:git@github.com:swagger-api/swagger-codegen.git</developerConnection>
|
<developerConnection>scm:git:git@github.com:swagger-api/swagger-codegen.git</developerConnection>
|
||||||
<url>https://github.com/swagger-api/swagger-codegen</url>
|
<url>https://github.com/swagger-api/swagger-codegen</url>
|
||||||
</scm>
|
</scm>
|
||||||
<prerequisites>
|
|
||||||
<maven>2.2.0</maven>
|
|
||||||
</prerequisites>
|
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-enforcer-plugin</artifactId>
|
||||||
<version>2.12</version>
|
<version>3.0.0-M1</version>
|
||||||
<configuration>
|
<executions>
|
||||||
<systemProperties>
|
<execution>
|
||||||
<property>
|
<id>enforce-maven</id>
|
||||||
<name>loggerPath</name>
|
<goals>
|
||||||
<value>conf/log4j.properties</value>
|
<goal>enforce</goal>
|
||||||
</property>
|
</goals>
|
||||||
</systemProperties>
|
<configuration>
|
||||||
<argLine>-Xms512m -Xmx1500m</argLine>
|
<rules>
|
||||||
<parallel>methods</parallel>
|
<requireMavenVersion>
|
||||||
<forkMode>pertest</forkMode>
|
<version>2.2.0</version>
|
||||||
</configuration>
|
</requireMavenVersion>
|
||||||
</plugin>
|
</rules>
|
||||||
<plugin>
|
</configuration>
|
||||||
<artifactId>maven-dependency-plugin</artifactId>
|
</execution>
|
||||||
<executions>
|
</executions>
|
||||||
<execution>
|
</plugin>
|
||||||
<phase>package</phase>
|
<plugin>
|
||||||
<goals>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<goal>copy-dependencies</goal>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
</goals>
|
<version>2.12</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
<systemProperties>
|
||||||
</configuration>
|
<property>
|
||||||
</execution>
|
<name>loggerPath</name>
|
||||||
</executions>
|
<value>conf/log4j.properties</value>
|
||||||
</plugin>
|
</property>
|
||||||
|
</systemProperties>
|
||||||
|
<argLine>-Xms512m -Xmx1500m</argLine>
|
||||||
|
<parallel>methods</parallel>
|
||||||
|
<forkMode>pertest</forkMode>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>copy-dependencies</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
<!-- attach test jar -->
|
<!-- attach test jar -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>2.2</version>
|
<version>2.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>jar</goal>
|
<goal>jar</goal>
|
||||||
<goal>test-jar</goal>
|
<goal>test-jar</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
<configuration>
|
<configuration>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>add_sources</id>
|
<id>add_sources</id>
|
||||||
<phase>generate-sources</phase>
|
<phase>generate-sources</phase>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>add-source</goal>
|
<goal>add-source</goal>
|
||||||
</goals>
|
</goals>
|
||||||
<configuration>
|
<configuration>
|
||||||
<sources>
|
<sources>
|
||||||
<source>src/main/java</source>
|
<source>
|
||||||
</sources>
|
src/main/java</source>
|
||||||
</configuration>
|
</sources>
|
||||||
</execution>
|
</configuration>
|
||||||
<execution>
|
</execution>
|
||||||
<id>add_test_sources</id>
|
<execution>
|
||||||
<phase>generate-test-sources</phase>
|
<id>add_test_sources</id>
|
||||||
<goals>
|
<phase>generate-test-sources</phase>
|
||||||
<goal>add-test-source</goal>
|
<goals>
|
||||||
</goals>
|
<goal>add-test-source</goal>
|
||||||
<configuration>
|
</goals>
|
||||||
<sources>
|
<configuration>
|
||||||
<source>src/test/java</source>
|
<sources>
|
||||||
</sources>
|
<source>
|
||||||
</configuration>
|
src/test/java</source>
|
||||||
</execution>
|
</sources>
|
||||||
</executions>
|
</configuration>
|
||||||
</plugin>
|
</execution>
|
||||||
<plugin>
|
</executions>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
</plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<plugin>
|
||||||
<version>3.6.1</version>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<configuration>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<source>1.7</source>
|
<version>3.6.1</version>
|
||||||
<target>1.7</target>
|
<configuration>
|
||||||
</configuration>
|
<source>1.7</source>
|
||||||
</plugin>
|
<target>1.7</target>
|
||||||
</plugins>
|
</configuration>
|
||||||
</build>
|
</plugin>
|
||||||
<dependencies>
|
</plugins>
|
||||||
<dependency>
|
</build>
|
||||||
<groupId>io.swagger</groupId>
|
<dependencies>
|
||||||
<artifactId>swagger-annotations</artifactId>
|
<dependency>
|
||||||
<version>${swagger-core-version}</version>
|
<groupId>io.swagger</groupId>
|
||||||
</dependency>
|
<artifactId>swagger-annotations</artifactId>
|
||||||
<dependency>
|
<version>${swagger-core-version}</version>
|
||||||
<groupId>com.google.code.gson</groupId>
|
</dependency>
|
||||||
<artifactId>gson</artifactId>
|
<dependency>
|
||||||
<version>${gson-version}</version>
|
<groupId>com.google.code.gson</groupId>
|
||||||
</dependency>
|
<artifactId>gson</artifactId>
|
||||||
<dependency>
|
<version>${gson-version}</version>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
</dependency>
|
||||||
<artifactId>httpclient</artifactId>
|
<dependency>
|
||||||
<version>${httpclient-version}</version>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<scope>compile</scope>
|
<artifactId>httpclient</artifactId>
|
||||||
</dependency>
|
<version>${httpclient-version}</version>
|
||||||
<dependency>
|
<scope>compile</scope>
|
||||||
<groupId>org.apache.httpcomponents</groupId>
|
</dependency>
|
||||||
<artifactId>httpmime</artifactId>
|
<dependency>
|
||||||
<version>${httpclient-version}</version>
|
<groupId>org.apache.httpcomponents</groupId>
|
||||||
<scope>compile</scope>
|
<artifactId>httpmime</artifactId>
|
||||||
</dependency>
|
<version>${httpclient-version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- test dependencies -->
|
<!-- test dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>junit</groupId>
|
<groupId>junit</groupId>
|
||||||
<artifactId>junit</artifactId>
|
<artifactId>junit</artifactId>
|
||||||
<version>${junit-version}</version>
|
<version>${junit-version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>sonatype-snapshots</id>
|
<id>sonatype-snapshots</id>
|
||||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||||
</repository>
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
<properties>
|
<properties>
|
||||||
<swagger-core-version>1.5.18</swagger-core-version>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<gson-version>2.3.1</gson-version>
|
<swagger-core-version>1.5.18</swagger-core-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<gson-version>2.3.1</gson-version>
|
||||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
<junit-version>4.8.1</junit-version>
|
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||||
<httpclient-version>4.3.6</httpclient-version>
|
<junit-version>4.8.1</junit-version>
|
||||||
</properties>
|
<httpclient-version>4.3.6</httpclient-version>
|
||||||
|
</properties>
|
||||||
</project>
|
</project>
|
||||||
|
@ -53,14 +53,14 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void addPet (Pet body) throws ApiException {
|
public void addPet (Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = pet;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -76,7 +76,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
"application/json","application/xml"
|
|
||||||
};
|
};
|
||||||
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -317,14 +317,14 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void updatePet (Pet body) throws ApiException {
|
public void updatePet (Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = pet;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -340,7 +340,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
"application/json","application/xml"
|
|
||||||
};
|
};
|
||||||
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ public class StoreApi {
|
|||||||
try {
|
try {
|
||||||
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
|
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
|
||||||
if(localVarResponse != null){
|
if(localVarResponse != null){
|
||||||
return (Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Map.class);
|
return (Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Integer.class);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return null;
|
return null;
|
||||||
@ -203,14 +203,14 @@ public class StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param order order placed for purchasing the pet
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public Order placeOrder (Order body) throws ApiException {
|
public Order placeOrder (Order order) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = order;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'order' is set
|
||||||
if (body == null) {
|
if (order == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -226,7 +226,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -52,14 +52,14 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param user Created user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUser (User body) throws ApiException {
|
public void createUser (User user) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -75,7 +75,7 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -104,14 +104,14 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput (List<User> body) throws ApiException {
|
public void createUsersWithArrayInput (List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -156,14 +156,14 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUsersWithListInput (List<User> body) throws ApiException {
|
public void createUsersWithListInput (List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -260,7 +260,7 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public User getUserByName (String username) throws ApiException {
|
public User getUserByName (String username) throws ApiException {
|
||||||
@ -419,18 +419,18 @@ public class UserApi {
|
|||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted
|
||||||
* @param body Updated user object
|
* @param user Updated user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void updateUser (String username, User body) throws ApiException {
|
public void updateUser (String username, User user) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
Object localVarPostBody = user;
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||||
}
|
}
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -446,7 +446,7 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] localVarContentTypes = {
|
String[] localVarContentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2.3.0-SNAPSHOT
|
3.0.0-SNAPSHOT
|
@ -64,9 +64,9 @@ public class PetApiExample {
|
|||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.addPet(body);
|
apiInstance.addPet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#addPet");
|
System.err.println("Exception when calling PetApi#addPet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -16,21 +16,19 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
<a name="addPet"></a>
|
<a name="addPet"></a>
|
||||||
# **addPet**
|
# **addPet**
|
||||||
> addPet(body)
|
> addPet(pet)
|
||||||
|
|
||||||
Add a new pet to the store
|
Add a new pet to the store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.addPet(body);
|
apiInstance.addPet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#addPet");
|
System.err.println("Exception when calling PetApi#addPet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -41,7 +39,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -53,8 +51,8 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="deletePet"></a>
|
<a name="deletePet"></a>
|
||||||
# **deletePet**
|
# **deletePet**
|
||||||
@ -62,15 +60,13 @@ null (empty response body)
|
|||||||
|
|
||||||
Deletes a pet
|
Deletes a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | Pet id to delete
|
Long petId = 56L; // Long | Pet id to delete
|
||||||
String apiKey = "apiKey_example"; // String |
|
String apiKey = "apiKey_example"; // String |
|
||||||
try {
|
try {
|
||||||
apiInstance.deletePet(petId, apiKey);
|
apiInstance.deletePet(petId, apiKey);
|
||||||
@ -98,7 +94,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="findPetsByStatus"></a>
|
<a name="findPetsByStatus"></a>
|
||||||
# **findPetsByStatus**
|
# **findPetsByStatus**
|
||||||
@ -200,7 +196,7 @@ Returns a single pet
|
|||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet to return
|
Long petId = 56L; // Long | ID of pet to return
|
||||||
try {
|
try {
|
||||||
Pet result = apiInstance.getPetById(petId);
|
Pet result = apiInstance.getPetById(petId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -231,21 +227,19 @@ Name | Type | Description | Notes
|
|||||||
|
|
||||||
<a name="updatePet"></a>
|
<a name="updatePet"></a>
|
||||||
# **updatePet**
|
# **updatePet**
|
||||||
> updatePet(body)
|
> updatePet(pet)
|
||||||
|
|
||||||
Update an existing pet
|
Update an existing pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||||
try {
|
try {
|
||||||
apiInstance.updatePet(body);
|
apiInstance.updatePet(pet);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling PetApi#updatePet");
|
System.err.println("Exception when calling PetApi#updatePet");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -256,7 +250,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
**pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -268,8 +262,8 @@ null (empty response body)
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/json, application/xml
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="updatePetWithForm"></a>
|
<a name="updatePetWithForm"></a>
|
||||||
# **updatePetWithForm**
|
# **updatePetWithForm**
|
||||||
@ -277,15 +271,13 @@ null (empty response body)
|
|||||||
|
|
||||||
Updates a pet in the store with form data
|
Updates a pet in the store with form data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet that needs to be updated
|
Long petId = 56L; // Long | ID of pet that needs to be updated
|
||||||
String name = "name_example"; // String | Updated name of the pet
|
String name = "name_example"; // String | Updated name of the pet
|
||||||
String status = "status_example"; // String | Updated status of the pet
|
String status = "status_example"; // String | Updated status of the pet
|
||||||
try {
|
try {
|
||||||
@ -315,7 +307,7 @@ null (empty response body)
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: application/x-www-form-urlencoded
|
- **Content-Type**: application/x-www-form-urlencoded
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="uploadFile"></a>
|
<a name="uploadFile"></a>
|
||||||
# **uploadFile**
|
# **uploadFile**
|
||||||
@ -323,17 +315,15 @@ null (empty response body)
|
|||||||
|
|
||||||
uploads an image
|
uploads an image
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.PetApi;
|
//import io.swagger.client.api.PetApi;
|
||||||
|
|
||||||
PetApi apiInstance = new PetApi();
|
PetApi apiInstance = new PetApi();
|
||||||
Long petId = 789L; // Long | ID of pet to update
|
Long petId = 56L; // Long | ID of pet to update
|
||||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||||
File file = new File("/path/to/file.txt"); // File | file to upload
|
File file = new File("/path/to/file"); // File | file to upload
|
||||||
try {
|
try {
|
||||||
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
|
@ -50,7 +50,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="getInventory"></a>
|
<a name="getInventory"></a>
|
||||||
# **getInventory**
|
# **getInventory**
|
||||||
@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other val
|
|||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi();
|
StoreApi apiInstance = new StoreApi();
|
||||||
Long orderId = 789L; // Long | ID of pet that needs to be fetched
|
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||||
try {
|
try {
|
||||||
Order result = apiInstance.getOrderById(orderId);
|
Order result = apiInstance.getOrderById(orderId);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -119,7 +119,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
**orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -136,21 +136,19 @@ No authorization required
|
|||||||
|
|
||||||
<a name="placeOrder"></a>
|
<a name="placeOrder"></a>
|
||||||
# **placeOrder**
|
# **placeOrder**
|
||||||
> Order placeOrder(body)
|
> Order placeOrder(order)
|
||||||
|
|
||||||
Place an order for a pet
|
Place an order for a pet
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.StoreApi;
|
//import io.swagger.client.api.StoreApi;
|
||||||
|
|
||||||
StoreApi apiInstance = new StoreApi();
|
StoreApi apiInstance = new StoreApi();
|
||||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
Order order = new Order(); // Order | order placed for purchasing the pet
|
||||||
try {
|
try {
|
||||||
Order result = apiInstance.placeOrder(body);
|
Order result = apiInstance.placeOrder(order);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||||
@ -162,7 +160,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
|
**order** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -174,6 +172,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: application/xml, application/json
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ Method | HTTP request | Description
|
|||||||
|
|
||||||
<a name="createUser"></a>
|
<a name="createUser"></a>
|
||||||
# **createUser**
|
# **createUser**
|
||||||
> createUser(body)
|
> createUser(user)
|
||||||
|
|
||||||
Create user
|
Create user
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ This can only be done by the logged in user.
|
|||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
User body = new User(); // User | Created user object
|
User user = new User(); // User | Created user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUser(body);
|
apiInstance.createUser(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUser");
|
System.err.println("Exception when calling UserApi#createUser");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -41,7 +41,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**User**](User.md)| Created user object |
|
**user** | [**User**](User.md)| Created user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -53,26 +53,24 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="createUsersWithArrayInput"></a>
|
<a name="createUsersWithArrayInput"></a>
|
||||||
# **createUsersWithArrayInput**
|
# **createUsersWithArrayInput**
|
||||||
> createUsersWithArrayInput(body)
|
> createUsersWithArrayInput(user)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUsersWithArrayInput(body);
|
apiInstance.createUsersWithArrayInput(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -83,7 +81,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
**user** | [**List<User>**](List.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -96,25 +94,23 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="createUsersWithListInput"></a>
|
<a name="createUsersWithListInput"></a>
|
||||||
# **createUsersWithListInput**
|
# **createUsersWithListInput**
|
||||||
> createUsersWithListInput(body)
|
> createUsersWithListInput(user)
|
||||||
|
|
||||||
Creates list of users with given input array
|
Creates list of users with given input array
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
List<User> body = Arrays.asList(new User()); // List<User> | List of user object
|
List<User> user = Arrays.asList(new List()); // List<User> | List of user object
|
||||||
try {
|
try {
|
||||||
apiInstance.createUsersWithListInput(body);
|
apiInstance.createUsersWithListInput(user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -125,7 +121,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**body** | [**List<User>**](User.md)| List of user object |
|
**user** | [**List<User>**](List.md)| List of user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -138,7 +134,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="deleteUser"></a>
|
<a name="deleteUser"></a>
|
||||||
# **deleteUser**
|
# **deleteUser**
|
||||||
@ -180,7 +176,7 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="getUserByName"></a>
|
<a name="getUserByName"></a>
|
||||||
# **getUserByName**
|
# **getUserByName**
|
||||||
@ -188,15 +184,13 @@ No authorization required
|
|||||||
|
|
||||||
Get user by user name
|
Get user by user name
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
//import io.swagger.client.api.UserApi;
|
//import io.swagger.client.api.UserApi;
|
||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||||
try {
|
try {
|
||||||
User result = apiInstance.getUserByName(username);
|
User result = apiInstance.getUserByName(username);
|
||||||
System.out.println(result);
|
System.out.println(result);
|
||||||
@ -210,7 +204,7 @@ try {
|
|||||||
|
|
||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -231,8 +225,6 @@ No authorization required
|
|||||||
|
|
||||||
Logs user into the system
|
Logs user into the system
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
@ -276,8 +268,6 @@ No authorization required
|
|||||||
|
|
||||||
Logs out current logged in user session
|
Logs out current logged in user session
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
```java
|
```java
|
||||||
// Import classes:
|
// Import classes:
|
||||||
@ -306,11 +296,11 @@ No authorization required
|
|||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: Not defined
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
<a name="updateUser"></a>
|
<a name="updateUser"></a>
|
||||||
# **updateUser**
|
# **updateUser**
|
||||||
> updateUser(username, body)
|
> updateUser(username, user)
|
||||||
|
|
||||||
Updated user
|
Updated user
|
||||||
|
|
||||||
@ -323,9 +313,9 @@ This can only be done by the logged in user.
|
|||||||
|
|
||||||
UserApi apiInstance = new UserApi();
|
UserApi apiInstance = new UserApi();
|
||||||
String username = "username_example"; // String | name that need to be deleted
|
String username = "username_example"; // String | name that need to be deleted
|
||||||
User body = new User(); // User | Updated user object
|
User user = new User(); // User | Updated user object
|
||||||
try {
|
try {
|
||||||
apiInstance.updateUser(username, body);
|
apiInstance.updateUser(username, user);
|
||||||
} catch (ApiException e) {
|
} catch (ApiException e) {
|
||||||
System.err.println("Exception when calling UserApi#updateUser");
|
System.err.println("Exception when calling UserApi#updateUser");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -337,7 +327,7 @@ try {
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------- | ------------- | ------------- | -------------
|
------------- | ------------- | ------------- | -------------
|
||||||
**username** | **String**| name that need to be deleted |
|
**username** | **String**| name that need to be deleted |
|
||||||
**body** | [**User**](User.md)| Updated user object |
|
**user** | [**User**](User.md)| Updated user object |
|
||||||
|
|
||||||
### Return type
|
### Return type
|
||||||
|
|
||||||
@ -349,6 +339,6 @@ No authorization required
|
|||||||
|
|
||||||
### HTTP request headers
|
### HTTP request headers
|
||||||
|
|
||||||
- **Content-Type**: Not defined
|
- **Content-Type**: application/json
|
||||||
- **Accept**: application/xml, application/json
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ git_remote=`git remote`
|
|||||||
if [ "$git_remote" = "" ]; then # git remote not defined
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
||||||
|
|
||||||
if [ "$GIT_TOKEN" = "" ]; then
|
if [ "$GIT_TOKEN" = "" ]; then
|
||||||
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
||||||
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
||||||
else
|
else
|
||||||
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
||||||
|
@ -60,15 +60,15 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void addPet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void addPet (Pet pet) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = pet;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
|
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling addPet",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
|
new ApiException(400, "Missing the required parameter 'pet' when calling addPet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -81,8 +81,6 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -124,15 +122,15 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Add a new pet to the store
|
* Add a new pet to the store
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
public void addPet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void addPet (Pet pet, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = pet;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
|
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling addPet",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
|
new ApiException(400, "Missing the required parameter 'pet' when calling addPet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -148,7 +146,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -696,15 +694,15 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void updatePet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void updatePet (Pet pet) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = pet;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
|
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling updatePet",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
|
new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -717,8 +715,6 @@ public class PetApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json",
|
|
||||||
"application/xml"
|
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -760,15 +756,15 @@ public class PetApi {
|
|||||||
/**
|
/**
|
||||||
* Update an existing pet
|
* Update an existing pet
|
||||||
*
|
*
|
||||||
* @param body Pet object that needs to be added to the store
|
* @param pet Pet object that needs to be added to the store
|
||||||
*/
|
*/
|
||||||
public void updatePet (Pet body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void updatePet (Pet pet, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = pet;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'pet' is set
|
||||||
if (body == null) {
|
if (pet == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
|
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling updatePet",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
|
new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -784,7 +780,7 @@ public class PetApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
"application/json","application/xml"
|
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -425,15 +425,15 @@ public class StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param order order placed for purchasing the pet
|
||||||
* @return Order
|
* @return Order
|
||||||
*/
|
*/
|
||||||
public Order placeOrder (Order body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public Order placeOrder (Order order) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = order;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'order' is set
|
||||||
if (body == null) {
|
if (order == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
|
VolleyError error = new VolleyError("Missing the required parameter 'order' when calling placeOrder",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
|
new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -446,6 +446,7 @@ public class StoreApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -487,15 +488,15 @@ public class StoreApi {
|
|||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
*
|
*
|
||||||
* @param body order placed for purchasing the pet
|
* @param order order placed for purchasing the pet
|
||||||
*/
|
*/
|
||||||
public void placeOrder (Order body, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
public void placeOrder (Order order, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = order;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'order' is set
|
||||||
if (body == null) {
|
if (order == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
|
VolleyError error = new VolleyError("Missing the required parameter 'order' when calling placeOrder",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
|
new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -511,7 +512,7 @@ public class StoreApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
@ -59,15 +59,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param user Created user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUser (User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void createUser (User user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUser",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -80,6 +80,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -121,15 +122,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Create user
|
* Create user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param body Created user object
|
* @param user Created user object
|
||||||
*/
|
*/
|
||||||
public void createUser (User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void createUser (User user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUser",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -145,7 +146,7 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -182,15 +183,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void createUsersWithArrayInput (List<User> user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithArrayInput",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -244,15 +245,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
*/
|
*/
|
||||||
public void createUsersWithArrayInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void createUsersWithArrayInput (List<User> user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithArrayInput",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -305,15 +306,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void createUsersWithListInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void createUsersWithListInput (List<User> user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithListInput",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -367,15 +368,15 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
*
|
*
|
||||||
* @param body List of user object
|
* @param user List of user object
|
||||||
*/
|
*/
|
||||||
public void createUsersWithListInput (List<User> body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void createUsersWithListInput (List<User> user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithListInput",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
|
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -551,7 +552,7 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
* @return User
|
* @return User
|
||||||
*/
|
*/
|
||||||
public User getUserByName (String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public User getUserByName (String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
@ -613,7 +614,7 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
*
|
*
|
||||||
* @param username The name that needs to be fetched. Use user1 for testing.
|
* @param username The name that needs to be fetched. Use user1 for testing.
|
||||||
*/
|
*/
|
||||||
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
public void getUserByName (String username, final Response.Listener<User> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = null;
|
Object postBody = null;
|
||||||
@ -933,20 +934,20 @@ public class UserApi {
|
|||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted
|
* @param username name that need to be deleted
|
||||||
* @param body Updated user object
|
* @param user Updated user object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public void updateUser (String username, User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
public void updateUser (String username, User user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||||
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||||
}
|
}
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling updateUser",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
|
new ApiException(400, "Missing the required parameter 'user' when calling updateUser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -959,6 +960,7 @@ public class UserApi {
|
|||||||
// form params
|
// form params
|
||||||
Map<String, String> formParams = new HashMap<String, String>();
|
Map<String, String> formParams = new HashMap<String, String>();
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
@ -1000,20 +1002,20 @@ public class UserApi {
|
|||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
* This can only be done by the logged in user.
|
* This can only be done by the logged in user.
|
||||||
* @param username name that need to be deleted * @param body Updated user object
|
* @param username name that need to be deleted * @param user Updated user object
|
||||||
*/
|
*/
|
||||||
public void updateUser (String username, User body, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
public void updateUser (String username, User user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
|
||||||
Object postBody = body;
|
Object postBody = user;
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
// verify the required parameter 'username' is set
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'username' when calling updateUser",
|
||||||
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
new ApiException(400, "Missing the required parameter 'username' when calling updateUser"));
|
||||||
}
|
}
|
||||||
// verify the required parameter 'body' is set
|
// verify the required parameter 'user' is set
|
||||||
if (body == null) {
|
if (user == null) {
|
||||||
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
|
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling updateUser",
|
||||||
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
|
new ApiException(400, "Missing the required parameter 'user' when calling updateUser"));
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// create path and map variables
|
||||||
@ -1029,7 +1031,7 @@ public class UserApi {
|
|||||||
|
|
||||||
|
|
||||||
String[] contentTypes = {
|
String[] contentTypes = {
|
||||||
|
"application/json"
|
||||||
};
|
};
|
||||||
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user