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:
William Cheng 2018-04-19 16:13:35 +08:00 committed by GitHub
parent 80d10e2cba
commit c20352caab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 503 additions and 466 deletions

View 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

View 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

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
3.0.0-SNAPSHOT

View File

@ -64,9 +64,9 @@ public class PetApiExample {
public static void main(String[] args) {
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 {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();

View File

@ -16,21 +16,19 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(body)
> addPet(pet)
Add a new pet to the store
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@ -41,7 +39,7 @@ try {
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
@ -53,8 +51,8 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="deletePet"></a>
# **deletePet**
@ -62,15 +60,13 @@ null (empty response body)
Deletes a pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 |
try {
apiInstance.deletePet(petId, apiKey);
@ -98,7 +94,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="findPetsByStatus"></a>
# **findPetsByStatus**
@ -200,7 +196,7 @@ Returns a single pet
//import io.swagger.client.api.PetApi;
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to return
Long petId = 56L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@ -231,21 +227,19 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(body)
> updatePet(pet)
Update an existing pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace();
@ -256,7 +250,7 @@ try {
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
@ -268,8 +262,8 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="updatePetWithForm"></a>
# **updatePetWithForm**
@ -277,15 +271,13 @@ null (empty response body)
Updates a pet in the store with form data
### Example
```java
// Import classes:
//import io.swagger.client.api.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 status = "status_example"; // String | Updated status of the pet
try {
@ -315,7 +307,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="uploadFile"></a>
# **uploadFile**
@ -323,17 +315,15 @@ null (empty response body)
uploads an image
### Example
```java
// Import classes:
//import io.swagger.client.api.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
File file = new File("/path/to/file.txt"); // File | file to upload
File file = new File("/path/to/file"); // File | file to upload
try {
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);

View File

@ -50,7 +50,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="getInventory"></a>
# **getInventory**
@ -80,7 +80,7 @@ This endpoint does not need any parameter.
### Return type
[**Map&lt;String, Integer&gt;**](Map.md)
**Map&lt;String, Integer&gt;**
### Authorization
@ -105,7 +105,7 @@ For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other val
//import io.swagger.client.api.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 {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@ -119,7 +119,7 @@ try {
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
@ -136,21 +136,19 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(body)
> Order placeOrder(order)
Place an order for a pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
Order result = apiInstance.placeOrder(body);
Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@ -162,7 +160,7 @@ try {
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
@ -174,6 +172,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(body)
> createUser(user)
Create user
@ -28,9 +28,9 @@ This can only be done by the logged in user.
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
apiInstance.createUser(body);
apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace();
@ -41,7 +41,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@ -53,26 +53,24 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(user)
Creates list of users with given input array
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.createUsersWithArrayInput(body);
apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace();
@ -83,7 +81,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type
@ -96,25 +94,23 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(body)
> createUsersWithListInput(user)
Creates list of users with given input array
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.createUsersWithListInput(body);
apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace();
@ -125,7 +121,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type
@ -138,7 +134,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="deleteUser"></a>
# **deleteUser**
@ -180,7 +176,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="getUserByName"></a>
# **getUserByName**
@ -188,15 +184,13 @@ No authorization required
Get user by user name
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
User result = apiInstance.getUserByName(username);
System.out.println(result);
@ -210,7 +204,7 @@ try {
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
@ -231,8 +225,6 @@ No authorization required
Logs user into the system
### Example
```java
// Import classes:
@ -276,8 +268,6 @@ No authorization required
Logs out current logged in user session
### Example
```java
// Import classes:
@ -306,11 +296,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, body)
> updateUser(username, user)
Updated user
@ -323,9 +313,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
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 {
apiInstance.updateUser(username, body);
apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace();
@ -337,7 +327,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@ -349,6 +339,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -1,155 +1,175 @@
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-android-client</artifactId>
<packaging>jar</packaging>
<name>swagger-android-client</name>
<version>1.0.0</version>
<scm>
<connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection>
<developerConnection>scm:git:git@github.com:swagger-api/swagger-codegen.git</developerConnection>
<url>https://github.com/swagger-api/swagger-codegen</url>
</scm>
<prerequisites>
<maven>2.2.0</maven>
</prerequisites>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.swagger</groupId>
<artifactId>swagger-android-client</artifactId>
<packaging>jar</packaging>
<name>swagger-android-client</name>
<version>1.0.0</version>
<scm>
<connection>scm:git:git@github.com:swagger-api/swagger-mustache.git</connection>
<developerConnection>scm:git:git@github.com:swagger-api/swagger-codegen.git</developerConnection>
<url>https://github.com/swagger-api/swagger-codegen</url>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</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>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>2.2.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</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 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-core-version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>
src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>
src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-core-version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpclient-version}</version>
<scope>compile</scope>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<properties>
<swagger-core-version>1.5.18</swagger-core-version>
<gson-version>2.3.1</gson-version>
<junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<httpclient-version>4.3.6</httpclient-version>
</properties>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-core-version>1.5.18</swagger-core-version>
<gson-version>2.3.1</gson-version>
<junit-version>4.8.1</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<httpclient-version>4.3.6</httpclient-version>
</properties>
</project>

View File

@ -53,14 +53,14 @@ public class PetApi {
/**
* 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
*/
public void addPet (Pet body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
public void addPet (Pet pet) throws ApiException {
Object localVarPostBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
}
// create path and map variables
@ -76,7 +76,7 @@ public class PetApi {
String[] localVarContentTypes = {
"application/json","application/xml"
};
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";
@ -317,14 +317,14 @@ public class PetApi {
/**
* 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
*/
public void updatePet (Pet body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
public void updatePet (Pet pet) throws ApiException {
Object localVarPostBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
}
// create path and map variables
@ -340,7 +340,7 @@ public class PetApi {
String[] localVarContentTypes = {
"application/json","application/xml"
};
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";

View File

@ -139,7 +139,7 @@ public class StoreApi {
try {
String localVarResponse = apiInvoker.invokeAPI(basePath, localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarContentType);
if(localVarResponse != null){
return (Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Map.class);
return (Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Integer.class);
}
else {
return null;
@ -203,14 +203,14 @@ public class StoreApi {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param order order placed for purchasing the pet
* @return Order
*/
public Order placeOrder (Order body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
public Order placeOrder (Order order) throws ApiException {
Object localVarPostBody = order;
// verify the required parameter 'order' is set
if (order == null) {
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
}
// create path and map variables
@ -226,7 +226,7 @@ public class StoreApi {
String[] localVarContentTypes = {
"application/json"
};
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";

View File

@ -52,14 +52,14 @@ public class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object
* @param user Created user object
* @return void
*/
public void createUser (User body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
public void createUser (User user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
}
// create path and map variables
@ -75,7 +75,7 @@ public class UserApi {
String[] localVarContentTypes = {
"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
*
* @param body List of user object
* @param user List of user object
* @return void
*/
public void createUsersWithArrayInput (List<User> body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
public void createUsersWithArrayInput (List<User> user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
// create path and map variables
@ -156,14 +156,14 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param user List of user object
* @return void
*/
public void createUsersWithListInput (List<User> body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
public void createUsersWithListInput (List<User> user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
}
// create path and map variables
@ -260,7 +260,7 @@ public class UserApi {
/**
* 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
*/
public User getUserByName (String username) throws ApiException {
@ -419,18 +419,18 @@ public class UserApi {
* Updated 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 user Updated user object
* @return void
*/
public void updateUser (String username, User body) throws ApiException {
Object localVarPostBody = body;
public void updateUser (String username, User user) throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
// verify the required parameter 'user' is set
if (user == null) {
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
}
// create path and map variables
@ -446,7 +446,7 @@ public class UserApi {
String[] localVarContentTypes = {
"application/json"
};
String localVarContentType = localVarContentTypes.length > 0 ? localVarContentTypes[0] : "application/json";

View File

@ -1 +1 @@
2.3.0-SNAPSHOT
3.0.0-SNAPSHOT

View File

@ -64,9 +64,9 @@ public class PetApiExample {
public static void main(String[] args) {
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 {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();

View File

@ -16,21 +16,19 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **addPet**
> addPet(body)
> addPet(pet)
Add a new pet to the store
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
e.printStackTrace();
@ -41,7 +39,7 @@ try {
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
@ -53,8 +51,8 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="deletePet"></a>
# **deletePet**
@ -62,15 +60,13 @@ null (empty response body)
Deletes a pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 |
try {
apiInstance.deletePet(petId, apiKey);
@ -98,7 +94,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="findPetsByStatus"></a>
# **findPetsByStatus**
@ -200,7 +196,7 @@ Returns a single pet
//import io.swagger.client.api.PetApi;
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet to return
Long petId = 56L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@ -231,21 +227,19 @@ Name | Type | Description | Notes
<a name="updatePet"></a>
# **updatePet**
> updatePet(body)
> updatePet(pet)
Update an existing pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
e.printStackTrace();
@ -256,7 +250,7 @@ try {
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
@ -268,8 +262,8 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json
- **Content-Type**: Not defined
- **Accept**: Not defined
<a name="updatePetWithForm"></a>
# **updatePetWithForm**
@ -277,15 +271,13 @@ null (empty response body)
Updates a pet in the store with form data
### Example
```java
// Import classes:
//import io.swagger.client.api.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 status = "status_example"; // String | Updated status of the pet
try {
@ -315,7 +307,7 @@ null (empty response body)
### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="uploadFile"></a>
# **uploadFile**
@ -323,17 +315,15 @@ null (empty response body)
uploads an image
### Example
```java
// Import classes:
//import io.swagger.client.api.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
File file = new File("/path/to/file.txt"); // File | file to upload
File file = new File("/path/to/file"); // File | file to upload
try {
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);

View File

@ -50,7 +50,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="getInventory"></a>
# **getInventory**
@ -105,7 +105,7 @@ For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other val
//import io.swagger.client.api.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 {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@ -119,7 +119,7 @@ try {
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
@ -136,21 +136,19 @@ No authorization required
<a name="placeOrder"></a>
# **placeOrder**
> Order placeOrder(body)
> Order placeOrder(order)
Place an order for a pet
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
Order result = apiInstance.placeOrder(body);
Order result = apiInstance.placeOrder(order);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@ -162,7 +160,7 @@ try {
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
@ -174,6 +172,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **createUser**
> createUser(body)
> createUser(user)
Create user
@ -28,9 +28,9 @@ This can only be done by the logged in user.
//import io.swagger.client.api.UserApi;
UserApi apiInstance = new UserApi();
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
apiInstance.createUser(body);
apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
e.printStackTrace();
@ -41,7 +41,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object |
**user** | [**User**](User.md)| Created user object |
### Return type
@ -53,26 +53,24 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(user)
Creates list of users with given input array
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.createUsersWithArrayInput(body);
apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
e.printStackTrace();
@ -83,7 +81,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type
@ -96,25 +94,23 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(body)
> createUsersWithListInput(user)
Creates list of users with given input array
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
apiInstance.createUsersWithListInput(body);
apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
e.printStackTrace();
@ -125,7 +121,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
**user** | [**List&lt;User&gt;**](List.md)| List of user object |
### Return type
@ -138,7 +134,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="deleteUser"></a>
# **deleteUser**
@ -180,7 +176,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="getUserByName"></a>
# **getUserByName**
@ -188,15 +184,13 @@ No authorization required
Get user by user name
### Example
```java
// Import classes:
//import io.swagger.client.api.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 {
User result = apiInstance.getUserByName(username);
System.out.println(result);
@ -210,7 +204,7 @@ try {
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
@ -231,8 +225,6 @@ No authorization required
Logs user into the system
### Example
```java
// Import classes:
@ -276,8 +268,6 @@ No authorization required
Logs out current logged in user session
### Example
```java
// Import classes:
@ -306,11 +296,11 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Accept**: Not defined
<a name="updateUser"></a>
# **updateUser**
> updateUser(username, body)
> updateUser(username, user)
Updated user
@ -323,9 +313,9 @@ This can only be done by the logged in user.
UserApi apiInstance = new UserApi();
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 {
apiInstance.updateUser(username, body);
apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
e.printStackTrace();
@ -337,7 +327,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
**user** | [**User**](User.md)| Updated user object |
### Return type
@ -349,6 +339,6 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
- **Content-Type**: application/json
- **Accept**: Not defined

View File

@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
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
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git

View File

@ -60,15 +60,15 @@ public class PetApi {
/**
* 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
*/
public void addPet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
public void addPet (Pet pet) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling addPet",
new ApiException(400, "Missing the required parameter 'pet' when calling addPet"));
}
// create path and map variables
@ -81,8 +81,6 @@ public class PetApi {
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json",
"application/xml"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -124,15 +122,15 @@ public class PetApi {
/**
* 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) {
Object postBody = body;
public void addPet (Pet pet, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = pet;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling addPet",
new ApiException(400, "Missing the required parameter 'body' when calling addPet"));
// verify the required parameter 'pet' is set
if (pet == null) {
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling addPet",
new ApiException(400, "Missing the required parameter 'pet' when calling addPet"));
}
// create path and map variables
@ -148,7 +146,7 @@ public class PetApi {
String[] contentTypes = {
"application/json","application/xml"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -696,15 +694,15 @@ public class PetApi {
/**
* 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
*/
public void updatePet (Pet body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
public void updatePet (Pet pet) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = pet;
// verify the required parameter 'pet' is set
if (pet == null) {
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling updatePet",
new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"));
}
// create path and map variables
@ -717,8 +715,6 @@ public class PetApi {
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json",
"application/xml"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -760,15 +756,15 @@ public class PetApi {
/**
* 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) {
Object postBody = body;
public void updatePet (Pet pet, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = pet;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updatePet",
new ApiException(400, "Missing the required parameter 'body' when calling updatePet"));
// verify the required parameter 'pet' is set
if (pet == null) {
VolleyError error = new VolleyError("Missing the required parameter 'pet' when calling updatePet",
new ApiException(400, "Missing the required parameter 'pet' when calling updatePet"));
}
// create path and map variables
@ -784,7 +780,7 @@ public class PetApi {
String[] contentTypes = {
"application/json","application/xml"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";

View File

@ -425,15 +425,15 @@ public class StoreApi {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet
* @param order order placed for purchasing the pet
* @return Order
*/
public Order placeOrder (Order body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
public Order placeOrder (Order order) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = order;
// verify the required parameter 'order' is set
if (order == null) {
VolleyError error = new VolleyError("Missing the required parameter 'order' when calling placeOrder",
new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"));
}
// create path and map variables
@ -446,6 +446,7 @@ public class StoreApi {
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -487,15 +488,15 @@ public class StoreApi {
/**
* 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) {
Object postBody = body;
public void placeOrder (Order order, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
Object postBody = order;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling placeOrder",
new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"));
// verify the required parameter 'order' is set
if (order == null) {
VolleyError error = new VolleyError("Missing the required parameter 'order' when calling placeOrder",
new ApiException(400, "Missing the required parameter 'order' when calling placeOrder"));
}
// create path and map variables
@ -511,7 +512,7 @@ public class StoreApi {
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";

View File

@ -59,15 +59,15 @@ public class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object
* @param user Created user object
* @return void
*/
public void createUser (User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
public void createUser (User user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUser",
new ApiException(400, "Missing the required parameter 'user' when calling createUser"));
}
// create path and map variables
@ -80,6 +80,7 @@ public class UserApi {
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -121,15 +122,15 @@ public class UserApi {
/**
* Create 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) {
Object postBody = body;
public void createUser (User user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = user;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUser",
new ApiException(400, "Missing the required parameter 'body' when calling createUser"));
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUser",
new ApiException(400, "Missing the required parameter 'user' when calling createUser"));
}
// create path and map variables
@ -145,7 +146,7 @@ public class UserApi {
String[] contentTypes = {
"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
*
* @param body List of user object
* @param user List of user object
* @return void
*/
public void createUsersWithArrayInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
public void createUsersWithArrayInput (List<User> user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithArrayInput",
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"));
}
// create path and map variables
@ -244,15 +245,15 @@ public class UserApi {
/**
* 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) {
Object postBody = body;
public void createUsersWithArrayInput (List<User> user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = user;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithArrayInput",
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"));
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithArrayInput",
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput"));
}
// create path and map variables
@ -305,15 +306,15 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object
* @param user List of user object
* @return void
*/
public void createUsersWithListInput (List<User> body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
public void createUsersWithListInput (List<User> user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithListInput",
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"));
}
// create path and map variables
@ -367,15 +368,15 @@ public class UserApi {
/**
* 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) {
Object postBody = body;
public void createUsersWithListInput (List<User> user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = user;
// verify the required parameter 'body' is set
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling createUsersWithListInput",
new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"));
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling createUsersWithListInput",
new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput"));
}
// create path and map variables
@ -551,7 +552,7 @@ public class UserApi {
/**
* 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
*/
public User getUserByName (String username) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
@ -613,7 +614,7 @@ public class UserApi {
/**
* 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) {
Object postBody = null;
@ -933,20 +934,20 @@ public class UserApi {
* Updated 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 user Updated user object
* @return void
*/
public void updateUser (String username, User body) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = body;
public void updateUser (String username, User user) throws TimeoutException, ExecutionException, InterruptedException, ApiException {
Object postBody = user;
// verify the required parameter 'username' is set
if (username == null) {
VolleyError error = new VolleyError("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
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling updateUser",
new ApiException(400, "Missing the required parameter 'user' when calling updateUser"));
}
// create path and map variables
@ -959,6 +960,7 @@ public class UserApi {
// form params
Map<String, String> formParams = new HashMap<String, String>();
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";
@ -1000,20 +1002,20 @@ public class UserApi {
/**
* Updated 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) {
Object postBody = body;
public void updateUser (String username, User user, final Response.Listener<String> responseListener, final Response.ErrorListener errorListener) {
Object postBody = user;
// verify the required parameter 'username' is set
if (username == null) {
VolleyError error = new VolleyError("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
if (body == null) {
VolleyError error = new VolleyError("Missing the required parameter 'body' when calling updateUser",
new ApiException(400, "Missing the required parameter 'body' when calling updateUser"));
// verify the required parameter 'user' is set
if (user == null) {
VolleyError error = new VolleyError("Missing the required parameter 'user' when calling updateUser",
new ApiException(400, "Missing the required parameter 'user' when calling updateUser"));
}
// create path and map variables
@ -1029,7 +1031,7 @@ public class UserApi {
String[] contentTypes = {
"application/json"
};
String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json";