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

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