From 1587d202b03ddc3ee420204e8ffaf8d0a56a3065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Bresson?= Date: Sun, 29 Apr 2018 14:38:18 +0200 Subject: [PATCH] Generate apex (#224) --- .../petstore/apex/.openapi-generator/VERSION | 2 +- .../client/petstore/apex/docs/SwagPetApi.md | 58 ++++++-------- .../client/petstore/apex/docs/SwagStoreApi.md | 28 ++++--- .../client/petstore/apex/docs/SwagUserApi.md | 78 ++++++++----------- .../main/default/classes/SwagApiResponse.cls | 2 +- .../main/default/classes/SwagOrder.cls | 2 +- .../main/default/classes/SwagPetApi.cls | 40 +++++----- .../main/default/classes/SwagStoreApi.cls | 20 ++--- .../main/default/classes/SwagUser.cls | 2 +- .../main/default/classes/SwagUserApi.cls | 58 +++++++------- 10 files changed, 134 insertions(+), 156 deletions(-) diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION index 7fea99011a6..096bf47efe3 100644 --- a/samples/client/petstore/apex/.openapi-generator/VERSION +++ b/samples/client/petstore/apex/.openapi-generator/VERSION @@ -1 +1 @@ -2.2.3-SNAPSHOT \ No newline at end of file +3.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/apex/docs/SwagPetApi.md b/samples/client/petstore/apex/docs/SwagPetApi.md index 0911fbd0fa8..9de65472e74 100644 --- a/samples/client/petstore/apex/docs/SwagPetApi.md +++ b/samples/client/petstore/apex/docs/SwagPetApi.md @@ -16,12 +16,10 @@ Method | HTTP request | Description # **addPet** -> addPet(body) +> addPet(swagPet) Add a new pet to the store - - ### Example ```java SwagPetApi api = new SwagPetApi(); @@ -32,7 +30,7 @@ Swagger.OAuth petstore_auth = (Swagger.OAuth) client.getAuthentication('petstore petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); Map params = new Map{ - 'body' => SwagPet.getExample() + 'swagPet' => SwagPet.getExample() }; try { @@ -47,7 +45,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SwagPet**](Pet.md)| Pet object that needs to be added to the store | + **swagPet** | [**SwagPet**](SwagPet.md)| Pet object that needs to be added to the store | ### Return type @@ -59,8 +57,8 @@ null (empty response body) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined # **deletePet** @@ -68,8 +66,6 @@ null (empty response body) Deletes a pet - - ### Example ```java SwagPetApi api = new SwagPetApi(); @@ -81,7 +77,7 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); Map params = new Map{ 'petId' => 2147483648L, - 'apiKey' => 'apiKey_example' + 'apiKey' => 'null' }; try { @@ -109,8 +105,8 @@ null (empty response body) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **findPetsByStatus** @@ -158,8 +154,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **findPetsByTags** @@ -207,8 +203,8 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **getPetById** @@ -256,17 +252,15 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **updatePet** -> updatePet(body) +> updatePet(swagPet) Update an existing pet - - ### Example ```java SwagPetApi api = new SwagPetApi(); @@ -277,7 +271,7 @@ Swagger.OAuth petstore_auth = (Swagger.OAuth) client.getAuthentication('petstore petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); Map params = new Map{ - 'body' => SwagPet.getExample() + 'swagPet' => SwagPet.getExample() }; try { @@ -292,7 +286,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SwagPet**](Pet.md)| Pet object that needs to be added to the store | + **swagPet** | [**SwagPet**](SwagPet.md)| Pet object that needs to be added to the store | ### Return type @@ -304,8 +298,8 @@ null (empty response body) ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: application/json, application/xml + - **Accept**: Not defined # **updatePetWithForm** @@ -313,8 +307,6 @@ null (empty response body) Updates a pet in the store with form data - - ### Example ```java SwagPetApi api = new SwagPetApi(); @@ -326,8 +318,8 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); Map params = new Map{ 'petId' => 2147483648L, - 'name' => 'name_example', - 'status' => 'status_example' + 'name' => 'null', + 'status' => 'null' }; try { @@ -357,7 +349,7 @@ null (empty response body) ### HTTP request headers - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json + - **Accept**: Not defined # **uploadFile** @@ -365,8 +357,6 @@ null (empty response body) uploads an image - - ### Example ```java SwagPetApi api = new SwagPetApi(); @@ -378,7 +368,7 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); Map params = new Map{ 'petId' => 2147483648L, - 'additionalMetadata' => 'additionalMetadata_example', + 'additionalMetadata' => 'null', 'file' => Blob.valueOf('Sample text file\nContents') }; @@ -409,6 +399,6 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/x-www-form-urlencoded + - **Content-Type**: multipart/form-data - **Accept**: application/json diff --git a/samples/client/petstore/apex/docs/SwagStoreApi.md b/samples/client/petstore/apex/docs/SwagStoreApi.md index c0212e0300f..c2c5f7a553d 100644 --- a/samples/client/petstore/apex/docs/SwagStoreApi.md +++ b/samples/client/petstore/apex/docs/SwagStoreApi.md @@ -23,7 +23,7 @@ For valid response try integer IDs with value < 1000. Anything above 1000 or SwagStoreApi api = new SwagStoreApi(); Map params = new Map{ - 'orderId' => 'orderId_example' + 'orderId' => 'null' }; try { @@ -50,8 +50,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **getInventory** @@ -84,7 +84,7 @@ This endpoint does not need any parameter. ### Return type -[**Map<String, Integer>**](Map.md) +**Map<String, Integer>** ### Authorization @@ -92,7 +92,7 @@ This endpoint does not need any parameter. ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: Not defined - **Accept**: application/json @@ -124,7 +124,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,23 +136,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **placeOrder** -> SwagOrder placeOrder(body) +> SwagOrder placeOrder(swagOrder) Place an order for a pet - - ### Example ```java SwagStoreApi api = new SwagStoreApi(); Map params = new Map{ - 'body' => SwagOrder.getExample() + 'swagOrder' => SwagOrder.getExample() }; try { @@ -168,7 +166,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SwagOrder**](Order.md)| order placed for purchasing the pet | + **swagOrder** | [**SwagOrder**](SwagOrder.md)| order placed for purchasing the pet | ### Return type @@ -180,6 +178,6 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json diff --git a/samples/client/petstore/apex/docs/SwagUserApi.md b/samples/client/petstore/apex/docs/SwagUserApi.md index aa559ddeac2..5968698701b 100644 --- a/samples/client/petstore/apex/docs/SwagUserApi.md +++ b/samples/client/petstore/apex/docs/SwagUserApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description # **createUser** -> createUser(body) +> createUser(swagUser) Create user @@ -27,7 +27,7 @@ This can only be done by the logged in user. SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'body' => SwagUser.getExample() + 'swagUser' => SwagUser.getExample() }; try { @@ -42,7 +42,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**SwagUser**](User.md)| Created user object | + **swagUser** | [**SwagUser**](SwagUser.md)| Created user object | ### Return type @@ -54,23 +54,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **createUsersWithArrayInput** -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(swagUser) Creates list of users with given input array - - ### Example ```java SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'body' => new List{SwagUser.getExample()} + 'swagUser' => new List{SwagUser.getExample()} }; try { @@ -85,7 +83,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<SwagUser>**](SwagUser.md)| List of user object | + **swagUser** | [**List<SwagUser>**](List.md)| List of user object | ### Return type @@ -97,23 +95,21 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **createUsersWithListInput** -> createUsersWithListInput(body) +> createUsersWithListInput(swagUser) Creates list of users with given input array - - ### Example ```java SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'body' => new List{SwagUser.getExample()} + 'swagUser' => new List{SwagUser.getExample()} }; try { @@ -128,7 +124,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<SwagUser>**](SwagUser.md)| List of user object | + **swagUser** | [**List<SwagUser>**](List.md)| List of user object | ### Return type @@ -140,8 +136,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **deleteUser** @@ -156,7 +152,7 @@ This can only be done by the logged in user. SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'username' => 'username_example' + 'username' => 'null' }; try { @@ -183,8 +179,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **getUserByName** @@ -192,14 +188,12 @@ No authorization required Get user by user name - - ### Example ```java SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'username' => 'username_example' + 'username' => 'null' }; try { @@ -215,7 +209,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 @@ -227,8 +221,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **loginUser** @@ -236,15 +230,13 @@ No authorization required Logs user into the system - - ### Example ```java SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'username' => 'username_example', - 'password' => 'password_example' + 'username' => 'null', + 'password' => 'null' }; try { @@ -273,8 +265,8 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: application/xml, application/json # **logoutUser** @@ -282,8 +274,6 @@ No authorization required Logs out current logged in user session - - ### Example ```java SwagUserApi api = new SwagUserApi(); @@ -309,12 +299,12 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined # **updateUser** -> updateUser(username, body) +> updateUser(username, swagUser) Updated user @@ -325,8 +315,8 @@ This can only be done by the logged in user. SwagUserApi api = new SwagUserApi(); Map params = new Map{ - 'username' => 'username_example', - 'body' => SwagUser.getExample() + 'username' => 'null', + 'swagUser' => SwagUser.getExample() }; try { @@ -342,7 +332,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | - **body** | [**SwagUser**](User.md)| Updated user object | + **swagUser** | [**SwagUser**](SwagUser.md)| Updated user object | ### Return type @@ -354,6 +344,6 @@ No authorization required ### HTTP request headers - - **Content-Type**: application/json - - **Accept**: application/json + - **Content-Type**: Not defined + - **Accept**: Not defined diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagApiResponse.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagApiResponse.cls index 8f87c98fd11..7e2b14bb52a 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagApiResponse.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagApiResponse.cls @@ -42,7 +42,7 @@ public class SwagApiResponse implements Swagger.MappedProperties { public static SwagApiResponse getExample() { SwagApiResponse apiResponse = new SwagApiResponse(); - apiResponse.code = 123; + apiResponse.code = ; apiResponse.r_type = 'aeiou'; apiResponse.message = 'aeiou'; return apiResponse; diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagOrder.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagOrder.cls index 775081a55c8..e984febb1e6 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagOrder.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagOrder.cls @@ -67,7 +67,7 @@ public class SwagOrder { SwagOrder order = new SwagOrder(); order.id = 123456789L; order.petId = 123456789L; - order.quantity = 123; + order.quantity = ; order.shipDate = Datetime.newInstanceGmt(2000, 1, 23, 4, 56, 7); order.status = StatusEnum.PLACED; order.complete = true; diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagPetApi.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagPetApi.cls index 059b7bdcd78..74dde57fe94 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagPetApi.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagPetApi.cls @@ -28,22 +28,22 @@ public class SwagPetApi { /** * Add a new pet to the store * - * @param body Pet object that needs to be added to the store (required) + * @param swagPet Pet object that needs to be added to the store (required) * @throws Swagger.ApiException if fails to make API call */ public void addPet(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagPet'), 'swagPet'); List query = new List(); List form = new List(); client.invoke( 'POST', '/pet', - (SwagPet) params.get('body'), + (SwagPet) params.get('swagPet'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List{ 'application/json', 'application/xml' }, new List { 'petstore_auth' }, null ); @@ -69,8 +69,8 @@ public class SwagPetApi { new Map{ 'api_key' => (String) params.get('apiKey') }, - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List { 'petstore_auth' }, null ); @@ -96,8 +96,8 @@ public class SwagPetApi { query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List { 'petstore_auth' }, List.class ); @@ -123,8 +123,8 @@ public class SwagPetApi { query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List { 'petstore_auth' }, List.class ); @@ -148,8 +148,8 @@ public class SwagPetApi { 'petId' => (Long) params.get('petId') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List { 'api_key' }, SwagPet.class ); @@ -157,22 +157,22 @@ public class SwagPetApi { /** * Update an existing pet * - * @param body Pet object that needs to be added to the store (required) + * @param swagPet Pet object that needs to be added to the store (required) * @throws Swagger.ApiException if fails to make API call */ public void updatePet(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagPet'), 'swagPet'); List query = new List(); List form = new List(); client.invoke( 'PUT', '/pet', - (SwagPet) params.get('body'), + (SwagPet) params.get('swagPet'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List{ 'application/json', 'application/xml' }, new List { 'petstore_auth' }, null ); @@ -201,7 +201,7 @@ public class SwagPetApi { 'petId' => (Long) params.get('petId') }, new Map(), - new List{ 'application/json' }, + new List(), new List{ 'application/x-www-form-urlencoded' }, new List { 'petstore_auth' }, null @@ -233,7 +233,7 @@ public class SwagPetApi { }, new Map(), new List{ 'application/json' }, - new List{ 'application/x-www-form-urlencoded' }, + new List{ 'multipart/form-data' }, new List { 'petstore_auth' }, SwagApiResponse.class ); diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagStoreApi.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagStoreApi.cls index feb55354464..9fc0e0e3f30 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagStoreApi.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagStoreApi.cls @@ -43,8 +43,8 @@ public class SwagStoreApi { 'orderId' => (String) params.get('orderId') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -65,7 +65,7 @@ public class SwagStoreApi { new Map(), new Map(), new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), new List { 'api_key' }, Map.class ); @@ -89,8 +89,8 @@ public class SwagStoreApi { 'orderId' => (Long) params.get('orderId') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List(), SwagOrder.class ); @@ -98,23 +98,23 @@ public class SwagStoreApi { /** * Place an order for a pet * - * @param body order placed for purchasing the pet (required) + * @param swagOrder order placed for purchasing the pet (required) * @return SwagOrder * @throws Swagger.ApiException if fails to make API call */ public SwagOrder placeOrder(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagOrder'), 'swagOrder'); List query = new List(); List form = new List(); return (SwagOrder) client.invoke( 'POST', '/store/order', - (SwagOrder) params.get('body'), + (SwagOrder) params.get('swagOrder'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List(), SwagOrder.class ); diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagUser.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagUser.cls index d8ec7643bb2..dcfa552a686 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagUser.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagUser.cls @@ -71,7 +71,7 @@ public class SwagUser { user.email = 'aeiou'; user.password = 'aeiou'; user.phone = 'aeiou'; - user.userStatus = 123; + user.userStatus = ; return user; } diff --git a/samples/client/petstore/apex/force-app/main/default/classes/SwagUserApi.cls b/samples/client/petstore/apex/force-app/main/default/classes/SwagUserApi.cls index 01d9ebe4013..6e48e28ce1d 100644 --- a/samples/client/petstore/apex/force-app/main/default/classes/SwagUserApi.cls +++ b/samples/client/petstore/apex/force-app/main/default/classes/SwagUserApi.cls @@ -28,22 +28,22 @@ public class SwagUserApi { /** * Create user * This can only be done by the logged in user. - * @param body Created user object (required) + * @param swagUser Created user object (required) * @throws Swagger.ApiException if fails to make API call */ public void createUser(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagUser'), 'swagUser'); List query = new List(); List form = new List(); client.invoke( 'POST', '/user', - (SwagUser) params.get('body'), + (SwagUser) params.get('swagUser'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -51,22 +51,22 @@ public class SwagUserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param swagUser List of user object (required) * @throws Swagger.ApiException if fails to make API call */ public void createUsersWithArrayInput(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagUser'), 'swagUser'); List query = new List(); List form = new List(); client.invoke( 'POST', '/user/createWithArray', - (List) params.get('body'), + (List) params.get('swagUser'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -74,22 +74,22 @@ public class SwagUserApi { /** * Creates list of users with given input array * - * @param body List of user object (required) + * @param swagUser List of user object (required) * @throws Swagger.ApiException if fails to make API call */ public void createUsersWithListInput(Map params) { - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagUser'), 'swagUser'); List query = new List(); List form = new List(); client.invoke( 'POST', '/user/createWithList', - (List) params.get('body'), + (List) params.get('swagUser'), query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -112,8 +112,8 @@ public class SwagUserApi { 'username' => (String) params.get('username') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -121,7 +121,7 @@ public class SwagUserApi { /** * Get user by user name * - * @param username The name that needs to be fetched. Use user1 for testing. (required) + * @param username The name that needs to be fetched. Use user1 for testing. (required) * @return SwagUser * @throws Swagger.ApiException if fails to make API call */ @@ -137,8 +137,8 @@ public class SwagUserApi { 'username' => (String) params.get('username') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List(), SwagUser.class ); @@ -167,8 +167,8 @@ public class SwagUserApi { query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List{ 'application/xml', 'application/json' }, + new List(), new List(), String.class ); @@ -187,8 +187,8 @@ public class SwagUserApi { query, form, new Map(), new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null ); @@ -197,25 +197,25 @@ public class SwagUserApi { * Updated user * This can only be done by the logged in user. * @param username name that need to be deleted (required) - * @param body Updated user object (required) + * @param swagUser Updated user object (required) * @throws Swagger.ApiException if fails to make API call */ public void updateUser(Map params) { client.assertNotNull(params.get('username'), 'username'); - client.assertNotNull(params.get('body'), 'body'); + client.assertNotNull(params.get('swagUser'), 'swagUser'); List query = new List(); List form = new List(); client.invoke( 'PUT', '/user/{username}', - (SwagUser) params.get('body'), + (SwagUser) params.get('swagUser'), query, form, new Map{ 'username' => (String) params.get('username') }, new Map(), - new List{ 'application/json' }, - new List{ 'application/json' }, + new List(), + new List(), new List(), null );