Generate apex (#224)

This commit is contained in:
Jérémie Bresson 2018-04-29 14:38:18 +02:00 committed by William Cheng
parent c60010c965
commit 1587d202b0
10 changed files with 134 additions and 156 deletions

View File

@ -1 +1 @@
2.2.3-SNAPSHOT
3.0.0-SNAPSHOT

View File

@ -16,12 +16,10 @@ Method | HTTP request | Description
<a name="addPet"></a>
# **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<String, Object> params = new Map<String, Object>{
'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
<a name="deletePet"></a>
# **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<String, Object> params = new Map<String, Object>{
'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
<a name="findPetsByStatus"></a>
# **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
<a name="findPetsByTags"></a>
# **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
<a name="getPetById"></a>
# **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
<a name="updatePet"></a>
# **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<String, Object> params = new Map<String, Object>{
'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
<a name="updatePetWithForm"></a>
# **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<String, Object> params = new Map<String, Object>{
'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
<a name="uploadFile"></a>
# **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<String, Object> params = new Map<String, Object>{
'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

View File

@ -23,7 +23,7 @@ For valid response try integer IDs with value &lt; 1000. Anything above 1000 or
SwagStoreApi api = new SwagStoreApi();
Map<String, Object> params = new Map<String, Object>{
'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
<a name="getInventory"></a>
# **getInventory**
@ -84,7 +84,7 @@ This endpoint does not need any parameter.
### Return type
[**Map&lt;String, Integer&gt;**](Map.md)
**Map&lt;String, Integer&gt;**
### 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
<a name="getOrderById"></a>
@ -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
<a name="placeOrder"></a>
# **placeOrder**
> SwagOrder placeOrder(body)
> SwagOrder placeOrder(swagOrder)
Place an order for a pet
### Example
```java
SwagStoreApi api = new SwagStoreApi();
Map<String, Object> params = new Map<String, Object>{
'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

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a>
# **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<String, Object> params = new Map<String, Object>{
'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
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
> createUsersWithArrayInput(body)
> createUsersWithArrayInput(swagUser)
Creates list of users with given input array
### Example
```java
SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{
'body' => new List<SwagUser>{SwagUser.getExample()}
'swagUser' => new List<SwagUser>{SwagUser.getExample()}
};
try {
@ -85,7 +83,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;SwagUser&gt;**](SwagUser.md)| List of user object |
**swagUser** | [**List&lt;SwagUser&gt;**](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
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
> createUsersWithListInput(body)
> createUsersWithListInput(swagUser)
Creates list of users with given input array
### Example
```java
SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{
'body' => new List<SwagUser>{SwagUser.getExample()}
'swagUser' => new List<SwagUser>{SwagUser.getExample()}
};
try {
@ -128,7 +124,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;SwagUser&gt;**](SwagUser.md)| List of user object |
**swagUser** | [**List&lt;SwagUser&gt;**](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
<a name="deleteUser"></a>
# **deleteUser**
@ -156,7 +152,7 @@ This can only be done by the logged in user.
SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{
'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
<a name="getUserByName"></a>
# **getUserByName**
@ -192,14 +188,12 @@ No authorization required
Get user by user name
### Example
```java
SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{
'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
<a name="loginUser"></a>
# **loginUser**
@ -236,15 +230,13 @@ No authorization required
Logs user into the system
### Example
```java
SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{
'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
<a name="logoutUser"></a>
# **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
<a name="updateUser"></a>
# **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<String, Object> params = new Map<String, Object>{
'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

View File

@ -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;

View File

@ -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;

View File

@ -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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagPet'), 'swagPet');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'POST', '/pet',
(SwagPet) params.get('body'),
(SwagPet) params.get('swagPet'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>{ 'application/json', 'application/xml' },
new List<String> { 'petstore_auth' },
null
);
@ -69,8 +69,8 @@ public class SwagPetApi {
new Map<String, Object>{
'api_key' => (String) params.get('apiKey')
},
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String> { 'petstore_auth' },
null
);
@ -96,8 +96,8 @@ public class SwagPetApi {
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String> { 'petstore_auth' },
List<SwagPet>.class
);
@ -123,8 +123,8 @@ public class SwagPetApi {
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String> { 'petstore_auth' },
List<SwagPet>.class
);
@ -148,8 +148,8 @@ public class SwagPetApi {
'petId' => (Long) params.get('petId')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String> { '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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagPet'), 'swagPet');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'PUT', '/pet',
(SwagPet) params.get('body'),
(SwagPet) params.get('swagPet'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>{ 'application/json', 'application/xml' },
new List<String> { 'petstore_auth' },
null
);
@ -201,7 +201,7 @@ public class SwagPetApi {
'petId' => (Long) params.get('petId')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>(),
new List<String>{ 'application/x-www-form-urlencoded' },
new List<String> { 'petstore_auth' },
null
@ -233,7 +233,7 @@ public class SwagPetApi {
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/x-www-form-urlencoded' },
new List<String>{ 'multipart/form-data' },
new List<String> { 'petstore_auth' },
SwagApiResponse.class
);

View File

@ -43,8 +43,8 @@ public class SwagStoreApi {
'orderId' => (String) params.get('orderId')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
null
);
@ -65,7 +65,7 @@ public class SwagStoreApi {
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String> { 'api_key' },
Map<String, Integer>.class
);
@ -89,8 +89,8 @@ public class SwagStoreApi {
'orderId' => (Long) params.get('orderId')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String>(),
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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagOrder'), 'swagOrder');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
return (SwagOrder) client.invoke(
'POST', '/store/order',
(SwagOrder) params.get('body'),
(SwagOrder) params.get('swagOrder'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String>(),
SwagOrder.class
);

View File

@ -71,7 +71,7 @@ public class SwagUser {
user.email = 'aeiou';
user.password = 'aeiou';
user.phone = 'aeiou';
user.userStatus = 123;
user.userStatus = ;
return user;
}

View File

@ -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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagUser'), 'swagUser');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'POST', '/user',
(SwagUser) params.get('body'),
(SwagUser) params.get('swagUser'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagUser'), 'swagUser');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'POST', '/user/createWithArray',
(List<SwagUser>) params.get('body'),
(List<SwagUser>) params.get('swagUser'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
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<String, Object> params) {
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagUser'), 'swagUser');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'POST', '/user/createWithList',
(List<SwagUser>) params.get('body'),
(List<SwagUser>) params.get('swagUser'),
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
null
);
@ -112,8 +112,8 @@ public class SwagUserApi {
'username' => (String) params.get('username')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
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<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String>(),
SwagUser.class
);
@ -167,8 +167,8 @@ public class SwagUserApi {
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>{ 'application/xml', 'application/json' },
new List<String>(),
new List<String>(),
String.class
);
@ -187,8 +187,8 @@ public class SwagUserApi {
query, form,
new Map<String, Object>(),
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
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<String, Object> params) {
client.assertNotNull(params.get('username'), 'username');
client.assertNotNull(params.get('body'), 'body');
client.assertNotNull(params.get('swagUser'), 'swagUser');
List<Swagger.Param> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke(
'PUT', '/user/{username}',
(SwagUser) params.get('body'),
(SwagUser) params.get('swagUser'),
query, form,
new Map<String, Object>{
'username' => (String) params.get('username')
},
new Map<String, Object>(),
new List<String>{ 'application/json' },
new List<String>{ 'application/json' },
new List<String>(),
new List<String>(),
new List<String>(),
null
);