diff --git a/bin/openapi3/android-petstore-httpclient.sh b/bin/openapi3/android-petstore-httpclient.sh new file mode 100755 index 0000000000..caace35c9a --- /dev/null +++ b/bin/openapi3/android-petstore-httpclient.sh @@ -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 diff --git a/bin/openapi3/android-petstore-volley.sh b/bin/openapi3/android-petstore-volley.sh new file mode 100755 index 0000000000..20517b841f --- /dev/null +++ b/bin/openapi3/android-petstore-volley.sh @@ -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 diff --git a/samples/client/petstore/android/httpclient/.swagger-codegen/VERSION b/samples/client/petstore/android/httpclient/.swagger-codegen/VERSION index f9f7450d13..096bf47efe 100644 --- a/samples/client/petstore/android/httpclient/.swagger-codegen/VERSION +++ b/samples/client/petstore/android/httpclient/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/httpclient/README.md b/samples/client/petstore/android/httpclient/README.md index 81ef0a0bd8..c160767ab0 100644 --- a/samples/client/petstore/android/httpclient/README.md +++ b/samples/client/petstore/android/httpclient/README.md @@ -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(); diff --git a/samples/client/petstore/android/httpclient/docs/PetApi.md b/samples/client/petstore/android/httpclient/docs/PetApi.md index de0742023d..b21568ed9b 100644 --- a/samples/client/petstore/android/httpclient/docs/PetApi.md +++ b/samples/client/petstore/android/httpclient/docs/PetApi.md @@ -16,21 +16,19 @@ Method | HTTP request | Description # **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 # **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 # **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 # **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 # **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 # **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); diff --git a/samples/client/petstore/android/httpclient/docs/StoreApi.md b/samples/client/petstore/android/httpclient/docs/StoreApi.md index 1741116be6..8af27f703b 100644 --- a/samples/client/petstore/android/httpclient/docs/StoreApi.md +++ b/samples/client/petstore/android/httpclient/docs/StoreApi.md @@ -50,7 +50,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined # **getInventory** @@ -80,7 +80,7 @@ This endpoint does not need any parameter. ### Return type -[**Map<String, Integer>**](Map.md) +**Map<String, Integer>** ### Authorization @@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 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 # **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 diff --git a/samples/client/petstore/android/httpclient/docs/UserApi.md b/samples/client/petstore/android/httpclient/docs/UserApi.md index ca4908fd40..2494056284 100644 --- a/samples/client/petstore/android/httpclient/docs/UserApi.md +++ b/samples/client/petstore/android/httpclient/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **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 # **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 body = Arrays.asList(new User()); // List | List of user object +List user = Arrays.asList(new List()); // List | 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<User>**](User.md)| List of user object | + **user** | [**List<User>**](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 # **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 body = Arrays.asList(new User()); // List | List of user object +List user = Arrays.asList(new List()); // List | 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<User>**](User.md)| List of user object | + **user** | [**List<User>**](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 # **deleteUser** @@ -180,7 +176,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined # **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 # **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 diff --git a/samples/client/petstore/android/httpclient/git_push.sh b/samples/client/petstore/android/httpclient/git_push.sh index 792320114f..160f6f2139 100644 --- a/samples/client/petstore/android/httpclient/git_push.sh +++ b/samples/client/petstore/android/httpclient/git_push.sh @@ -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 diff --git a/samples/client/petstore/android/httpclient/pom.xml b/samples/client/petstore/android/httpclient/pom.xml index 73e9aef8d3..0ec1b68e2e 100644 --- a/samples/client/petstore/android/httpclient/pom.xml +++ b/samples/client/petstore/android/httpclient/pom.xml @@ -1,155 +1,175 @@ - 4.0.0 - io.swagger - swagger-android-client - jar - swagger-android-client - 1.0.0 - - scm:git:git@github.com:swagger-api/swagger-mustache.git - scm:git:git@github.com:swagger-api/swagger-codegen.git - https://github.com/swagger-api/swagger-codegen - - - 2.2.0 - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + 4.0.0 + io.swagger + swagger-android-client + jar + swagger-android-client + 1.0.0 + + scm:git:git@github.com:swagger-api/swagger-mustache.git + scm:git:git@github.com:swagger-api/swagger-codegen.git + https://github.com/swagger-api/swagger-codegen + - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - + + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M1 + + + enforce-maven + + enforce + + + + + 2.2.0 + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.12 + + + + loggerPath + conf/log4j.properties + + + -Xms512m -Xmx1500m + methods + pertest + + + + maven-dependency-plugin + + + package + + copy-dependencies + + + ${project.build.directory}/lib + + + + - - - org.apache.maven.plugins - maven-jar-plugin - 2.2 - - - - jar - test-jar - - - - - - + + + org.apache.maven.plugins + maven-jar-plugin + 2.2 + + + + jar + test-jar + + + + + + - - org.codehaus.mojo - build-helper-maven-plugin - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.1 - - 1.7 - 1.7 - - - - - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - com.google.code.gson - gson - ${gson-version} - - - org.apache.httpcomponents - httpclient - ${httpclient-version} - compile - - - org.apache.httpcomponents - httpmime - ${httpclient-version} - compile - + + org.codehaus.mojo + build-helper-maven-plugin + + + add_sources + generate-sources + + add-source + + + + + src/main/java + + + + + add_test_sources + generate-test-sources + + add-test-source + + + + + src/test/java + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.6.1 + + 1.7 + 1.7 + + + + + + + io.swagger + swagger-annotations + ${swagger-core-version} + + + com.google.code.gson + gson + ${gson-version} + + + org.apache.httpcomponents + httpclient + ${httpclient-version} + compile + + + org.apache.httpcomponents + httpmime + ${httpclient-version} + compile + - - - junit - junit - ${junit-version} - test - - - - - sonatype-snapshots - https://oss.sonatype.org/content/repositories/snapshots - - - - 1.5.18 - 2.3.1 - 4.8.1 - 1.0.0 - 4.8.1 - 4.3.6 - + + + junit + junit + ${junit-version} + test + + + + + sonatype-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + + UTF-8 + 1.5.18 + 2.3.1 + 4.8.1 + 1.0.0 + 4.8.1 + 4.3.6 + diff --git a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/PetApi.java index 56183aafc3..8bb5d414f5 100644 --- a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/PetApi.java @@ -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"; diff --git a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/StoreApi.java index 4b1a3b690d..97008abffe 100644 --- a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/StoreApi.java @@ -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) ApiInvoker.deserialize(localVarResponse, "map", Map.class); + return (Map) 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"; diff --git a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/UserApi.java index 36dfb08980..8cc265f87c 100644 --- a/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/android/httpclient/src/main/java/io/swagger/client/api/UserApi.java @@ -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 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) 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 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) 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"; diff --git a/samples/client/petstore/android/volley/.swagger-codegen/VERSION b/samples/client/petstore/android/volley/.swagger-codegen/VERSION index f9f7450d13..096bf47efe 100644 --- a/samples/client/petstore/android/volley/.swagger-codegen/VERSION +++ b/samples/client/petstore/android/volley/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.0-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/android/volley/README.md b/samples/client/petstore/android/volley/README.md index f8e840dec4..fcac5d480d 100644 --- a/samples/client/petstore/android/volley/README.md +++ b/samples/client/petstore/android/volley/README.md @@ -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(); diff --git a/samples/client/petstore/android/volley/docs/PetApi.md b/samples/client/petstore/android/volley/docs/PetApi.md index de0742023d..b21568ed9b 100644 --- a/samples/client/petstore/android/volley/docs/PetApi.md +++ b/samples/client/petstore/android/volley/docs/PetApi.md @@ -16,21 +16,19 @@ Method | HTTP request | Description # **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 # **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 # **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 # **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 # **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 # **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); diff --git a/samples/client/petstore/android/volley/docs/StoreApi.md b/samples/client/petstore/android/volley/docs/StoreApi.md index 470432ea25..8af27f703b 100644 --- a/samples/client/petstore/android/volley/docs/StoreApi.md +++ b/samples/client/petstore/android/volley/docs/StoreApi.md @@ -50,7 +50,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined # **getInventory** @@ -105,7 +105,7 @@ For valid response try integer IDs with value <= 5 or > 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 # **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 diff --git a/samples/client/petstore/android/volley/docs/UserApi.md b/samples/client/petstore/android/volley/docs/UserApi.md index ca4908fd40..2494056284 100644 --- a/samples/client/petstore/android/volley/docs/UserApi.md +++ b/samples/client/petstore/android/volley/docs/UserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **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 # **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 body = Arrays.asList(new User()); // List | List of user object +List user = Arrays.asList(new List()); // List | 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<User>**](User.md)| List of user object | + **user** | [**List<User>**](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 # **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 body = Arrays.asList(new User()); // List | List of user object +List user = Arrays.asList(new List()); // List | 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<User>**](User.md)| List of user object | + **user** | [**List<User>**](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 # **deleteUser** @@ -180,7 +176,7 @@ No authorization required ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: application/xml, application/json + - **Accept**: Not defined # **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 # **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 diff --git a/samples/client/petstore/android/volley/git_push.sh b/samples/client/petstore/android/volley/git_push.sh index 4d72f2fc95..34c19967c7 100644 --- a/samples/client/petstore/android/volley/git_push.sh +++ b/samples/client/petstore/android/volley/git_push.sh @@ -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 diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java index 3253968072..f625ba1812 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/PetApi.java @@ -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 formParams = new HashMap(); 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 responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void addPet (Pet pet, final Response.Listener 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 formParams = new HashMap(); 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 responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void updatePet (Pet pet, final Response.Listener 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"; diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java index 8837f433e5..f2f3324c5e 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/StoreApi.java @@ -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 formParams = new HashMap(); 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 responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void placeOrder (Order order, final Response.Listener 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"; diff --git a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java index ab7fc5b140..d8ec138b14 100644 --- a/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java +++ b/samples/client/petstore/android/volley/src/main/java/io/swagger/client/api/UserApi.java @@ -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 formParams = new HashMap(); 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 responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void createUser (User user, final Response.Listener 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 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) 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 body, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void createUsersWithArrayInput (List user, final Response.Listener 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 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) 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 body, final Response.Listener responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void createUsersWithListInput (List user, final Response.Listener 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 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 formParams = new HashMap(); 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 responseListener, final Response.ErrorListener errorListener) { - Object postBody = body; + public void updateUser (String username, User user, final Response.Listener 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";