forked from loafle/openapi-generator-original
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user