Merge branch 'master' into java-docs

Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	samples/client/petstore/java/default/pom.xml
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Animal.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Cat.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Dog.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java
This commit is contained in:
xhh
2016-04-19 20:19:10 +08:00
1173 changed files with 38550 additions and 26332 deletions

View File

@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -98,7 +98,7 @@ ext {
jackson_version = "2.4.2"
jersey_version = "1.18"
jodatime_version = "2.3"
junit_version = "4.8.1"
junit_version = "4.12"
}
dependencies {

View File

@@ -0,0 +1,12 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

View File

@@ -0,0 +1,21 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | | [optional]
**int32** | **Integer** | | [optional]
**int64** | **Long** | | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | | [optional]
**binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | | [optional]
**dateTime** | [**Date**](Date.md) | | [optional]
**password** | **String** | | [optional]

View File

@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional]

View File

@@ -5,13 +5,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by 'Find pet by ID'
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
@@ -54,7 +51,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -67,59 +64,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
<a name="addPetUsingByteArray"></a>
# **addPetUsingByteArray**
> addPetUsingByteArray(body)
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
byte[] body = BINARY_DATA_HERE; // byte[] | Pet object in the form of byte array
try {
apiInstance.addPetUsingByteArray(body);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPetUsingByteArray");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **byte[]**| Pet object in the form of byte array | [optional]
### Return type
null (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="deletePet"></a>
# **deletePet**
@@ -173,7 +118,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="findPetsByStatus"></a>
# **findPetsByStatus**
@@ -199,7 +144,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for query
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
try {
List<Pet> result = apiInstance.findPetsByStatus(status);
System.out.println(result);
@@ -213,7 +158,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for query | [optional] [default to available]
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for filter |
### Return type
@@ -226,7 +171,7 @@ Name | Type | Description | Notes
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="findPetsByTags"></a>
# **findPetsByTags**
@@ -234,7 +179,7 @@ Name | Type | Description | Notes
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example
```java
@@ -266,7 +211,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | [optional]
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by |
### Return type
@@ -279,7 +224,7 @@ Name | Type | Description | Notes
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getPetById"></a>
# **getPetById**
@@ -287,7 +232,7 @@ Name | Type | Description | Notes
Find pet by ID
Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
Returns a single pet
### Example
```java
@@ -300,10 +245,6 @@ Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API erro
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
@@ -311,7 +252,7 @@ api_key.setApiKey("YOUR API KEY");
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
Long petId = 789L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@@ -325,7 +266,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
**petId** | **Long**| ID of pet to return |
### Return type
@@ -333,130 +274,12 @@ Name | Type | Description | Notes
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="getPetByIdInObject"></a>
# **getPetByIdInObject**
> InlineResponse200 getPetByIdInObject(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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
try {
InlineResponse200 result = apiInstance.getPetByIdInObject(petId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#getPetByIdInObject");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
### Return type
[**InlineResponse200**](InlineResponse200.md)
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="petPetIdtestingByteArraytrueGet"></a>
# **petPetIdtestingByteArraytrueGet**
> byte[] petPetIdtestingByteArraytrueGet(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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
try {
byte[] result = apiInstance.petPetIdtestingByteArraytrueGet(petId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#petPetIdtestingByteArraytrueGet");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
### Return type
**byte[]**
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updatePet"></a>
# **updatePet**
@@ -495,7 +318,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -508,7 +331,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updatePetWithForm"></a>
# **updatePetWithForm**
@@ -534,7 +357,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
String petId = "petId_example"; // String | ID of pet that needs to be updated
Long petId = 789L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet
try {
@@ -549,7 +372,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **String**| ID of pet that needs to be updated |
**petId** | **Long**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet | [optional]
**status** | **String**| Updated status of the pet | [optional]
@@ -564,11 +387,11 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="uploadFile"></a>
# **uploadFile**
> uploadFile(petId, additionalMetadata, file)
> ApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image
@@ -594,7 +417,8 @@ Long petId = 789L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload
try {
apiInstance.uploadFile(petId, additionalMetadata, file);
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile");
e.printStackTrace();
@@ -611,7 +435,7 @@ Name | Type | Description | Notes
### Return type
null (empty response body)
[**ApiResponse**](ApiResponse.md)
### Authorization
@@ -620,5 +444,5 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, application/xml
- **Accept**: application/json

View File

@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
@@ -54,68 +52,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="findOrdersByStatus"></a>
# **findOrdersByStatus**
> List&lt;Order&gt; findOrdersByStatus(status)
Finds orders by status
A single status value can be provided as a string
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_client_id
ApiKeyAuth test_api_client_id = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_id");
test_api_client_id.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_id.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_client_secret
ApiKeyAuth test_api_client_secret = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_secret");
test_api_client_secret.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_secret.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
String status = "placed"; // String | Status value that needs to be considered for query
try {
List<Order> result = apiInstance.findOrdersByStatus(status);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#findOrdersByStatus");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | **String**| Status value that needs to be considered for query | [optional] [default to placed] [enum: placed, approved, delivered]
### Return type
[**List&lt;Order&gt;**](Order.md)
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getInventory"></a>
# **getInventory**
@@ -166,58 +103,7 @@ This endpoint does not need any parameter.
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="getInventoryInObject"></a>
# **getInventoryInObject**
> Object getInventoryInObject()
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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
try {
Object result = apiInstance.getInventoryInObject();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getInventoryInObject");
e.printStackTrace();
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**Object**
### Authorization
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/json
<a name="getOrderById"></a>
# **getOrderById**
@@ -225,33 +111,17 @@ This endpoint does not need any parameter.
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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_key_query
ApiKeyAuth test_api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("test_api_key_query");
test_api_key_query.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_key_query.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_key_header
ApiKeyAuth test_api_key_header = (ApiKeyAuth) defaultClient.getAuthentication("test_api_key_header");
test_api_key_header.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_key_header.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
String orderId = "orderId_example"; // String | ID of pet that needs to be fetched
Long orderId = 789L; // Long | ID of pet that needs to be fetched
try {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@@ -265,7 +135,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of pet that needs to be fetched |
**orderId** | **Long**| ID of pet that needs to be fetched |
### Return type
@@ -273,12 +143,12 @@ Name | Type | Description | Notes
### Authorization
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="placeOrder"></a>
# **placeOrder**
@@ -291,25 +161,9 @@ Place an order for a pet
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_client_id
ApiKeyAuth test_api_client_id = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_id");
test_api_client_id.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_id.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_client_secret
ApiKeyAuth test_api_client_secret = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_secret");
test_api_client_secret.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_secret.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
Order body = new Order(); // Order | order placed for purchasing the pet
@@ -326,7 +180,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -334,10 +188,10 @@ Name | Type | Description | Notes
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json

View File

@@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | [optional]
**body** | [**User**](User.md)| Created user object |
### Return type
@@ -56,7 +56,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
@@ -87,7 +87,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | [optional]
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -100,7 +100,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
@@ -131,7 +131,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | [optional]
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -144,7 +144,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="deleteUser"></a>
# **deleteUser**
@@ -157,18 +157,9 @@ This can only be done by the logged in user.
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: test_http_basic
HttpBasicAuth test_http_basic = (HttpBasicAuth) defaultClient.getAuthentication("test_http_basic");
test_http_basic.setUsername("YOUR USERNAME");
test_http_basic.setPassword("YOUR PASSWORD");
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be deleted
@@ -192,12 +183,12 @@ null (empty response body)
### Authorization
[test_http_basic](../README.md#test_http_basic)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getUserByName"></a>
# **getUserByName**
@@ -215,7 +206,7 @@ Get user by user name
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
try {
User result = apiInstance.getUserByName(username);
System.out.println(result);
@@ -229,7 +220,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
### Return type
@@ -242,7 +233,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="loginUser"></a>
# **loginUser**
@@ -275,8 +266,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The user name for login | [optional]
**password** | **String**| The password for login in clear text | [optional]
**username** | **String**| The user name for login |
**password** | **String**| The password for login in clear text |
### Return type
@@ -289,7 +280,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="logoutUser"></a>
# **logoutUser**
@@ -329,7 +320,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updateUser"></a>
# **updateUser**
@@ -362,7 +353,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | [optional]
**body** | [**User**](User.md)| Updated user object |
### Return type
@@ -375,5 +366,5 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json

View File

@@ -171,11 +171,11 @@
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-annotations-version>1.5.4</swagger-annotations-version>
<swagger-annotations-version>1.5.8</swagger-annotations-version>
<jersey-version>1.18</jersey-version>
<jackson-version>2.4.2</jackson-version>
<jodatime-version>2.3</jodatime-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.8.1</junit-version>
<junit-version>4.12</junit-version>
</properties>
</project>

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-03-17T10:45:51.189+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-03-17T10:45:51.189+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-03-17T10:45:51.189+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-03-17T10:45:51.189+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.ApiResponse;
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-03-17T16:01:11.428+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");
@@ -54,14 +58,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -72,51 +73,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
*
@@ -141,16 +100,13 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
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);
@@ -161,21 +117,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
*/
@@ -278,14 +228,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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[] { "petstore_auth", "api_key" };
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[] { "petstore_auth", "api_key" };
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[] { "petstore_auth", "api_key" };
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");
@@ -415,14 +268,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -433,11 +283,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
@@ -463,18 +311,15 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -485,20 +330,19 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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 ApiResponse
* @throws ApiException if fails to make API call
*/
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
public ApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
@@ -515,18 +359,15 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
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<ApiResponse> localVarReturnType = new GenericType<ApiResponse>() {};
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-03-17T16:01:11.428+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
@@ -58,14 +57,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -76,55 +72,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
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
@@ -142,14 +92,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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
@@ -231,14 +134,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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_query", "test_api_key_header" };
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");
@@ -273,14 +175,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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-03-17T16:01:11.428+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");
@@ -52,14 +56,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -70,20 +71,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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");
@@ -92,14 +96,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -110,20 +111,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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");
@@ -132,14 +136,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -150,11 +151,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Delete user
* This can only be done by the logged in user.
@@ -178,14 +177,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -194,17 +190,15 @@ 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
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
* @throws ApiException if fails to make API call
*/
@@ -225,14 +219,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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
*
@@ -312,14 +302,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -330,16 +317,14 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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()));
@@ -359,14 +349,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -377,9 +364,7 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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-03-17T10:45:51.189+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-03-17T10:45:51.189+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-03-17T10:45:51.189+08:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-29T18:13:32.007+08:00")
public class Animal {
private String className = null;
@@ -31,7 +31,6 @@ public class Animal {
this.className = className;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -0,0 +1,113 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
public class ApiResponse {
private Integer code = null;
private String type = null;
private String message = null;
/**
**/
public ApiResponse code(Integer code) {
this.code = code;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("code")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
**/
public ApiResponse type(String type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
**/
public ApiResponse message(String message) {
this.message = message;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApiResponse apiResponse = (ApiResponse) o;
return Objects.equals(this.code, apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) &&
Objects.equals(this.message, apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-29T18:13:32.007+08:00")
public class Cat extends Animal {
private String className = null;
@@ -33,7 +33,7 @@ public class Cat extends Animal {
this.className = className;
}
/**
**/
public Cat declawed(Boolean declawed) {
@@ -50,7 +50,6 @@ public class Cat extends Animal {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class Category {
private Long id = null;
@@ -32,7 +32,7 @@ public class Category {
this.id = id;
}
/**
**/
public Category name(String name) {
@@ -49,7 +49,6 @@ public class Category {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -10,7 +10,7 @@ import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-29T18:13:32.007+08:00")
public class Dog extends Animal {
private String className = null;
@@ -33,7 +33,7 @@ public class Dog extends Animal {
this.className = className;
}
/**
**/
public Dog breed(String breed) {
@@ -50,7 +50,6 @@ public class Dog extends Animal {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -0,0 +1,295 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
public class FormatTest {
private Integer integer = null;
private Integer int32 = null;
private Long int64 = null;
private BigDecimal number = null;
private Float _float = null;
private Double _double = null;
private String string = null;
private byte[] _byte = null;
private byte[] binary = null;
private Date date = null;
private Date dateTime = null;
private String password = null;
/**
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("integer")
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
/**
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int32")
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
/**
**/
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int64")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
/**
**/
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("number")
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
/**
**/
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("float")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
/**
**/
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("double")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
/**
**/
public FormatTest string(String string) {
this.string = string;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("string")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
/**
**/
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("byte")
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
/**
**/
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("binary")
public byte[] getBinary() {
return binary;
}
public void setBinary(byte[] binary) {
this.binary = binary;
}
/**
**/
public FormatTest date(Date date) {
this.date = date;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("date")
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
/**
**/
public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateTime")
public Date getDateTime() {
return dateTime;
}
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
/**
**/
public FormatTest password(String password) {
this.password = password;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("password")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,199 +0,0 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class InlineResponse200 {
private List<Tag> tags = new ArrayList<Tag>();
private Long id = null;
private Object category = null;
public enum StatusEnum {
AVAILABLE("available"),
PENDING("pending"),
SOLD("sold");
private String value;
StatusEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return value;
}
}
private StatusEnum status = null;
private String name = null;
private List<String> photoUrls = new ArrayList<String>();
/**
**/
public InlineResponse200 tags(List<Tag> tags) {
this.tags = tags;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("tags")
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
/**
**/
public InlineResponse200 id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public InlineResponse200 category(Object category) {
this.category = category;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("category")
public Object getCategory() {
return category;
}
public void setCategory(Object category) {
this.category = category;
}
/**
* pet status in the store
**/
public InlineResponse200 status(StatusEnum status) {
this.status = status;
return this;
}
@ApiModelProperty(example = "null", value = "pet status in the store")
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
**/
public InlineResponse200 name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "doggie", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public InlineResponse200 photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
Objects.equals(this.status, inlineResponse200.status) &&
Objects.equals(this.name, inlineResponse200.name) &&
Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
**/
@ApiModel(description = "Model for testing model name starting with number")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class Model200Response {
private Integer name = null;
@@ -31,7 +34,6 @@ public class Model200Response {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
**/
@ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class ModelReturn {
private Integer _return = null;
@@ -31,7 +34,6 @@ public class ModelReturn {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
**/
@ApiModel(description = "Model for testing model name same as property name")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-23T20:53:24.734+08:00")
public class Name {
private Integer name = null;
@@ -23,7 +26,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@@ -32,24 +35,13 @@ public class Name {
this.name = 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;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class Order {
private Long id = null;
@@ -39,16 +39,26 @@ public class Order {
}
private StatusEnum status = null;
private Boolean complete = 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;
}
/**
**/
public Order petId(Long petId) {
@@ -65,7 +75,7 @@ public class Order {
this.petId = petId;
}
/**
**/
public Order quantity(Integer quantity) {
@@ -82,7 +92,7 @@ public class Order {
this.quantity = quantity;
}
/**
**/
public Order shipDate(Date shipDate) {
@@ -99,7 +109,7 @@ public class Order {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@@ -117,7 +127,7 @@ public class Order {
this.status = status;
}
/**
**/
public Order complete(Boolean complete) {
@@ -134,7 +144,6 @@ public class Order {
this.complete = complete;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class Pet {
private Long id = null;
@@ -61,7 +61,7 @@ public class Pet {
this.id = id;
}
/**
**/
public Pet category(Category category) {
@@ -78,7 +78,7 @@ public class Pet {
this.category = category;
}
/**
**/
public Pet name(String name) {
@@ -95,7 +95,7 @@ public class Pet {
this.name = name;
}
/**
**/
public Pet photoUrls(List<String> photoUrls) {
@@ -112,7 +112,7 @@ public class Pet {
this.photoUrls = photoUrls;
}
/**
**/
public Pet tags(List<Tag> tags) {
@@ -129,7 +129,7 @@ public class Pet {
this.tags = tags;
}
/**
* pet status in the store
**/
@@ -147,7 +147,6 @@ public class Pet {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@@ -31,7 +31,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class Tag {
private Long id = null;
@@ -32,7 +32,7 @@ public class Tag {
this.id = id;
}
/**
**/
public Tag name(String name) {
@@ -49,7 +49,6 @@ public class Tag {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T10:45:51.189+08:00")
public class User {
private Long id = null;
@@ -38,7 +38,7 @@ public class User {
this.id = id;
}
/**
**/
public User username(String username) {
@@ -55,7 +55,7 @@ public class User {
this.username = username;
}
/**
**/
public User firstName(String firstName) {
@@ -72,7 +72,7 @@ public class User {
this.firstName = firstName;
}
/**
**/
public User lastName(String lastName) {
@@ -89,7 +89,7 @@ public class User {
this.lastName = lastName;
}
/**
**/
public User email(String email) {
@@ -106,7 +106,7 @@ public class User {
this.email = email;
}
/**
**/
public User password(String password) {
@@ -123,7 +123,7 @@ public class User {
this.password = password;
}
/**
**/
public User phone(String phone) {
@@ -140,7 +140,7 @@ public class User {
this.phone = phone;
}
/**
* User Status
**/
@@ -158,7 +158,6 @@ public class User {
this.userStatus = userStatus;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7

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-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+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-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@@ -3,26 +3,23 @@ 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.ApiResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+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")
@@ -31,20 +28,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
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
*
@@ -59,11 +43,11 @@ public interface PetApi extends ApiClient.Api {
"apiKey: {apiKey}"
})
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
/**
* 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,11 +56,11 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
List<Pet> findPetsByStatus(@Param("status") List<String> status);
/**
* 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,11 +69,11 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
List<Pet> findPetsByTags(@Param("tags") List<String> tags);
/**
* 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}")
@@ -98,37 +82,11 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
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")
@@ -137,7 +95,7 @@ public interface PetApi extends ApiClient.Api {
"Accepts: application/json",
})
void updatePet(Pet body);
/**
* Updates a pet in the store with form data
*
@@ -151,22 +109,20 @@ 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
*
* @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 ApiResponse
*/
@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);
ApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
}

View File

@@ -4,16 +4,13 @@ import io.swagger.client.ApiClient;
import io.swagger.client.model.Order;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public interface StoreApi extends ApiClient.Api {
@@ -29,20 +26,7 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
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
@@ -54,22 +38,10 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
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
*/
@@ -78,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")
@@ -92,6 +64,4 @@ public interface StoreApi extends ApiClient.Api {
"Accepts: application/json",
})
Order placeOrder(Order body);
}

View File

@@ -4,23 +4,20 @@ import io.swagger.client.ApiClient;
import io.swagger.client.model.User;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+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")
@@ -29,11 +26,11 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUser(User body);
/**
* 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")
@@ -42,11 +39,11 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUsersWithArrayInput(List<User> body);
/**
* 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")
@@ -55,7 +52,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void createUsersWithListInput(List<User> body);
/**
* Delete user
* This can only be done by the logged in user.
@@ -68,11 +65,11 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void deleteUser(@Param("username") String username);
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
@RequestLine("GET /user/{username}")
@@ -81,12 +78,12 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
User getUserByName(@Param("username") String username);
/**
* 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}")
@@ -95,7 +92,7 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
String loginUser(@Param("username") String username, @Param("password") String password);
/**
* Logs out current logged in user session
*
@@ -107,12 +104,12 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void logoutUser();
/**
* 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}")
@@ -121,6 +118,4 @@ public interface UserApi extends ApiClient.Api {
"Accepts: application/json",
})
void updateUser(@Param("username") String username, User body);
}

View File

@@ -0,0 +1,73 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Animal {
private String className = null;
/**
**/
public Animal className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className);
}
@Override
public int hashCode() {
return Objects.hash(className);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,113 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class ApiResponse {
private Integer code = null;
private String type = null;
private String message = null;
/**
**/
public ApiResponse code(Integer code) {
this.code = code;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("code")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
**/
public ApiResponse type(String type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
**/
public ApiResponse message(String message) {
this.message = message;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApiResponse apiResponse = (ApiResponse) o;
return Objects.equals(this.code, apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) &&
Objects.equals(this.message, apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,95 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Cat extends Animal {
private String className = null;
private Boolean declawed = null;
/**
**/
public Cat className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("declawed")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.className, cat.className) &&
Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(className, declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Category {
private Long id = null;
@@ -32,7 +32,7 @@ public class Category {
this.id = id;
}
/**
**/
public Category name(String name) {
@@ -49,7 +49,6 @@ public class Category {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -0,0 +1,95 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Dog extends Animal {
private String className = null;
private String breed = null;
/**
**/
public Dog className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Dog breed(String breed) {
this.breed = breed;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("breed")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.className, dog.className) &&
Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(className, breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,295 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class FormatTest {
private Integer integer = null;
private Integer int32 = null;
private Long int64 = null;
private BigDecimal number = null;
private Float _float = null;
private Double _double = null;
private String string = null;
private byte[] _byte = null;
private byte[] binary = null;
private Date date = null;
private Date dateTime = null;
private String password = null;
/**
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("integer")
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
/**
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int32")
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
/**
**/
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int64")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
/**
**/
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("number")
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
/**
**/
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("float")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
/**
**/
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("double")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
/**
**/
public FormatTest string(String string) {
this.string = string;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("string")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
/**
**/
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("byte")
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
/**
**/
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("binary")
public byte[] getBinary() {
return binary;
}
public void setBinary(byte[] binary) {
this.binary = binary;
}
/**
**/
public FormatTest date(Date date) {
this.date = date;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("date")
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
/**
**/
public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateTime")
public Date getDateTime() {
return dateTime;
}
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
/**
**/
public FormatTest password(String password) {
this.password = password;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("password")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -13,16 +13,12 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-13T14:36:33.302+02:00")
public class InlineResponse200 {
private List<String> photoUrls = new ArrayList<String>();
private String name = null;
private List<Tag> tags = new ArrayList<Tag>();
private Long id = null;
private Object category = null;
private List<Tag> tags = new ArrayList<Tag>();
public enum StatusEnum {
@@ -44,74 +40,8 @@ public class InlineResponse200 {
}
private StatusEnum status = null;
/**
**/
public InlineResponse200 photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
/**
**/
public InlineResponse200 name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "doggie", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public InlineResponse200 id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public InlineResponse200 category(Object category) {
this.category = category;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("category")
public Object getCategory() {
return category;
}
public void setCategory(Object category) {
this.category = category;
}
private String name = null;
private List<String> photoUrls = new ArrayList<String>();
/**
@@ -130,7 +60,41 @@ public class InlineResponse200 {
this.tags = tags;
}
/**
**/
public InlineResponse200 id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public InlineResponse200 category(Object category) {
this.category = category;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("category")
public Object getCategory() {
return category;
}
public void setCategory(Object category) {
this.category = category;
}
/**
* pet status in the store
**/
@@ -148,7 +112,40 @@ public class InlineResponse200 {
this.status = status;
}
/**
**/
public InlineResponse200 name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "doggie", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public InlineResponse200 photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -159,17 +156,17 @@ public class InlineResponse200 {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
Objects.equals(this.name, inlineResponse200.name) &&
return Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.status, inlineResponse200.status);
Objects.equals(this.status, inlineResponse200.status) &&
Objects.equals(this.name, inlineResponse200.name) &&
Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
return Objects.hash(photoUrls, name, id, category, tags, status);
return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
@@ -177,12 +174,12 @@ public class InlineResponse200 {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -199,5 +196,3 @@ public class InlineResponse200 {
}
}

View File

@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+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-19T19:29:57.731+08:00")
public class Model200Response {
private Integer name = null;
@@ -33,7 +34,6 @@ public class Model200Response {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +74,3 @@ public class Model200Response {
}
}

View File

@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class ModelReturn {
private Integer _return = null;
@@ -33,7 +34,6 @@ public class ModelReturn {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +74,3 @@ public class ModelReturn {
}
}

View File

@@ -7,11 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+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-19T19:29:57.731+08:00")
public class Name {
private Integer name = null;
@@ -25,7 +26,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@@ -34,24 +35,13 @@ public class Name {
this.name = 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;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -94,5 +84,3 @@ public class Name {
}
}

View File

@@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Order {
private Long id = null;
@@ -39,16 +39,26 @@ public class Order {
}
private StatusEnum status = null;
private Boolean complete = 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;
}
/**
**/
public Order petId(Long petId) {
@@ -65,7 +75,7 @@ public class Order {
this.petId = petId;
}
/**
**/
public Order quantity(Integer quantity) {
@@ -82,7 +92,7 @@ public class Order {
this.quantity = quantity;
}
/**
**/
public Order shipDate(Date shipDate) {
@@ -99,7 +109,7 @@ public class Order {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@@ -117,7 +127,7 @@ public class Order {
this.status = status;
}
/**
**/
public Order complete(Boolean complete) {
@@ -134,7 +144,6 @@ public class Order {
this.complete = complete;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Pet {
private Long id = null;
@@ -61,7 +61,7 @@ public class Pet {
this.id = id;
}
/**
**/
public Pet category(Category category) {
@@ -78,7 +78,7 @@ public class Pet {
this.category = category;
}
/**
**/
public Pet name(String name) {
@@ -95,7 +95,7 @@ public class Pet {
this.name = name;
}
/**
**/
public Pet photoUrls(List<String> photoUrls) {
@@ -112,7 +112,7 @@ public class Pet {
this.photoUrls = photoUrls;
}
/**
**/
public Pet tags(List<Tag> tags) {
@@ -129,7 +129,7 @@ public class Pet {
this.tags = tags;
}
/**
* pet status in the store
**/
@@ -147,7 +147,6 @@ public class Pet {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,9 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-19T15:53:31.820+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@@ -33,7 +31,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {
@@ -74,5 +71,3 @@ public class SpecialModelName {
}
}

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class Tag {
private Long id = null;
@@ -32,7 +32,7 @@ public class Tag {
this.id = id;
}
/**
**/
public Tag name(String name) {
@@ -49,7 +49,6 @@ public class Tag {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:50.356+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00")
public class User {
private Long id = null;
@@ -38,7 +38,7 @@ public class User {
this.id = id;
}
/**
**/
public User username(String username) {
@@ -55,7 +55,7 @@ public class User {
this.username = username;
}
/**
**/
public User firstName(String firstName) {
@@ -72,7 +72,7 @@ public class User {
this.firstName = firstName;
}
/**
**/
public User lastName(String lastName) {
@@ -89,7 +89,7 @@ public class User {
this.lastName = lastName;
}
/**
**/
public User email(String email) {
@@ -106,7 +106,7 @@ public class User {
this.email = email;
}
/**
**/
public User password(String password) {
@@ -123,7 +123,7 @@ public class User {
this.password = password;
}
/**
**/
public User phone(String phone) {
@@ -140,7 +140,7 @@ public class User {
this.phone = phone;
}
/**
* User Status
**/
@@ -158,7 +158,6 @@ public class User {
this.userStatus = userStatus;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7

View File

@@ -0,0 +1,10 @@
# Animal
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |

View File

@@ -0,0 +1,12 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

View File

@@ -0,0 +1,11 @@
# Cat
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**declawed** | **Boolean** | | [optional]

View File

@@ -1,3 +1,4 @@
# Category
## Properties
@@ -7,3 +8,4 @@ Name | Type | Description | Notes
**name** | **String** | | [optional]

View File

@@ -0,0 +1,11 @@
# Dog
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**breed** | **String** | | [optional]

View File

@@ -0,0 +1,21 @@
# FormatTest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | | [optional]
**int32** | **Integer** | | [optional]
**int64** | **Long** | | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | |
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | | [optional]
**binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | | [optional]
**dateTime** | [**Date**](Date.md) | | [optional]
**password** | **String** | | [optional]

View File

@@ -1,3 +1,4 @@
# Model200Response
## Properties
@@ -6,3 +7,4 @@ Name | Type | Description | Notes
**name** | **Integer** | | [optional]

View File

@@ -1,3 +1,4 @@
# ModelReturn
## Properties
@@ -6,3 +7,4 @@ Name | Type | Description | Notes
**_return** | **Integer** | | [optional]

View File

@@ -1,9 +1,11 @@
# Name
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **Integer** | | [optional]
**name** | **Integer** | |
**snakeCase** | **Integer** | | [optional]

View File

@@ -1,3 +1,4 @@
# Order
## Properties
@@ -7,7 +8,17 @@ Name | Type | Description | Notes
**petId** | **Long** | | [optional]
**quantity** | **Integer** | | [optional]
**shipDate** | [**Date**](Date.md) | | [optional]
**status** | **String** | Order Status | [optional]
**status** | [**StatusEnum**](#StatusEnum) | Order Status | [optional]
**complete** | **Boolean** | | [optional]
<a name="StatusEnum"></a>
## Enum: StatusEnum
Name | Value
---- | -----
PLACED | placed
APPROVED | approved
DELIVERED | delivered

View File

@@ -1,3 +1,4 @@
# Pet
## Properties
@@ -8,6 +9,16 @@ Name | Type | Description | Notes
**name** | **String** | |
**photoUrls** | **List&lt;String&gt;** | |
**tags** | [**List&lt;Tag&gt;**](Tag.md) | | [optional]
**status** | **String** | pet status in the store | [optional]
**status** | [**StatusEnum**](#StatusEnum) | pet status in the store | [optional]
<a name="StatusEnum"></a>
## Enum: StatusEnum
Name | Value
---- | -----
AVAILABLE | available
PENDING | pending
SOLD | sold

View File

@@ -5,13 +5,10 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
[**addPetUsingByteArray**](PetApi.md#addPetUsingByteArray) | **POST** /pet?testing_byte_array=true | Fake endpoint to test byte array in body parameter for adding a new pet to the store
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
[**getPetByIdInObject**](PetApi.md#getPetByIdInObject) | **GET** /pet/{petId}?response=inline_arbitrary_object | Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
[**petPetIdtestingByteArraytrueGet**](PetApi.md#petPetIdtestingByteArraytrueGet) | **GET** /pet/{petId}?testing_byte_array=true | Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
@@ -54,7 +51,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -67,59 +64,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
<a name="addPetUsingByteArray"></a>
# **addPetUsingByteArray**
> addPetUsingByteArray(body)
Fake endpoint to test byte array in body parameter for adding a new pet to the store
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
byte[] body = BINARY_DATA_HERE; // byte[] | Pet object in the form of byte array
try {
apiInstance.addPetUsingByteArray(body);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPetUsingByteArray");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **byte[]**| Pet object in the form of byte array | [optional]
### Return type
null (empty response body)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="deletePet"></a>
# **deletePet**
@@ -159,8 +104,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| Pet id to delete |
**apiKey** | **String**| | [optional]
**petId** | **Long**| Pet id to delete |
**apiKey** | **String**| | [optional]
### Return type
@@ -173,7 +118,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="findPetsByStatus"></a>
# **findPetsByStatus**
@@ -199,7 +144,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for query
List<String> status = Arrays.asList("status_example"); // List<String> | Status values that need to be considered for filter
try {
List<Pet> result = apiInstance.findPetsByStatus(status);
System.out.println(result);
@@ -213,7 +158,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for query | [optional] [default to available]
**status** | [**List&lt;String&gt;**](String.md)| Status values that need to be considered for filter |
### Return type
@@ -226,7 +171,7 @@ Name | Type | Description | Notes
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="findPetsByTags"></a>
# **findPetsByTags**
@@ -234,7 +179,7 @@ Name | Type | Description | Notes
Finds Pets by tags
Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
### Example
```java
@@ -266,7 +211,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by | [optional]
**tags** | [**List&lt;String&gt;**](String.md)| Tags to filter by |
### Return type
@@ -279,7 +224,7 @@ Name | Type | Description | Notes
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getPetById"></a>
# **getPetById**
@@ -287,7 +232,7 @@ Name | Type | Description | Notes
Find pet by ID
Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
Returns a single pet
### Example
```java
@@ -300,10 +245,6 @@ Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API erro
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
@@ -311,7 +252,7 @@ api_key.setApiKey("YOUR API KEY");
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
Long petId = 789L; // Long | ID of pet to return
try {
Pet result = apiInstance.getPetById(petId);
System.out.println(result);
@@ -325,7 +266,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
**petId** | **Long**| ID of pet to return |
### Return type
@@ -333,130 +274,12 @@ Name | Type | Description | Notes
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="getPetByIdInObject"></a>
# **getPetByIdInObject**
> InlineResponse200 getPetByIdInObject(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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
try {
InlineResponse200 result = apiInstance.getPetByIdInObject(petId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#getPetByIdInObject");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
### Return type
[**InlineResponse200**](InlineResponse200.md)
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="petPetIdtestingByteArraytrueGet"></a>
# **petPetIdtestingByteArraytrueGet**
> byte[] petPetIdtestingByteArraytrueGet(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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
PetApi apiInstance = new PetApi();
Long petId = 789L; // Long | ID of pet that needs to be fetched
try {
byte[] result = apiInstance.petPetIdtestingByteArraytrueGet(petId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#petPetIdtestingByteArraytrueGet");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet that needs to be fetched |
### Return type
**byte[]**
### Authorization
[petstore_auth](../README.md#petstore_auth), [api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updatePet"></a>
# **updatePet**
@@ -495,7 +318,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | [optional]
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type
@@ -508,7 +331,7 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/json, application/xml
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updatePetWithForm"></a>
# **updatePetWithForm**
@@ -534,7 +357,7 @@ OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi();
String petId = "petId_example"; // String | ID of pet that needs to be updated
Long petId = 789L; // Long | ID of pet that needs to be updated
String name = "name_example"; // String | Updated name of the pet
String status = "status_example"; // String | Updated status of the pet
try {
@@ -549,9 +372,9 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **String**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet | [optional]
**status** | **String**| Updated status of the pet | [optional]
**petId** | **Long**| ID of pet that needs to be updated |
**name** | **String**| Updated name of the pet | [optional]
**status** | **String**| Updated status of the pet | [optional]
### Return type
@@ -564,11 +387,11 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="uploadFile"></a>
# **uploadFile**
> uploadFile(petId, additionalMetadata, file)
> ApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image
@@ -594,7 +417,8 @@ Long petId = 789L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload
try {
apiInstance.uploadFile(petId, additionalMetadata, file);
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile");
e.printStackTrace();
@@ -605,13 +429,13 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to update |
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
**file** | **File**| file to upload | [optional]
**petId** | **Long**| ID of pet to update |
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
**file** | **File**| file to upload | [optional]
### Return type
null (empty response body)
[**ApiResponse**](ApiResponse.md)
### Authorization
@@ -620,5 +444,5 @@ null (empty response body)
### HTTP reuqest headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json, application/xml
- **Accept**: application/json

View File

@@ -1,3 +1,4 @@
# SpecialModelName
## Properties
@@ -6,3 +7,4 @@ Name | Type | Description | Notes
**specialPropertyName** | **Long** | | [optional]

View File

@@ -5,9 +5,7 @@ All URIs are relative to *http://petstore.swagger.io/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{orderId} | Delete purchase order by ID
[**findOrdersByStatus**](StoreApi.md#findOrdersByStatus) | **GET** /store/findByStatus | Finds orders by status
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
[**getInventoryInObject**](StoreApi.md#getInventoryInObject) | **GET** /store/inventory?response=arbitrary_object | Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{orderId} | Find purchase order by ID
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
@@ -41,7 +39,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of the order that needs to be deleted |
**orderId** | **String**| ID of the order that needs to be deleted |
### Return type
@@ -54,68 +52,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="findOrdersByStatus"></a>
# **findOrdersByStatus**
> List&lt;Order&gt; findOrdersByStatus(status)
Finds orders by status
A single status value can be provided as a string
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_client_id
ApiKeyAuth test_api_client_id = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_id");
test_api_client_id.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_id.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_client_secret
ApiKeyAuth test_api_client_secret = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_secret");
test_api_client_secret.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_secret.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
String status = "placed"; // String | Status value that needs to be considered for query
try {
List<Order> result = apiInstance.findOrdersByStatus(status);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#findOrdersByStatus");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**status** | **String**| Status value that needs to be considered for query | [optional] [default to placed]
### Return type
[**List&lt;Order&gt;**](Order.md)
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getInventory"></a>
# **getInventory**
@@ -166,58 +103,7 @@ This endpoint does not need any parameter.
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
<a name="getInventoryInObject"></a>
# **getInventoryInObject**
> Object getInventoryInObject()
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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
try {
Object result = apiInstance.getInventoryInObject();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#getInventoryInObject");
e.printStackTrace();
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**Object**
### Authorization
[api_key](../README.md#api_key)
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/json
<a name="getOrderById"></a>
# **getOrderById**
@@ -225,33 +111,17 @@ This endpoint does not need any parameter.
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
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_key_query
ApiKeyAuth test_api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("test_api_key_query");
test_api_key_query.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_key_query.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_key_header
ApiKeyAuth test_api_key_header = (ApiKeyAuth) defaultClient.getAuthentication("test_api_key_header");
test_api_key_header.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_key_header.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
String orderId = "orderId_example"; // String | ID of pet that needs to be fetched
Long orderId = 789L; // Long | ID of pet that needs to be fetched
try {
Order result = apiInstance.getOrderById(orderId);
System.out.println(result);
@@ -265,7 +135,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**orderId** | **String**| ID of pet that needs to be fetched |
**orderId** | **Long**| ID of pet that needs to be fetched |
### Return type
@@ -273,12 +143,12 @@ Name | Type | Description | Notes
### Authorization
[test_api_key_query](../README.md#test_api_key_query), [test_api_key_header](../README.md#test_api_key_header)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="placeOrder"></a>
# **placeOrder**
@@ -291,25 +161,9 @@ Place an order for a pet
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.StoreApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: test_api_client_id
ApiKeyAuth test_api_client_id = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_id");
test_api_client_id.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_id.setApiKeyPrefix("Token");
// Configure API key authorization: test_api_client_secret
ApiKeyAuth test_api_client_secret = (ApiKeyAuth) defaultClient.getAuthentication("test_api_client_secret");
test_api_client_secret.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//test_api_client_secret.setApiKeyPrefix("Token");
StoreApi apiInstance = new StoreApi();
Order body = new Order(); // Order | order placed for purchasing the pet
@@ -326,7 +180,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | [optional]
**body** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type
@@ -334,10 +188,10 @@ Name | Type | Description | Notes
### Authorization
[test_api_client_id](../README.md#test_api_client_id), [test_api_client_secret](../README.md#test_api_client_secret)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json

View File

@@ -1,3 +1,4 @@
# Tag
## Properties
@@ -7,3 +8,4 @@ Name | Type | Description | Notes
**name** | **String** | | [optional]

View File

@@ -1,3 +1,4 @@
# User
## Properties
@@ -13,3 +14,4 @@ Name | Type | Description | Notes
**userStatus** | **Integer** | User Status | [optional]

View File

@@ -43,7 +43,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | [optional]
**body** | [**User**](User.md)| Created user object |
### Return type
@@ -56,7 +56,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="createUsersWithArrayInput"></a>
# **createUsersWithArrayInput**
@@ -87,7 +87,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | [optional]
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -100,7 +100,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="createUsersWithListInput"></a>
# **createUsersWithListInput**
@@ -131,7 +131,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | [optional]
**body** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type
@@ -144,7 +144,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="deleteUser"></a>
# **deleteUser**
@@ -157,18 +157,9 @@ This can only be done by the logged in user.
### Example
```java
// Import classes:
//import io.swagger.client.ApiClient;
//import io.swagger.client.ApiException;
//import io.swagger.client.Configuration;
//import io.swagger.client.auth.*;
//import io.swagger.client.api.UserApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: test_http_basic
HttpBasicAuth test_http_basic = (HttpBasicAuth) defaultClient.getAuthentication("test_http_basic");
test_http_basic.setUsername("YOUR USERNAME");
test_http_basic.setPassword("YOUR PASSWORD");
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be deleted
@@ -184,7 +175,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be deleted |
**username** | **String**| The name that needs to be deleted |
### Return type
@@ -192,12 +183,12 @@ null (empty response body)
### Authorization
[test_http_basic](../README.md#test_http_basic)
No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="getUserByName"></a>
# **getUserByName**
@@ -215,7 +206,7 @@ Get user by user name
UserApi apiInstance = new UserApi();
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
try {
User result = apiInstance.getUserByName(username);
System.out.println(result);
@@ -229,7 +220,7 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
### Return type
@@ -242,7 +233,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="loginUser"></a>
# **loginUser**
@@ -275,8 +266,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| The user name for login | [optional]
**password** | **String**| The password for login in clear text | [optional]
**username** | **String**| The user name for login |
**password** | **String**| The password for login in clear text |
### Return type
@@ -289,7 +280,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="logoutUser"></a>
# **logoutUser**
@@ -329,7 +320,7 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json
<a name="updateUser"></a>
# **updateUser**
@@ -361,8 +352,8 @@ try {
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | [optional]
**username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object |
### Return type
@@ -375,5 +366,5 @@ No authorization required
### HTTP reuqest headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/xml
- **Accept**: application/xml, application/json

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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

View File

@@ -8,7 +8,7 @@ import java.text.DateFormat;
import javax.ws.rs.ext.ContextResolver;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class JSON implements ContextResolver<ObjectMapper> {
private ObjectMapper mapper;

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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.Pair;
import javax.ws.rs.core.GenericType;
import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
import io.swagger.client.model.ApiResponse;
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-03-17T16:00:50.657+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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");
@@ -54,14 +58,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -72,51 +73,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
*
@@ -141,16 +100,13 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
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);
@@ -161,21 +117,24 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
*/
@@ -278,14 +228,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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[] { "petstore_auth", "api_key" };
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[] { "petstore_auth", "api_key" };
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[] { "petstore_auth", "api_key" };
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");
@@ -415,14 +268,11 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -433,11 +283,9 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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
@@ -463,18 +311,15 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (name != null)
localVarFormParams.put("name", name);
if (status != null)
if (status != null)
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -485,20 +330,19 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
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 ApiResponse
* @throws ApiException if fails to make API call
*/
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
public ApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
@@ -515,18 +359,15 @@ public class PetApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata);
if (file != null)
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<ApiResponse> localVarReturnType = new GenericType<ApiResponse>() {};
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-03-17T16:00:50.657+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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
@@ -58,14 +57,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -76,55 +72,9 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
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
@@ -142,14 +92,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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
@@ -231,14 +134,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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_query", "test_api_key_header" };
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");
@@ -273,14 +175,11 @@ public class StoreApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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-03-17T16:00:50.657+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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");
@@ -52,14 +56,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -70,20 +71,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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");
@@ -92,14 +96,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -110,20 +111,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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");
@@ -132,14 +136,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -150,11 +151,9 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
}
/**
* Delete user
* This can only be done by the logged in user.
@@ -178,14 +177,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -194,17 +190,15 @@ 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
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
* @throws ApiException if fails to make API call
*/
@@ -225,14 +219,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
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
*
@@ -312,14 +302,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -330,16 +317,14 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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()));
@@ -359,14 +349,11 @@ public class UserApi {
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
@@ -377,9 +364,7 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+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-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@@ -0,0 +1,73 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Animal {
private String className = null;
/**
**/
public Animal className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className);
}
@Override
public int hashCode() {
return Objects.hash(className);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,113 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class ApiResponse {
private Integer code = null;
private String type = null;
private String message = null;
/**
**/
public ApiResponse code(Integer code) {
this.code = code;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("code")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
**/
public ApiResponse type(String type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("type")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
**/
public ApiResponse message(String message) {
this.message = message;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("message")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApiResponse apiResponse = (ApiResponse) o;
return Objects.equals(this.code, apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) &&
Objects.equals(this.message, apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,95 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Cat extends Animal {
private String className = null;
private Boolean declawed = null;
/**
**/
public Cat className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("declawed")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.className, cat.className) &&
Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(className, declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Category {
private Long id = null;
@@ -32,7 +32,7 @@ public class Category {
this.id = id;
}
/**
**/
public Category name(String name) {
@@ -49,7 +49,6 @@ public class Category {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -0,0 +1,95 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Animal;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Dog extends Animal {
private String className = null;
private String breed = null;
/**
**/
public Dog className(String className) {
this.className = className;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("className")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
/**
**/
public Dog breed(String breed) {
this.breed = breed;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("breed")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.className, dog.className) &&
Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(className, breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,295 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class FormatTest {
private Integer integer = null;
private Integer int32 = null;
private Long int64 = null;
private BigDecimal number = null;
private Float _float = null;
private Double _double = null;
private String string = null;
private byte[] _byte = null;
private byte[] binary = null;
private Date date = null;
private Date dateTime = null;
private String password = null;
/**
**/
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("integer")
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
/**
**/
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int32")
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
/**
**/
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("int64")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
/**
**/
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("number")
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
/**
**/
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("float")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
/**
**/
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("double")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
/**
**/
public FormatTest string(String string) {
this.string = string;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("string")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
/**
**/
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("byte")
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
/**
**/
public FormatTest binary(byte[] binary) {
this.binary = binary;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("binary")
public byte[] getBinary() {
return binary;
}
public void setBinary(byte[] binary) {
this.binary = binary;
}
/**
**/
public FormatTest date(Date date) {
this.date = date;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("date")
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
/**
**/
public FormatTest dateTime(Date dateTime) {
this.dateTime = dateTime;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateTime")
public Date getDateTime() {
return dateTime;
}
public void setDateTime(Date dateTime) {
this.dateTime = dateTime;
}
/**
**/
public FormatTest password(String password) {
this.password = password;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("password")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,199 +0,0 @@
package io.swagger.client.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
public class InlineResponse200 {
private List<Tag> tags = new ArrayList<Tag>();
private Long id = null;
private Object category = null;
public enum StatusEnum {
AVAILABLE("available"),
PENDING("pending"),
SOLD("sold");
private String value;
StatusEnum(String value) {
this.value = value;
}
@Override
@JsonValue
public String toString() {
return value;
}
}
private StatusEnum status = null;
private String name = null;
private List<String> photoUrls = new ArrayList<String>();
/**
**/
public InlineResponse200 tags(List<Tag> tags) {
this.tags = tags;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("tags")
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
/**
**/
public InlineResponse200 id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("id")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
public InlineResponse200 category(Object category) {
this.category = category;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("category")
public Object getCategory() {
return category;
}
public void setCategory(Object category) {
this.category = category;
}
/**
* pet status in the store
**/
public InlineResponse200 status(StatusEnum status) {
this.status = status;
return this;
}
@ApiModelProperty(example = "null", value = "pet status in the store")
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
**/
public InlineResponse200 name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "doggie", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public InlineResponse200 photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
Objects.equals(this.status, inlineResponse200.status) &&
Objects.equals(this.name, inlineResponse200.name) &&
Objects.equals(this.photoUrls, inlineResponse200.photoUrls);
}
@Override
public int hashCode() {
return Objects.hash(tags, id, category, status, name, photoUrls);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name starting with number
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T16:00:50.657+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-19T19:29:55.995+08:00")
public class Model200Response {
private Integer name = null;
@@ -31,7 +34,6 @@ public class Model200Response {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing reserved words
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T16:00:50.657+08:00")
@ApiModel(description = "Model for testing reserved words")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class ModelReturn {
private Integer _return = null;
@@ -31,7 +34,6 @@ public class ModelReturn {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -7,9 +7,12 @@ import io.swagger.annotations.ApiModelProperty;
/**
* Model for testing model name same as property name
**/
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-23T19:44:38.177+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-19T19:29:55.995+08:00")
public class Name {
private Integer name = null;
@@ -23,7 +26,7 @@ public class Name {
return this;
}
@ApiModelProperty(example = "null", value = "")
@ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("name")
public Integer getName() {
return name;
@@ -32,24 +35,13 @@ public class Name {
this.name = 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;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Order {
private Long id = null;
@@ -39,16 +39,26 @@ public class Order {
}
private StatusEnum status = null;
private Boolean complete = 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;
}
/**
**/
public Order petId(Long petId) {
@@ -65,7 +75,7 @@ public class Order {
this.petId = petId;
}
/**
**/
public Order quantity(Integer quantity) {
@@ -82,7 +92,7 @@ public class Order {
this.quantity = quantity;
}
/**
**/
public Order shipDate(Date shipDate) {
@@ -99,7 +109,7 @@ public class Order {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@@ -117,7 +127,7 @@ public class Order {
this.status = status;
}
/**
**/
public Order complete(Boolean complete) {
@@ -134,7 +144,6 @@ public class Order {
this.complete = complete;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Pet {
private Long id = null;
@@ -61,7 +61,7 @@ public class Pet {
this.id = id;
}
/**
**/
public Pet category(Category category) {
@@ -78,7 +78,7 @@ public class Pet {
this.category = category;
}
/**
**/
public Pet name(String name) {
@@ -95,7 +95,7 @@ public class Pet {
this.name = name;
}
/**
**/
public Pet photoUrls(List<String> photoUrls) {
@@ -112,7 +112,7 @@ public class Pet {
this.photoUrls = photoUrls;
}
/**
**/
public Pet tags(List<Tag> tags) {
@@ -129,7 +129,7 @@ public class Pet {
this.tags = tags;
}
/**
* pet status in the store
**/
@@ -147,7 +147,6 @@ public class Pet {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-17T16:00:50.657+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class SpecialModelName {
private Long specialPropertyName = null;
@@ -31,7 +31,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class Tag {
private Long id = null;
@@ -32,7 +32,7 @@ public class Tag {
this.id = id;
}
/**
**/
public Tag name(String name) {
@@ -49,7 +49,6 @@ public class Tag {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:48.808+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00")
public class User {
private Long id = null;
@@ -38,7 +38,7 @@ public class User {
this.id = id;
}
/**
**/
public User username(String username) {
@@ -55,7 +55,7 @@ public class User {
this.username = username;
}
/**
**/
public User firstName(String firstName) {
@@ -72,7 +72,7 @@ public class User {
this.firstName = firstName;
}
/**
**/
public User lastName(String lastName) {
@@ -89,7 +89,7 @@ public class User {
this.lastName = lastName;
}
/**
**/
public User email(String email) {
@@ -106,7 +106,7 @@ public class User {
this.email = email;
}
/**
**/
public User password(String password) {
@@ -123,7 +123,7 @@ public class User {
this.password = password;
}
/**
**/
public User phone(String phone) {
@@ -140,7 +140,7 @@ public class User {
this.phone = phone;
}
/**
* User Status
**/
@@ -158,7 +158,6 @@ public class User {
this.userStatus = userStatus;
}
@Override
public boolean equals(java.lang.Object o) {

View File

@@ -9,8 +9,8 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.5.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
@@ -25,11 +25,11 @@ if(hasProperty('target') && target == 'android') {
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 22
buildToolsVersion '22.0.0'
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
targetSdkVersion 23
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
@@ -98,5 +98,5 @@ dependencies {
compile 'com.squareup.okhttp:okhttp:2.7.2'
compile 'com.squareup.okhttp:logging-interceptor:2.7.2'
compile 'com.google.code.gson:gson:2.3.1'
testCompile 'junit:junit:4.8.1'
testCompile 'junit:junit:4.12'
}

View File

@@ -0,0 +1,12 @@
# ApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

Some files were not shown because too many files have changed in this diff Show More