Improve Java native, apache-httpclient with better spec (#14109)

* improve java native, apache client with better spec

* fix java native async tests

* regenerate java native tests
This commit is contained in:
William Cheng
2022-11-24 21:48:09 +08:00
committed by GitHub
parent 6bb6f1b28a
commit 980062f2bb
232 changed files with 14186 additions and 5559 deletions

View File

@@ -7,17 +7,8 @@
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**mapString** | **Map<String, String>** | | [optional] |
|**mapNumber** | **Map<String, BigDecimal>** | | [optional] |
|**mapInteger** | **Map<String, Integer>** | | [optional] |
|**mapBoolean** | **Map<String, Boolean>** | | [optional] |
|**mapArrayInteger** | **Map<String, List<Integer>>** | | [optional] |
|**mapArrayAnytype** | **Map<String, List<Object>>** | | [optional] |
|**mapMapString** | **Map<String, Map<String, String>>** | | [optional] |
|**mapMapAnytype** | **Map<String, Map<String, Object>>** | | [optional] |
|**anytype1** | **Object** | | [optional] |
|**anytype2** | **Object** | | [optional] |
|**anytype3** | **Object** | | [optional] |
|**mapProperty** | **Map<String, String>** | | [optional] |
|**mapOfMapProperty** | **Map<String, Map<String, String>>** | | [optional] |

View File

@@ -0,0 +1,14 @@
# AllOfWithSingleRef
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**username** | **String** | | [optional] |
|**singleRefType** | [**SingleRefType**](SingleRefType.md) | | [optional] |

View File

@@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## call123testSpecialTags
> CompletableFuture<Client> call123testSpecialTags(body)
> CompletableFuture<Client> call123testSpecialTags(client)
To test special tags
@@ -34,9 +34,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
CompletableFuture<Client> result = apiInstance.call123testSpecialTags(body);
CompletableFuture<Client> result = apiInstance.call123testSpecialTags(client);
System.out.println(result.get());
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -54,7 +54,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Client**](Client.md)| client model | |
| **client** | [**Client**](Client.md)| client model | |
### Return type
@@ -77,7 +77,7 @@ No authorization required
## call123testSpecialTagsWithHttpInfo
> CompletableFuture<ApiResponse<Client>> call123testSpecialTags call123testSpecialTagsWithHttpInfo(body)
> CompletableFuture<ApiResponse<Client>> call123testSpecialTags call123testSpecialTagsWithHttpInfo(client)
To test special tags
@@ -101,9 +101,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
CompletableFuture<ApiResponse<Client>> response = apiInstance.call123testSpecialTagsWithHttpInfo(body);
CompletableFuture<ApiResponse<Client>> response = apiInstance.call123testSpecialTagsWithHttpInfo(client);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
System.out.println("Response body: " + response.get().getData());
@@ -130,7 +130,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Client**](Client.md)| client model | |
| **client** | [**Client**](Client.md)| client model | |
### Return type

View File

@@ -0,0 +1,141 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**fooGet**](DefaultApi.md#fooGet) | **GET** /foo | |
| [**fooGetWithHttpInfo**](DefaultApi.md#fooGetWithHttpInfo) | **GET** /foo | |
## fooGet
> CompletableFuture<FooGetDefaultResponse> fooGet()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
import java.util.concurrent.CompletableFuture;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
CompletableFuture<FooGetDefaultResponse> result = apiInstance.fooGet();
System.out.println(result.get());
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
CompletableFuture<[**FooGetDefaultResponse**](FooGetDefaultResponse.md)>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |
## fooGetWithHttpInfo
> CompletableFuture<ApiResponse<FooGetDefaultResponse>> fooGet fooGetWithHttpInfo()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
import java.util.concurrent.CompletableFuture;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
CompletableFuture<ApiResponse<FooGetDefaultResponse>> response = apiInstance.fooGetWithHttpInfo();
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
System.out.println("Response body: " + response.get().getData());
} catch (InterruptedException | ExecutionException e) {
ApiException apiException = (ApiException)e.getCause();
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + apiException.getCode());
System.err.println("Response headers: " + apiException.getResponseHeaders());
System.err.println("Reason: " + apiException.getResponseBody());
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
CompletableFuture<ApiResponse<[**FooGetDefaultResponse**](FooGetDefaultResponse.md)>>
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |

View File

@@ -0,0 +1,13 @@
# DeprecatedObject
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**name** | **String** | | [optional] |

View File

@@ -12,6 +12,9 @@
|**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] |
|**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] |
|**outerEnum** | **OuterEnum** | | [optional] |
|**outerEnumInteger** | **OuterEnumInteger** | | [optional] |
|**outerEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] |
|**outerEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional] |

File diff suppressed because it is too large Load Diff

View File

@@ -11,7 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## testClassname
> CompletableFuture<Client> testClassname(body)
> CompletableFuture<Client> testClassname(client)
To test class name in snake case
@@ -41,9 +41,9 @@ public class Example {
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
CompletableFuture<Client> result = apiInstance.testClassname(body);
CompletableFuture<Client> result = apiInstance.testClassname(client);
System.out.println(result.get());
} catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -61,7 +61,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Client**](Client.md)| client model | |
| **client** | [**Client**](Client.md)| client model | |
### Return type
@@ -84,7 +84,7 @@ CompletableFuture<[**Client**](Client.md)>
## testClassnameWithHttpInfo
> CompletableFuture<ApiResponse<Client>> testClassname testClassnameWithHttpInfo(body)
> CompletableFuture<ApiResponse<Client>> testClassname testClassnameWithHttpInfo(client)
To test class name in snake case
@@ -115,9 +115,9 @@ public class Example {
//api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client body = new Client(); // Client | client model
Client client = new Client(); // Client | client model
try {
CompletableFuture<ApiResponse<Client>> response = apiInstance.testClassnameWithHttpInfo(body);
CompletableFuture<ApiResponse<Client>> response = apiInstance.testClassnameWithHttpInfo(client);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
System.out.println("Response body: " + response.get().getData());
@@ -144,7 +144,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Client**](Client.md)| client model | |
| **client** | [**Client**](Client.md)| client model | |
### Return type

View File

@@ -0,0 +1,13 @@
# Foo
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**bar** | **String** | | [optional] |

View File

@@ -0,0 +1,13 @@
# FooGetDefaultResponse
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**string** | [**Foo**](Foo.md) | | [optional] |

View File

@@ -13,6 +13,7 @@
|**number** | **BigDecimal** | | |
|**_float** | **Float** | | [optional] |
|**_double** | **Double** | | [optional] |
|**decimal** | **BigDecimal** | | [optional] |
|**string** | **String** | | [optional] |
|**_byte** | **byte[]** | | |
|**binary** | **File** | | [optional] |
@@ -20,7 +21,8 @@
|**dateTime** | **OffsetDateTime** | | [optional] |
|**uuid** | **UUID** | | [optional] |
|**password** | **String** | | |
|**bigDecimal** | **BigDecimal** | | [optional] |
|**patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional] |
|**patternWithDigitsAndDelimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional] |

View File

@@ -0,0 +1,14 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**nullableMessage** | **String** | | [optional] |

View File

@@ -0,0 +1,24 @@
# NullableClass
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**integerProp** | **Integer** | | [optional] |
|**numberProp** | **BigDecimal** | | [optional] |
|**booleanProp** | **Boolean** | | [optional] |
|**stringProp** | **String** | | [optional] |
|**dateProp** | **LocalDate** | | [optional] |
|**datetimeProp** | **OffsetDateTime** | | [optional] |
|**arrayNullableProp** | **List&lt;Object&gt;** | | [optional] |
|**arrayAndItemsNullableProp** | **List&lt;Object&gt;** | | [optional] |
|**arrayItemsNullable** | **List&lt;Object&gt;** | | [optional] |
|**objectNullableProp** | **Map&lt;String, Object&gt;** | | [optional] |
|**objectAndItemsNullableProp** | **Map&lt;String, Object&gt;** | | [optional] |
|**objectItemsNullable** | **Map&lt;String, Object&gt;** | | [optional] |

View File

@@ -0,0 +1,16 @@
# ObjectWithDeprecatedFields
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**uuid** | **String** | | [optional] |
|**id** | **BigDecimal** | | [optional] |
|**deprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] |
|**bars** | **List&lt;String&gt;** | | [optional] |

View File

@@ -0,0 +1,15 @@
# OuterEnumDefaultValue
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@@ -0,0 +1,15 @@
# OuterEnumInteger
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,15 @@
# OuterEnumIntegerDefaultValue
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,13 @@
# OuterObjectWithEnumProperty
## Properties
| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**value** | **OuterEnumInteger** | | |

View File

@@ -27,10 +27,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## addPet
> CompletableFuture<Void> addPet(body)
> CompletableFuture<Void> addPet(pet)
Add a new pet to the store
### Example
```java
@@ -53,9 +55,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
CompletableFuture<Void> result = apiInstance.addPet(body);
CompletableFuture<Void> result = apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode());
@@ -72,7 +74,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -91,15 +93,17 @@ CompletableFuture<void> (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
## addPetWithHttpInfo
> CompletableFuture<ApiResponse<Void>> addPet addPetWithHttpInfo(body)
> CompletableFuture<ApiResponse<Void>> addPet addPetWithHttpInfo(pet)
Add a new pet to the store
### Example
```java
@@ -123,9 +127,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.addPetWithHttpInfo(body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.addPetWithHttpInfo(pet);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -151,7 +155,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -170,7 +174,7 @@ CompletableFuture<ApiResponse<Void>>
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -180,6 +184,8 @@ CompletableFuture<ApiResponse<Void>>
Deletes a pet
### Example
```java
@@ -242,7 +248,7 @@ CompletableFuture<void> (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
## deletePetWithHttpInfo
@@ -251,6 +257,8 @@ CompletableFuture<void> (empty response body)
Deletes a pet
### Example
```java
@@ -323,7 +331,7 @@ CompletableFuture<ApiResponse<Void>>
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@@ -800,10 +808,12 @@ CompletableFuture<ApiResponse<[**Pet**](Pet.md)>>
## updatePet
> CompletableFuture<Void> updatePet(body)
> CompletableFuture<Void> updatePet(pet)
Update an existing pet
### Example
```java
@@ -826,9 +836,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
CompletableFuture<Void> result = apiInstance.updatePet(body);
CompletableFuture<Void> result = apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode());
@@ -845,7 +855,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -864,17 +874,19 @@ CompletableFuture<void> (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |
## updatePetWithHttpInfo
> CompletableFuture<ApiResponse<Void>> updatePet updatePetWithHttpInfo(body)
> CompletableFuture<ApiResponse<Void>> updatePet updatePetWithHttpInfo(pet)
Update an existing pet
### Example
```java
@@ -898,9 +910,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.updatePetWithHttpInfo(body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.updatePetWithHttpInfo(pet);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -926,7 +938,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
| **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | |
### Return type
@@ -945,7 +957,7 @@ CompletableFuture<ApiResponse<Void>>
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid ID supplied | - |
| **404** | Pet not found | - |
| **405** | Validation exception | - |
@@ -957,6 +969,8 @@ CompletableFuture<ApiResponse<Void>>
Updates a pet in the store with form data
### Example
```java
@@ -1021,6 +1035,7 @@ CompletableFuture<void> (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
## updatePetWithFormWithHttpInfo
@@ -1029,6 +1044,8 @@ CompletableFuture<void> (empty response body)
Updates a pet in the store with form data
### Example
```java
@@ -1103,6 +1120,7 @@ CompletableFuture<ApiResponse<Void>>
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -1112,6 +1130,8 @@ CompletableFuture<ApiResponse<Void>>
uploads an image
### Example
```java
@@ -1185,6 +1205,8 @@ CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)>
uploads an image
### Example
```java
@@ -1269,6 +1291,8 @@ CompletableFuture<ApiResponse<[**ModelApiResponse**](ModelApiResponse.md)>>
uploads an image (required)
### Example
```java
@@ -1342,6 +1366,8 @@ CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)>
uploads an image (required)
### Example
```java

View File

@@ -0,0 +1,13 @@
# SingleRefType
## Enum
* `ADMIN` (value: `"admin"`)
* `USER` (value: `"user"`)

View File

@@ -456,10 +456,12 @@ No authorization required
## placeOrder
> CompletableFuture<Order> placeOrder(body)
> CompletableFuture<Order> placeOrder(order)
Place an order for a pet
### Example
```java
@@ -477,9 +479,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order body = new Order(); // Order | order placed for purchasing the pet
Order order = new Order(); // Order | order placed for purchasing the pet
try {
CompletableFuture<Order> result = apiInstance.placeOrder(body);
CompletableFuture<Order> result = apiInstance.placeOrder(order);
System.out.println(result.get());
} catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder");
@@ -497,7 +499,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Order**](Order.md)| order placed for purchasing the pet | |
| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
### Return type
@@ -510,7 +512,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
### HTTP response details
@@ -521,10 +523,12 @@ No authorization required
## placeOrderWithHttpInfo
> CompletableFuture<ApiResponse<Order>> placeOrder placeOrderWithHttpInfo(body)
> CompletableFuture<ApiResponse<Order>> placeOrder placeOrderWithHttpInfo(order)
Place an order for a pet
### Example
```java
@@ -543,9 +547,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient);
Order body = new Order(); // Order | order placed for purchasing the pet
Order order = new Order(); // Order | order placed for purchasing the pet
try {
CompletableFuture<ApiResponse<Order>> response = apiInstance.placeOrderWithHttpInfo(body);
CompletableFuture<ApiResponse<Order>> response = apiInstance.placeOrderWithHttpInfo(order);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
System.out.println("Response body: " + response.get().getData());
@@ -572,7 +576,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**Order**](Order.md)| order placed for purchasing the pet | |
| **order** | [**Order**](Order.md)| order placed for purchasing the pet | |
### Return type
@@ -585,7 +589,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: application/xml, application/json
### HTTP response details

View File

@@ -25,7 +25,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## createUser
> CompletableFuture<Void> createUser(body)
> CompletableFuture<Void> createUser(user)
Create user
@@ -48,9 +48,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
CompletableFuture<Void> result = apiInstance.createUser(body);
CompletableFuture<Void> result = apiInstance.createUser(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser");
System.err.println("Status code: " + e.getCode());
@@ -67,7 +67,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**User**](User.md)| Created user object | |
| **user** | [**User**](User.md)| Created user object | |
### Return type
@@ -80,7 +80,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -90,7 +90,7 @@ No authorization required
## createUserWithHttpInfo
> CompletableFuture<ApiResponse<Void>> createUser createUserWithHttpInfo(body)
> CompletableFuture<ApiResponse<Void>> createUser createUserWithHttpInfo(user)
Create user
@@ -114,9 +114,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object
User user = new User(); // User | Created user object
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUserWithHttpInfo(body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUserWithHttpInfo(user);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -142,7 +142,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**User**](User.md)| Created user object | |
| **user** | [**User**](User.md)| Created user object | |
### Return type
@@ -155,7 +155,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -166,10 +166,12 @@ No authorization required
## createUsersWithArrayInput
> CompletableFuture<Void> createUsersWithArrayInput(body)
> CompletableFuture<Void> createUsersWithArrayInput(user)
Creates list of users with given input array
### Example
```java
@@ -187,9 +189,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
CompletableFuture<Void> result = apiInstance.createUsersWithArrayInput(body);
CompletableFuture<Void> result = apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
System.err.println("Status code: " + e.getCode());
@@ -206,7 +208,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -219,7 +221,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -229,10 +231,12 @@ No authorization required
## createUsersWithArrayInputWithHttpInfo
> CompletableFuture<ApiResponse<Void>> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(body)
> CompletableFuture<ApiResponse<Void>> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(user)
Creates list of users with given input array
### Example
```java
@@ -251,9 +255,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithArrayInputWithHttpInfo(body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithArrayInputWithHttpInfo(user);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -279,7 +283,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -292,7 +296,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -303,10 +307,12 @@ No authorization required
## createUsersWithListInput
> CompletableFuture<Void> createUsersWithListInput(body)
> CompletableFuture<Void> createUsersWithListInput(user)
Creates list of users with given input array
### Example
```java
@@ -324,9 +330,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
CompletableFuture<Void> result = apiInstance.createUsersWithListInput(body);
CompletableFuture<Void> result = apiInstance.createUsersWithListInput(user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput");
System.err.println("Status code: " + e.getCode());
@@ -343,7 +349,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -356,7 +362,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -366,10 +372,12 @@ No authorization required
## createUsersWithListInputWithHttpInfo
> CompletableFuture<ApiResponse<Void>> createUsersWithListInput createUsersWithListInputWithHttpInfo(body)
> CompletableFuture<ApiResponse<Void>> createUsersWithListInput createUsersWithListInputWithHttpInfo(user)
Creates list of users with given input array
### Example
```java
@@ -388,9 +396,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object
List<User> user = Arrays.asList(); // List<User> | List of user object
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithListInputWithHttpInfo(body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithListInputWithHttpInfo(user);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -416,7 +424,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **body** | [**List&lt;User&gt;**](User.md)| List of user object | |
| **user** | [**List&lt;User&gt;**](User.md)| List of user object | |
### Return type
@@ -429,7 +437,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -587,6 +595,8 @@ No authorization required
Get user by user name
### Example
```java
@@ -653,6 +663,8 @@ No authorization required
Get user by user name
### Example
```java
@@ -730,6 +742,8 @@ No authorization required
Logs user into the system
### Example
```java
@@ -797,6 +811,8 @@ No authorization required
Logs user into the system
### Example
```java
@@ -875,6 +891,8 @@ No authorization required
Logs out current logged in user session
### Example
```java
@@ -934,6 +952,8 @@ No authorization required
Logs out current logged in user session
### Example
```java
@@ -1000,7 +1020,7 @@ No authorization required
## updateUser
> CompletableFuture<Void> updateUser(username, body)
> CompletableFuture<Void> updateUser(username, user)
Updated user
@@ -1024,9 +1044,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object
User user = new User(); // User | Updated user object
try {
CompletableFuture<Void> result = apiInstance.updateUser(username, body);
CompletableFuture<Void> result = apiInstance.updateUser(username, user);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser");
System.err.println("Status code: " + e.getCode());
@@ -1044,7 +1064,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **username** | **String**| name that need to be deleted | |
| **body** | [**User**](User.md)| Updated user object | |
| **user** | [**User**](User.md)| Updated user object | |
### Return type
@@ -1057,7 +1077,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details
@@ -1068,7 +1088,7 @@ No authorization required
## updateUserWithHttpInfo
> CompletableFuture<ApiResponse<Void>> updateUser updateUserWithHttpInfo(username, body)
> CompletableFuture<ApiResponse<Void>> updateUser updateUserWithHttpInfo(username, user)
Updated user
@@ -1093,9 +1113,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object
User user = new User(); // User | Updated user object
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.updateUserWithHttpInfo(username, body);
CompletableFuture<ApiResponse<Void>> response = apiInstance.updateUserWithHttpInfo(username, user);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
@@ -1122,7 +1142,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **username** | **String**| name that need to be deleted | |
| **body** | [**User**](User.md)| Updated user object | |
| **user** | [**User**](User.md)| Updated user object | |
### Return type
@@ -1135,7 +1155,7 @@ No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Content-Type**: application/json
- **Accept**: Not defined
### HTTP response details