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

@@ -18,10 +18,12 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
## addPet
> addPet(body)
> addPet(pet)
Add a new pet to the store
### Example
```java
@@ -43,9 +45,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 {
apiInstance.addPet(body);
apiInstance.addPet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode());
@@ -62,7 +64,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
@@ -81,7 +83,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -91,6 +93,8 @@ null (empty response body)
Deletes a pet
### Example
```java
@@ -152,7 +156,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | successful operation | - |
| **200** | Successful operation | - |
| **400** | Invalid pet value | - |
@@ -377,10 +381,12 @@ public class Example {
## updatePet
> updatePet(body)
> updatePet(pet)
Update an existing pet
### Example
```java
@@ -402,9 +408,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 {
apiInstance.updatePet(body);
apiInstance.updatePet(pet);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode());
@@ -421,7 +427,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
@@ -440,7 +446,7 @@ null (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 | - |
@@ -452,6 +458,8 @@ null (empty response body)
Updates a pet in the store with form data
### Example
```java
@@ -515,6 +523,7 @@ null (empty response body)
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | Successful operation | - |
| **405** | Invalid input | - |
@@ -524,6 +533,8 @@ null (empty response body)
uploads an image
### Example
```java
@@ -597,6 +608,8 @@ public class Example {
uploads an image (required)
### Example
```java