forked from loafle/openapi-generator-original
[Java][Native] added WithHttpInfo method for async-native (#6903)
* [java-asyncNative] add withHttpInfo * update api template for async-native
This commit is contained in:
@@ -5,6 +5,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**call123testSpecialTags**](AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
[**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
|
||||
@@ -36,8 +37,7 @@ public class Example {
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
CompletableFuture<Client> result = apiInstance.call123testSpecialTags(body);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@@ -75,3 +75,79 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## call123testSpecialTagsWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Client>> call123testSpecialTags call123testSpecialTagsWithHttpInfo(body)
|
||||
|
||||
To test special tags
|
||||
|
||||
To test special tags and operation ID starting with number
|
||||
|
||||
### 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.AnotherFakeApi;
|
||||
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");
|
||||
|
||||
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Client>> response = apiInstance.call123testSpecialTagsWithHttpInfo(body);
|
||||
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 AnotherFakeApi#call123testSpecialTags");
|
||||
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 AnotherFakeApi#call123testSpecialTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**body** | [**Client**](Client.md)| client model |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**Client**](Client.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user