fix java default and feign sample

This commit is contained in:
wing328 2016-04-27 23:28:15 +08:00
parent 0310d95800
commit 70b25a682d
49 changed files with 370 additions and 690 deletions

View File

@ -1,12 +1,10 @@
<Properties StartupItem="SwaggerClientTest.csproj">
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs">
<MonoDevelop.Ide.Workbench ActiveDocument="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/EnumTest.cs">
<Files>
<File FileName="TestPet.cs" Line="1" Column="1" />
<File FileName="TestOrder.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/EnumTest.cs" Line="1" Column="1" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs" Line="71" Column="57" />
<File FileName="TestEnum.cs" Line="24" Column="12" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/EnumTest.cs" Line="18" Column="58" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Order.cs" Line="1" Column="1" />
<File FileName="TestEnum.cs" Line="28" Column="75" />
<File FileName="Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/EnumClass.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>

View File

@ -15,7 +15,6 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | |
**dateTime** | [**Date**](Date.md) | | [optional]
**uuid** | **String** | | [optional]
**password** | **String** | |

View File

@ -16,9 +16,9 @@ Name | Type | Description | Notes
## Enum: StatusEnum
Name | Value
---- | -----
PLACED | placed
APPROVED | approved
DELIVERED | delivered
PLACED | &quot;placed&quot;
APPROVED | &quot;approved&quot;
DELIVERED | &quot;delivered&quot;

View File

@ -16,9 +16,9 @@ Name | Type | Description | Notes
## Enum: StatusEnum
Name | Value
---- | -----
AVAILABLE | available
PENDING | pending
SOLD | sold
AVAILABLE | &quot;available&quot;
PENDING | &quot;pending&quot;
SOLD | &quot;sold&quot;

View File

@ -3,7 +3,7 @@ package io.swagger.client;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;

View File

@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

View File

@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class Pair {
private String name = "";
private String value = "";

View File

@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@ -8,15 +8,15 @@ import io.swagger.client.Configuration;
import io.swagger.client.Pair;
import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class PetApi {
private ApiClient apiClient;
@ -36,16 +36,20 @@ public class PetApi {
this.apiClient = apiClient;
}
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
*/
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");
}
// create path and map variables
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
@ -57,11 +61,8 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -74,49 +75,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array (optional)
* @throws ApiException if fails to make API call
*/
public void addPetUsingByteArray(byte[] body) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Deletes a pet
*
@ -142,15 +101,12 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -163,19 +119,22 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter (required)
* @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'status' is set
if (status == null) {
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
}
// create path and map variables
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
@ -184,16 +143,12 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -204,22 +159,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return List<Pet>
* @throws ApiException if fails to make API call
*/
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'tags' is set
if (tags == null) {
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
}
// create path and map variables
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
@ -228,16 +185,12 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -248,16 +201,13 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Pet
* @throws ApiException if fails to make API call
*/
@ -281,11 +231,8 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -294,119 +241,25 @@ public class PetApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return InlineResponse200
* @throws ApiException if fails to make API call
*/
public InlineResponse200 getPetByIdInObject(Long petId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetByIdInObject");
}
// create path and map variables
String localVarPath = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<InlineResponse200> localVarReturnType = new GenericType<InlineResponse200>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return byte[]
* @throws ApiException if fails to make API call
*/
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException(400, "Missing the required parameter 'petId' when calling petPetIdtestingByteArraytrueGet");
}
// create path and map variables
String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key", "petstore_auth" };
GenericType<byte[]> localVarReturnType = new GenericType<byte[]>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException if fails to make API call
*/
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");
}
// create path and map variables
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
@ -418,11 +271,8 @@ public class PetApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -435,9 +285,7 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Updates a pet in the store with form data
*
@ -446,7 +294,7 @@ public class PetApi {
* @param status Updated status of the pet (optional)
* @throws ApiException if fails to make API call
*/
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
@ -465,16 +313,13 @@ public class PetApi {
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -487,18 +332,17 @@ public class PetApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* uploads an image
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ModelApiResponse
* @throws ApiException if fails to make API call
*/
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
@ -517,16 +361,13 @@ public class PetApi {
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -537,9 +378,7 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class StoreApi {
private ApiClient apiClient;
@ -34,7 +34,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
@ -61,11 +60,8 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -78,53 +74,7 @@ public class StoreApi {
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @return List<Order>
* @throws ApiException if fails to make API call
*/
public List<Order> findOrdersByStatus(String status) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/store/findByStatus".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
GenericType<List<Order>> localVarReturnType = new GenericType<List<Order>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@ -145,11 +95,8 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -160,61 +107,17 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Object
* @throws ApiException if fails to make API call
*/
public Object getInventoryInObject() throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
// query params
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
* @throws ApiException if fails to make API call
*/
public Order getOrderById(String orderId) throws ApiException {
public Order getOrderById(Long orderId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
@ -234,11 +137,8 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -247,24 +147,26 @@ public class StoreApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "test_api_key_header", "test_api_key_query" };
String[] localVarAuthNames = new String[] { };
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet (required)
* @return Order
* @throws ApiException if fails to make API call
*/
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");
}
// create path and map variables
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
@ -276,11 +178,8 @@ public class StoreApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -289,12 +188,9 @@ public class StoreApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
String[] localVarAuthNames = new String[] { };
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
}

View File

@ -14,7 +14,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class UserApi {
private ApiClient apiClient;
@ -34,16 +34,20 @@ public class UserApi {
this.apiClient = apiClient;
}
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object (required)
* @throws ApiException if fails to make API call
*/
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");
}
// create path and map variables
String localVarPath = "/user".replaceAll("\\{format\\}","json");
@ -55,11 +59,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -72,18 +73,21 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @throws ApiException if fails to make API call
*/
public void createUsersWithArrayInput(List<User> body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
}
// create path and map variables
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
@ -95,11 +99,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -112,18 +113,21 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @throws ApiException if fails to make API call
*/
public void createUsersWithListInput(List<User> body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
}
// create path and map variables
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
@ -135,11 +139,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -152,9 +153,7 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Delete user
* This can only be done by the logged in user.
@ -181,11 +180,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -194,13 +190,11 @@ public class UserApi {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "test_http_basic" };
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Get user by user name
*
@ -228,11 +222,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -243,23 +234,30 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
GenericType<User> localVarReturnType = new GenericType<User>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs user into the system
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return String
* @throws ApiException if fails to make API call
*/
public String loginUser(String username, String password) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
}
// verify the required parameter 'password' is set
if (password == null) {
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
}
// create path and map variables
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
@ -268,18 +266,13 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -290,12 +283,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs out current logged in user session
*
@ -315,11 +305,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -332,14 +319,12 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* 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 (optional)
* @param body Updated user object (required)
* @throws ApiException if fails to make API call
*/
public void updateUser(String username, User body) throws ApiException {
@ -350,6 +335,11 @@ public class UserApi {
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");
}
// create path and map variables
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@ -362,11 +352,8 @@ public class UserApi {
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@ -379,7 +366,5 @@ public class UserApi {
apiClient.invokeAPI(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
}

View File

@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;

View File

@ -9,7 +9,7 @@ import java.util.List;
import java.io.UnsupportedEncodingException;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class HttpBasicAuth implements Authentication {
private String username;
private String password;

View File

@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-02T22:36:41.205+08:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Animal {
private String className = null;
@ -32,7 +32,6 @@ public class Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
/**
* Cat
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Cat extends Animal {
private String className = null;
@ -51,7 +51,6 @@ public class Cat extends Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Category
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Category {
private Long id = null;
@ -50,7 +50,6 @@ public class Category {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
/**
* Dog
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Dog extends Animal {
private String className = null;
@ -51,7 +51,6 @@ public class Dog extends Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* EnumTest
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class EnumTest {
@ -132,7 +132,6 @@ public class EnumTest {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -8,9 +8,9 @@ import java.math.BigDecimal;
import java.util.Date;
/**
* FormatTest
*/
public class FormatTest {

View File

@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model200Response
* Model for testing model name starting with number
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
private Integer name = null;
@ -32,7 +33,6 @@ public class Model200Response {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -6,9 +6,9 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ModelApiResponse
*/
public class ModelApiResponse {

View File

@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
/**
* ModelReturn
* Model for testing reserved words
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
private Integer _return = null;
@ -32,7 +33,6 @@ public class ModelReturn {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -7,13 +7,15 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Name
* Model for testing model name same as property name
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
private Integer name = null;
private Integer snakeCase = null;
private String property = null;
/**
@ -23,7 +25,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@ -33,22 +35,28 @@ public class Name {
}
/**
**/
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("snake_case")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
/**
**/
public Name property(String property) {
this.property = property;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("property")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
@Override
@ -61,12 +69,13 @@ public class Name {
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase);
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase);
return Objects.hash(name, snakeCase, property);
}
@Override
@ -76,6 +85,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@ -11,7 +11,7 @@ import java.util.Date;
/**
* Order
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Order {
private Long id = null;
@ -40,15 +40,25 @@ public class Order {
}
}
private StatusEnum status = StatusEnum.PLACED;
private Boolean complete = null;
private StatusEnum status = null;
private Boolean complete = false;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
@ -137,7 +147,6 @@ public class Order {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -14,7 +14,7 @@ import java.util.List;
/**
* Pet
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Pet {
private Long id = null;
@ -150,7 +150,6 @@ public class Pet {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* SpecialModelName
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@ -32,7 +32,6 @@ public class SpecialModelName {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Tag
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class Tag {
private Long id = null;
@ -50,7 +50,6 @@ public class Tag {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* User
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T22:48:50.833+08:00")
public class User {
private Long id = null;
@ -159,7 +159,6 @@ public class User {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -14,7 +14,7 @@ import feign.codec.EncodeException;
import feign.codec.Encoder;
import feign.RequestTemplate;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class FormAwareEncoder implements Encoder {
public static final String UTF_8 = "utf-8";
private static final String LINE_FEED = "\r\n";

View File

@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@ -3,8 +3,8 @@ package io.swagger.client.api;
import io.swagger.client.ApiClient;
import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import java.util.ArrayList;
import java.util.HashMap;
@ -12,14 +12,14 @@ import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public interface PetApi extends ApiClient.Api {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @return void
*/
@RequestLine("POST /pet")
@ -29,19 +29,6 @@ public interface PetApi extends ApiClient.Api {
})
void addPet(Pet body);
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array (optional)
* @return void
*/
@RequestLine("POST /pet?testing_byte_array=true")
@Headers({
"Content-type: application/json",
"Accepts: application/json",
})
void addPetUsingByteArray(byte[] body);
/**
* Deletes a pet
*
@ -60,7 +47,7 @@ public interface PetApi extends ApiClient.Api {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter (required)
* @return List<Pet>
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@ -72,8 +59,8 @@ public interface PetApi extends ApiClient.Api {
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return List<Pet>
*/
@RequestLine("GET /pet/findByTags?tags={tags}")
@ -85,8 +72,8 @@ public interface PetApi extends ApiClient.Api {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Pet
*/
@RequestLine("GET /pet/{petId}")
@ -96,36 +83,10 @@ public interface PetApi extends ApiClient.Api {
})
Pet getPetById(@Param("petId") Long petId);
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return InlineResponse200
*/
@RequestLine("GET /pet/{petId}?response=inline_arbitrary_object")
@Headers({
"Content-type: application/json",
"Accepts: application/json",
})
InlineResponse200 getPetByIdInObject(@Param("petId") Long petId);
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return byte[]
*/
@RequestLine("GET /pet/{petId}?testing_byte_array=true")
@Headers({
"Content-type: application/json",
"Accepts: application/json",
})
byte[] petPetIdtestingByteArraytrueGet(@Param("petId") Long petId);
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @return void
*/
@RequestLine("PUT /pet")
@ -148,7 +109,7 @@ public interface PetApi extends ApiClient.Api {
"Content-type: application/x-www-form-urlencoded",
"Accepts: application/json",
})
void updatePetWithForm(@Param("petId") String petId, @Param("name") String name, @Param("status") String status);
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
/**
* uploads an image
@ -156,13 +117,12 @@ public interface PetApi extends ApiClient.Api {
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return void
* @return ModelApiResponse
*/
@RequestLine("POST /pet/{petId}/uploadImage")
@Headers({
"Content-type: multipart/form-data",
"Accepts: application/json",
})
void uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
}

View File

@ -10,7 +10,7 @@ import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public interface StoreApi extends ApiClient.Api {
@ -27,19 +27,6 @@ public interface StoreApi extends ApiClient.Api {
})
void deleteOrder(@Param("orderId") String orderId);
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @return List<Order>
*/
@RequestLine("GET /store/findByStatus?status={status}")
@Headers({
"Content-type: application/json",
"Accepts: application/json",
})
List<Order> findOrdersByStatus(@Param("status") String status);
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
@ -52,21 +39,9 @@ public interface StoreApi extends ApiClient.Api {
})
Map<String, Integer> getInventory();
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Object
*/
@RequestLine("GET /store/inventory?response=arbitrary_object")
@Headers({
"Content-type: application/json",
"Accepts: application/json",
})
Object getInventoryInObject();
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
*/
@ -75,12 +50,12 @@ public interface StoreApi extends ApiClient.Api {
"Content-type: application/json",
"Accepts: application/json",
})
Order getOrderById(@Param("orderId") String orderId);
Order getOrderById(@Param("orderId") Long orderId);
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet (required)
* @return Order
*/
@RequestLine("POST /store/order")
@ -89,5 +64,4 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Order placeOrder(Order body);
}

View File

@ -10,14 +10,14 @@ import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public interface UserApi extends ApiClient.Api {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object (required)
* @return void
*/
@RequestLine("POST /user")
@ -30,7 +30,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @return void
*/
@RequestLine("POST /user/createWithArray")
@ -43,7 +43,7 @@ public interface UserApi extends ApiClient.Api {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @return void
*/
@RequestLine("POST /user/createWithList")
@ -82,8 +82,8 @@ public interface UserApi extends ApiClient.Api {
/**
* Logs user into the system
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return String
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@ -109,7 +109,7 @@ public interface UserApi extends ApiClient.Api {
* 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 (optional)
* @param body Updated user object (required)
* @return void
*/
@RequestLine("PUT /user/{username}")
@ -118,5 +118,4 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void updateUser(@Param("username") String username, User body);
}

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Animal
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Animal {
private String className = null;
@ -32,7 +32,6 @@ public class Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
/**
* Cat
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Cat extends Animal {
private String className = null;
@ -51,7 +51,6 @@ public class Cat extends Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Category
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Category {
private Long id = null;
@ -50,7 +50,6 @@ public class Category {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
/**
* Dog
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Dog extends Animal {
private String className = null;
@ -51,7 +51,6 @@ public class Dog extends Animal {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* EnumTest
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class EnumTest {
@ -132,7 +132,6 @@ public class EnumTest {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -8,10 +8,10 @@ import java.math.BigDecimal;
import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
/**
* FormatTest
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class FormatTest {
private Integer integer = null;
@ -29,6 +29,8 @@ public class FormatTest {
/**
* minimum: 10.0
* maximum: 100.0
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
@ -46,6 +48,8 @@ public class FormatTest {
/**
* minimum: 20.0
* maximum: 200.0
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
@ -80,6 +84,8 @@ public class FormatTest {
/**
* minimum: 32.1
* maximum: 543.2
**/
public FormatTest number(BigDecimal number) {
this.number = number;
@ -97,6 +103,8 @@ public class FormatTest {
/**
* minimum: 54.3
* maximum: 987.6
**/
public FormatTest _float(Float _float) {
this._float = _float;
@ -114,6 +122,8 @@ public class FormatTest {
/**
* minimum: 67.8
* maximum: 123.4
**/
public FormatTest _double(Double _double) {
this._double = _double;
@ -154,7 +164,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("byte")
public byte[] getByte() {
return _byte;
@ -188,7 +198,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("date")
public Date getDate() {
return date;
@ -222,7 +232,7 @@ public class FormatTest {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("password")
public String getPassword() {
return password;

View File

@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model200Response
* Model for testing model name starting with number
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@ApiModel(description = "Model for testing model name starting with number")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Model200Response {
private Integer name = null;
@ -32,7 +33,6 @@ public class Model200Response {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -6,10 +6,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:48:24.088+08:00")
/**
* ModelApiResponse
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class ModelApiResponse {
private Integer code = null;

View File

@ -7,9 +7,10 @@ import io.swagger.annotations.ApiModelProperty;
/**
* ModelReturn
* Model for testing reserved words
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class ModelReturn {
private Integer _return = null;
@ -32,7 +33,6 @@ public class ModelReturn {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -7,13 +7,15 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Name
* Model for testing model name same as property name
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@ApiModel(description = "Model for testing model name same as property name")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Name {
private Integer name = null;
private Integer snakeCase = null;
private String property = null;
/**
@ -23,7 +25,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@ -33,22 +35,28 @@ public class Name {
}
/**
**/
public Name snakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("snake_case")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
/**
**/
public Name property(String property) {
this.property = property;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("property")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
@Override
@ -61,12 +69,13 @@ public class Name {
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase);
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase);
return Objects.hash(name, snakeCase, property);
}
@Override
@ -76,6 +85,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@ -11,7 +11,7 @@ import java.util.Date;
/**
* Order
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Order {
private Long id = null;
@ -40,15 +40,25 @@ public class Order {
}
}
private StatusEnum status = StatusEnum.PLACED;
private Boolean complete = null;
private StatusEnum status = null;
private Boolean complete = false;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
@ -137,7 +147,6 @@ public class Order {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -14,7 +14,7 @@ import java.util.List;
/**
* Pet
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Pet {
private Long id = null;
@ -150,7 +150,6 @@ public class Pet {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* SpecialModelName
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@ -32,7 +32,6 @@ public class SpecialModelName {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Tag
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class Tag {
private Long id = null;
@ -50,7 +50,6 @@ public class Tag {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
/**
* User
*/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-12T23:06:03.099+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T23:17:22.230+08:00")
public class User {
private Long id = null;
@ -159,7 +159,6 @@ public class User {
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {