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> <a name="addPet"></a>
# **addPet** # **addPet**
> addPet(body) > addPet(swagPet)
Add a new pet to the store Add a new pet to the store
### Example ### Example
```java ```java
SwagPetApi api = new SwagPetApi(); SwagPetApi api = new SwagPetApi();
@ -32,7 +30,7 @@ Swagger.OAuth petstore_auth = (Swagger.OAuth) client.getAuthentication('petstore
petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); petstore_auth.setAccessToken('YOUR ACCESS TOKEN');
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => SwagPet.getExample() 'swagPet' => SwagPet.getExample()
}; };
try { try {
@ -47,7 +45,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -59,8 +57,8 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json, application/xml
- **Accept**: application/json - **Accept**: Not defined
<a name="deletePet"></a> <a name="deletePet"></a>
# **deletePet** # **deletePet**
@ -68,8 +66,6 @@ null (empty response body)
Deletes a pet Deletes a pet
### Example ### Example
```java ```java
SwagPetApi api = new SwagPetApi(); SwagPetApi api = new SwagPetApi();
@ -81,7 +77,7 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN');
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'petId' => 2147483648L, 'petId' => 2147483648L,
'apiKey' => 'apiKey_example' 'apiKey' => 'null'
}; };
try { try {
@ -109,8 +105,8 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="findPetsByStatus"></a> <a name="findPetsByStatus"></a>
# **findPetsByStatus** # **findPetsByStatus**
@ -158,8 +154,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="findPetsByTags"></a> <a name="findPetsByTags"></a>
# **findPetsByTags** # **findPetsByTags**
@ -207,8 +203,8 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="getPetById"></a> <a name="getPetById"></a>
# **getPetById** # **getPetById**
@ -256,17 +252,15 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="updatePet"></a> <a name="updatePet"></a>
# **updatePet** # **updatePet**
> updatePet(body) > updatePet(swagPet)
Update an existing pet Update an existing pet
### Example ### Example
```java ```java
SwagPetApi api = new SwagPetApi(); SwagPetApi api = new SwagPetApi();
@ -277,7 +271,7 @@ Swagger.OAuth petstore_auth = (Swagger.OAuth) client.getAuthentication('petstore
petstore_auth.setAccessToken('YOUR ACCESS TOKEN'); petstore_auth.setAccessToken('YOUR ACCESS TOKEN');
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => SwagPet.getExample() 'swagPet' => SwagPet.getExample()
}; };
try { try {
@ -292,7 +286,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -304,8 +298,8 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: application/json, application/xml
- **Accept**: application/json - **Accept**: Not defined
<a name="updatePetWithForm"></a> <a name="updatePetWithForm"></a>
# **updatePetWithForm** # **updatePetWithForm**
@ -313,8 +307,6 @@ null (empty response body)
Updates a pet in the store with form data Updates a pet in the store with form data
### Example ### Example
```java ```java
SwagPetApi api = new SwagPetApi(); SwagPetApi api = new SwagPetApi();
@ -326,8 +318,8 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN');
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'petId' => 2147483648L, 'petId' => 2147483648L,
'name' => 'name_example', 'name' => 'null',
'status' => 'status_example' 'status' => 'null'
}; };
try { try {
@ -357,7 +349,7 @@ null (empty response body)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json - **Accept**: Not defined
<a name="uploadFile"></a> <a name="uploadFile"></a>
# **uploadFile** # **uploadFile**
@ -365,8 +357,6 @@ null (empty response body)
uploads an image uploads an image
### Example ### Example
```java ```java
SwagPetApi api = new SwagPetApi(); SwagPetApi api = new SwagPetApi();
@ -378,7 +368,7 @@ petstore_auth.setAccessToken('YOUR ACCESS TOKEN');
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'petId' => 2147483648L, 'petId' => 2147483648L,
'additionalMetadata' => 'additionalMetadata_example', 'additionalMetadata' => 'null',
'file' => Blob.valueOf('Sample text file\nContents') 'file' => Blob.valueOf('Sample text file\nContents')
}; };
@ -409,6 +399,6 @@ Name | Type | Description | Notes
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: multipart/form-data
- **Accept**: application/json - **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(); SwagStoreApi api = new SwagStoreApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'orderId' => 'orderId_example' 'orderId' => 'null'
}; };
try { try {
@ -50,8 +50,8 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="getInventory"></a> <a name="getInventory"></a>
# **getInventory** # **getInventory**
@ -84,7 +84,7 @@ This endpoint does not need any parameter.
### Return type ### Return type
[**Map&lt;String, Integer&gt;**](Map.md) **Map&lt;String, Integer&gt;**
### Authorization ### Authorization
@ -92,7 +92,7 @@ This endpoint does not need any parameter.
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/json
<a name="getOrderById"></a> <a name="getOrderById"></a>
@ -124,7 +124,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**orderId** | **Long**| ID of pet that needs to be fetched | **orderId** | **Long**| ID of pet that needs to be fetched | [enum: ]
### Return type ### Return type
@ -136,23 +136,21 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="placeOrder"></a> <a name="placeOrder"></a>
# **placeOrder** # **placeOrder**
> SwagOrder placeOrder(body) > SwagOrder placeOrder(swagOrder)
Place an order for a pet Place an order for a pet
### Example ### Example
```java ```java
SwagStoreApi api = new SwagStoreApi(); SwagStoreApi api = new SwagStoreApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => SwagOrder.getExample() 'swagOrder' => SwagOrder.getExample()
}; };
try { try {
@ -168,7 +166,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -180,6 +178,6 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json

View File

@ -16,7 +16,7 @@ Method | HTTP request | Description
<a name="createUser"></a> <a name="createUser"></a>
# **createUser** # **createUser**
> createUser(body) > createUser(swagUser)
Create user Create user
@ -27,7 +27,7 @@ This can only be done by the logged in user.
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => SwagUser.getExample() 'swagUser' => SwagUser.getExample()
}; };
try { try {
@ -42,7 +42,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**SwagUser**](User.md)| Created user object | **swagUser** | [**SwagUser**](SwagUser.md)| Created user object |
### Return type ### Return type
@ -54,23 +54,21 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="createUsersWithArrayInput"></a> <a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput** # **createUsersWithArrayInput**
> createUsersWithArrayInput(body) > createUsersWithArrayInput(swagUser)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => new List<SwagUser>{SwagUser.getExample()} 'swagUser' => new List<SwagUser>{SwagUser.getExample()}
}; };
try { try {
@ -85,7 +83,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -97,23 +95,21 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="createUsersWithListInput"></a> <a name="createUsersWithListInput"></a>
# **createUsersWithListInput** # **createUsersWithListInput**
> createUsersWithListInput(body) > createUsersWithListInput(swagUser)
Creates list of users with given input array Creates list of users with given input array
### Example ### Example
```java ```java
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'body' => new List<SwagUser>{SwagUser.getExample()} 'swagUser' => new List<SwagUser>{SwagUser.getExample()}
}; };
try { try {
@ -128,7 +124,7 @@ try {
Name | Type | Description | Notes 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 ### Return type
@ -140,8 +136,8 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="deleteUser"></a> <a name="deleteUser"></a>
# **deleteUser** # **deleteUser**
@ -156,7 +152,7 @@ This can only be done by the logged in user.
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'username' => 'username_example' 'username' => 'null'
}; };
try { try {
@ -183,8 +179,8 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="getUserByName"></a> <a name="getUserByName"></a>
# **getUserByName** # **getUserByName**
@ -192,14 +188,12 @@ No authorization required
Get user by user name Get user by user name
### Example ### Example
```java ```java
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'username' => 'username_example' 'username' => 'null'
}; };
try { try {
@ -227,8 +221,8 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="loginUser"></a> <a name="loginUser"></a>
# **loginUser** # **loginUser**
@ -236,15 +230,13 @@ No authorization required
Logs user into the system Logs user into the system
### Example ### Example
```java ```java
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'username' => 'username_example', 'username' => 'null',
'password' => 'password_example' 'password' => 'null'
}; };
try { try {
@ -273,8 +265,8 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/xml, application/json
<a name="logoutUser"></a> <a name="logoutUser"></a>
# **logoutUser** # **logoutUser**
@ -282,8 +274,6 @@ No authorization required
Logs out current logged in user session Logs out current logged in user session
### Example ### Example
```java ```java
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
@ -309,12 +299,12 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined
<a name="updateUser"></a> <a name="updateUser"></a>
# **updateUser** # **updateUser**
> updateUser(username, body) > updateUser(username, swagUser)
Updated user Updated user
@ -325,8 +315,8 @@ This can only be done by the logged in user.
SwagUserApi api = new SwagUserApi(); SwagUserApi api = new SwagUserApi();
Map<String, Object> params = new Map<String, Object>{ Map<String, Object> params = new Map<String, Object>{
'username' => 'username_example', 'username' => 'null',
'body' => SwagUser.getExample() 'swagUser' => SwagUser.getExample()
}; };
try { try {
@ -342,7 +332,7 @@ try {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted | **username** | **String**| name that need to be deleted |
**body** | [**SwagUser**](User.md)| Updated user object | **swagUser** | [**SwagUser**](SwagUser.md)| Updated user object |
### Return type ### Return type
@ -354,6 +344,6 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/json - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: Not defined

View File

@ -42,7 +42,7 @@ public class SwagApiResponse implements Swagger.MappedProperties {
public static SwagApiResponse getExample() { public static SwagApiResponse getExample() {
SwagApiResponse apiResponse = new SwagApiResponse(); SwagApiResponse apiResponse = new SwagApiResponse();
apiResponse.code = 123; apiResponse.code = ;
apiResponse.r_type = 'aeiou'; apiResponse.r_type = 'aeiou';
apiResponse.message = 'aeiou'; apiResponse.message = 'aeiou';
return apiResponse; return apiResponse;

View File

@ -67,7 +67,7 @@ public class SwagOrder {
SwagOrder order = new SwagOrder(); SwagOrder order = new SwagOrder();
order.id = 123456789L; order.id = 123456789L;
order.petId = 123456789L; order.petId = 123456789L;
order.quantity = 123; order.quantity = ;
order.shipDate = Datetime.newInstanceGmt(2000, 1, 23, 4, 56, 7); order.shipDate = Datetime.newInstanceGmt(2000, 1, 23, 4, 56, 7);
order.status = StatusEnum.PLACED; order.status = StatusEnum.PLACED;
order.complete = true; order.complete = true;

View File

@ -28,22 +28,22 @@ public class SwagPetApi {
/** /**
* Add a new pet to the store * Add a new pet to the store
* *
* @param body Pet object that needs to be added to the store (required) * @param swagPet Pet object that needs to be added to the store (required)
* @throws Swagger.ApiException if fails to make API call * @throws Swagger.ApiException if fails to make API call
*/ */
public void addPet(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'POST', '/pet', 'POST', '/pet',
(SwagPet) params.get('body'), (SwagPet) params.get('swagPet'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/json', 'application/xml' },
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
null null
); );
@ -69,8 +69,8 @@ public class SwagPetApi {
new Map<String, Object>{ new Map<String, Object>{
'api_key' => (String) params.get('apiKey') 'api_key' => (String) params.get('apiKey')
}, },
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
null null
); );
@ -96,8 +96,8 @@ public class SwagPetApi {
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
List<SwagPet>.class List<SwagPet>.class
); );
@ -123,8 +123,8 @@ public class SwagPetApi {
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
List<SwagPet>.class List<SwagPet>.class
); );
@ -148,8 +148,8 @@ public class SwagPetApi {
'petId' => (Long) params.get('petId') 'petId' => (Long) params.get('petId')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String> { 'api_key' }, new List<String> { 'api_key' },
SwagPet.class SwagPet.class
); );
@ -157,22 +157,22 @@ public class SwagPetApi {
/** /**
* Update an existing pet * 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 * @throws Swagger.ApiException if fails to make API call
*/ */
public void updatePet(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'PUT', '/pet', 'PUT', '/pet',
(SwagPet) params.get('body'), (SwagPet) params.get('swagPet'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/json', 'application/xml' },
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
null null
); );
@ -201,7 +201,7 @@ public class SwagPetApi {
'petId' => (Long) params.get('petId') 'petId' => (Long) params.get('petId')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/x-www-form-urlencoded' }, new List<String>{ 'application/x-www-form-urlencoded' },
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
null null
@ -233,7 +233,7 @@ public class SwagPetApi {
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/json' },
new List<String>{ 'application/x-www-form-urlencoded' }, new List<String>{ 'multipart/form-data' },
new List<String> { 'petstore_auth' }, new List<String> { 'petstore_auth' },
SwagApiResponse.class SwagApiResponse.class
); );

View File

@ -43,8 +43,8 @@ public class SwagStoreApi {
'orderId' => (String) params.get('orderId') 'orderId' => (String) params.get('orderId')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -65,7 +65,7 @@ public class SwagStoreApi {
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String> { 'api_key' }, new List<String> { 'api_key' },
Map<String, Integer>.class Map<String, Integer>.class
); );
@ -89,8 +89,8 @@ public class SwagStoreApi {
'orderId' => (Long) params.get('orderId') 'orderId' => (Long) params.get('orderId')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
SwagOrder.class SwagOrder.class
); );
@ -98,23 +98,23 @@ public class SwagStoreApi {
/** /**
* Place an order for a pet * 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 * @return SwagOrder
* @throws Swagger.ApiException if fails to make API call * @throws Swagger.ApiException if fails to make API call
*/ */
public SwagOrder placeOrder(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
return (SwagOrder) client.invoke( return (SwagOrder) client.invoke(
'POST', '/store/order', 'POST', '/store/order',
(SwagOrder) params.get('body'), (SwagOrder) params.get('swagOrder'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
SwagOrder.class SwagOrder.class
); );

View File

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

View File

@ -28,22 +28,22 @@ public class SwagUserApi {
/** /**
* Create user * Create user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param body Created user object (required) * @param swagUser Created user object (required)
* @throws Swagger.ApiException if fails to make API call * @throws Swagger.ApiException if fails to make API call
*/ */
public void createUser(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'POST', '/user', 'POST', '/user',
(SwagUser) params.get('body'), (SwagUser) params.get('swagUser'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -51,22 +51,22 @@ public class SwagUserApi {
/** /**
* Creates list of users with given input array * 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 * @throws Swagger.ApiException if fails to make API call
*/ */
public void createUsersWithArrayInput(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'POST', '/user/createWithArray', 'POST', '/user/createWithArray',
(List<SwagUser>) params.get('body'), (List<SwagUser>) params.get('swagUser'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -74,22 +74,22 @@ public class SwagUserApi {
/** /**
* Creates list of users with given input array * 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 * @throws Swagger.ApiException if fails to make API call
*/ */
public void createUsersWithListInput(Map<String, Object> params) { 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'POST', '/user/createWithList', 'POST', '/user/createWithList',
(List<SwagUser>) params.get('body'), (List<SwagUser>) params.get('swagUser'),
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -112,8 +112,8 @@ public class SwagUserApi {
'username' => (String) params.get('username') 'username' => (String) params.get('username')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -137,8 +137,8 @@ public class SwagUserApi {
'username' => (String) params.get('username') 'username' => (String) params.get('username')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
SwagUser.class SwagUser.class
); );
@ -167,8 +167,8 @@ public class SwagUserApi {
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>{ 'application/xml', 'application/json' },
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
String.class String.class
); );
@ -187,8 +187,8 @@ public class SwagUserApi {
query, form, query, form,
new Map<String, Object>(), new Map<String, Object>(),
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );
@ -197,25 +197,25 @@ public class SwagUserApi {
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
* @param username name that need to be deleted (required) * @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 * @throws Swagger.ApiException if fails to make API call
*/ */
public void updateUser(Map<String, Object> params) { public void updateUser(Map<String, Object> params) {
client.assertNotNull(params.get('username'), 'username'); 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> query = new List<Swagger.Param>();
List<Swagger.Param> form = new List<Swagger.Param>(); List<Swagger.Param> form = new List<Swagger.Param>();
client.invoke( client.invoke(
'PUT', '/user/{username}', 'PUT', '/user/{username}',
(SwagUser) params.get('body'), (SwagUser) params.get('swagUser'),
query, form, query, form,
new Map<String, Object>{ new Map<String, Object>{
'username' => (String) params.get('username') 'username' => (String) params.get('username')
}, },
new Map<String, Object>(), new Map<String, Object>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>{ 'application/json' }, new List<String>(),
new List<String>(), new List<String>(),
null null
); );