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:
parent
9318833fa5
commit
8cd52033e4
@ -392,9 +392,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
|
||||
} else if (NATIVE.equals(getLibrary())) {
|
||||
setJava8Mode(true);
|
||||
additionalProperties.put("java8", "true");
|
||||
if (!asyncNative) {
|
||||
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
|
||||
}
|
||||
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
|
||||
} else if (RESTEASY.equals(getLibrary())) {
|
||||
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
|
||||
|
@ -99,12 +99,19 @@ public class {{{classname}}}Example {
|
||||
{{/allParams}}
|
||||
try {
|
||||
{{^vendorExtensions.x-group-parameters}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}{{#hasParams}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
{{#hasParams}}
|
||||
API{{operationId}}Request request = API{{operationId}}Request.newBuilder(){{#allParams}}
|
||||
.{{paramName}}({{paramName}}){{/allParams}}
|
||||
.build();{{/hasParams}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}});{{/vendorExtensions.x-group-parameters}}{{#returnType}}
|
||||
System.out.println(result);{{/returnType}}
|
||||
.build();
|
||||
{{/hasParams}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}});
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#returnType}}
|
||||
System.out.println(result{{#asyncNative}}.get(){{/asyncNative}});
|
||||
{{/returnType}}
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -124,6 +131,7 @@ All URIs are relative to *{{basePath}}*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
*{{classname}}* | [**{{operationId}}WithHttpInfo**]({{apiDocPath}}{{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
|
||||
|
||||
## Documentation for Models
|
||||
|
@ -3,9 +3,7 @@ package {{package}};
|
||||
|
||||
import {{invokerPackage}}.ApiClient;
|
||||
import {{invokerPackage}}.ApiException;
|
||||
{{^asyncNative}}
|
||||
import {{invokerPackage}}.ApiResponse;
|
||||
{{/asyncNative}}
|
||||
import {{invokerPackage}}.Pair;
|
||||
|
||||
{{#imports}}
|
||||
@ -57,6 +55,15 @@ public class {{classname}} {
|
||||
memberVarReadTimeout = apiClient.getReadTimeout();
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
{{#asyncNative}}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
{{/asyncNative}}
|
||||
|
||||
{{#operation}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
@ -66,7 +73,7 @@ public class {{classname}} {
|
||||
* {{notes}}
|
||||
* @param {{operationId}}Request {@link API{{operationId}}Request}
|
||||
{{#returnType}}
|
||||
* @return {{returnType}}
|
||||
* @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}}
|
||||
{{/returnType}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
@ -86,13 +93,12 @@ public class {{classname}} {
|
||||
{{/allParams}}
|
||||
{{#returnType}}return {{/returnType}}{{^returnType}}{{#asyncNative}}return {{/asyncNative}}{{/returnType}}{{operationId}}({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
}
|
||||
{{^asyncNative}}
|
||||
|
||||
/**
|
||||
* {{summary}}
|
||||
* {{notes}}
|
||||
* @param {{operationId}}Request {@link API{{operationId}}Request}
|
||||
* @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||
* @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
@ -105,13 +111,12 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo(API{{operationId}}Request {{operationId}}Request) throws ApiException {
|
||||
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo(API{{operationId}}Request {{operationId}}Request) throws ApiException {
|
||||
{{#allParams}}
|
||||
{{{dataType}}} {{paramName}} = {{operationId}}Request.{{paramName}}();
|
||||
{{/allParams}}
|
||||
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
}
|
||||
{{/asyncNative}}
|
||||
|
||||
{{/hasParams}}
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
@ -122,7 +127,7 @@ public class {{classname}} {
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
|
||||
{{/allParams}}
|
||||
{{#returnType}}
|
||||
* @return {{returnType}}
|
||||
* @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}{{returnType}}{{#asyncNative}}>{{/asyncNative}}
|
||||
{{/returnType}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
@ -150,12 +155,8 @@ public class {{classname}} {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"{{operationId}} call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("{{operationId}}", localVarResponse));
|
||||
}
|
||||
{{#returnType}}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
@ -168,7 +169,6 @@ public class {{classname}} {
|
||||
{{^returnType}}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
{{/returnType}}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -176,7 +176,6 @@ public class {{classname}} {
|
||||
}
|
||||
{{/asyncNative}}
|
||||
}
|
||||
{{^asyncNative}}
|
||||
|
||||
/**
|
||||
* {{summary}}
|
||||
@ -184,7 +183,7 @@ public class {{classname}} {
|
||||
{{#allParams}}
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
|
||||
{{/allParams}}
|
||||
* @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||
* @return {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
@ -197,7 +196,8 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
public {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
{{^asyncNative}}
|
||||
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
@ -224,8 +224,41 @@ public class {{classname}} {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ApiException(e);
|
||||
}
|
||||
{{/asyncNative}}
|
||||
{{#asyncNative}}
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = {{operationId}}RequestBuilder({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("{{operationId}}", localVarResponse));
|
||||
}
|
||||
{{#returnType}}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<{{{returnType}}}>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<{{{returnType}}}>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
{{/returnType}}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
{{/asyncNative}}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder {{operationId}}RequestBuilder({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
{{#allParams}}
|
||||
|
@ -7,9 +7,7 @@ All URIs are relative to *{{basePath}}*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{^asyncNative}}
|
||||
[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{/asyncNative}}
|
||||
[**{{operationId}}WithHttpInfo**]({{classname}}.md#{{operationId}}WithHttpInfo) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
|
||||
{{/operation}}{{/operations}}
|
||||
|
||||
{{#operations}}
|
||||
@ -81,8 +79,11 @@ public class Example {
|
||||
.{{paramName}}({{paramName}}){{/allParams}}
|
||||
.build();
|
||||
{{/hasParams}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}});{{/vendorExtensions.x-group-parameters}}{{#returnType}}
|
||||
System.out.println(result);{{/returnType}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{{returnType}}}>{{/asyncNative}}{{^asyncNative}}{{{returnType}}}{{/asyncNative}} result = {{/returnType}}{{^returnType}}{{#asyncNative}}CompletableFuture<Void> result = {{/asyncNative}}{{/returnType}}apiInstance.{{operationId}}({{#hasParams}}request{{/hasParams}});
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#returnType}}
|
||||
System.out.println(result{{#asyncNative}}.get(){{/asyncNative}});
|
||||
{{/returnType}}
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -131,15 +132,14 @@ Name | Type | Description | Notes
|
||||
| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} |
|
||||
{{/responses}}
|
||||
{{/responses.0}}
|
||||
{{^asyncNative}}
|
||||
|
||||
## {{operationId}}WithHttpInfo
|
||||
|
||||
{{^vendorExtensions.x-group-parameters}}
|
||||
> ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
> ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}})
|
||||
> {{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} {{operationId}} {{operationId}}WithHttpInfo({{#hasParams}}{{operationId}}Request{{/hasParams}})
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
|
||||
{{summary}}{{#notes}}
|
||||
@ -158,6 +158,9 @@ import {{{invokerPackage}}}.auth.*;{{/hasAuthMethods}}
|
||||
import {{{invokerPackage}}}.models.*;
|
||||
import {{{package}}}.{{{classname}}};{{#vendorExtensions.x-group-parameters}}
|
||||
import {{{package}}}.{{{classname}}}.*;{{/vendorExtensions.x-group-parameters}}
|
||||
{{#asyncNative}}
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
{{/asyncNative}}
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
@ -189,7 +192,7 @@ public class Example {
|
||||
{{/allParams}}
|
||||
try {
|
||||
{{^vendorExtensions.x-group-parameters}}
|
||||
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
{{#hasParams}}
|
||||
@ -197,18 +200,27 @@ public class Example {
|
||||
.{{paramName}}({{paramName}}){{/allParams}}
|
||||
.build();
|
||||
{{/hasParams}}
|
||||
ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> response = apiInstance.{{{operationId}}}WithHttpInfo({{#hasParams}}request{{/hasParams}});
|
||||
{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}>{{#asyncNative}}>{{/asyncNative}} response = apiInstance.{{{operationId}}}WithHttpInfo({{#hasParams}}request{{/hasParams}});
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Status code: " + response{{#asyncNative}}.get(){{/asyncNative}}.getStatusCode());
|
||||
System.out.println("Response headers: " + response{{#asyncNative}}.get(){{/asyncNative}}.getHeaders());
|
||||
{{#returnType}}
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response body: " + response{{#asyncNative}}.get(){{/asyncNative}}.getData());
|
||||
{{/returnType}}
|
||||
{{#asyncNative}}
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
|
||||
System.err.println("Status code: " + apiException.getCode());
|
||||
System.err.println("Response headers: " + apiException.getResponseHeaders());
|
||||
System.err.println("Reason: " + apiException.getResponseBody());
|
||||
e.printStackTrace();
|
||||
{{/asyncNative}}
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -232,8 +244,8 @@ Name | Type | Description | Notes
|
||||
|
||||
### Return type
|
||||
|
||||
{{#returnType}}ApiResponse<{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}>{{/returnType}}
|
||||
{{^returnType}}ApiResponse<Void>{{/returnType}}
|
||||
{{#returnType}}{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}>{{#asyncNative}}>{{/asyncNative}}{{/returnType}}
|
||||
{{^returnType}}{{#asyncNative}}CompletableFuture<{{/asyncNative}}ApiResponse<Void>{{#asyncNative}}>{{/asyncNative}}{{/returnType}}
|
||||
|
||||
### Authorization
|
||||
|
||||
@ -252,7 +264,6 @@ Name | Type | Description | Notes
|
||||
| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}} <br> {{/headers}}{{^headers.0}} - {{/headers.0}} |
|
||||
{{/responses}}
|
||||
{{/responses.0}}
|
||||
{{/asyncNative}}
|
||||
{{#vendorExtensions.x-group-parameters}}{{#hasParams}}
|
||||
|
||||
<a name="API{{operationId}}Request"></a>
|
||||
|
@ -445,7 +445,7 @@ public class JavaClientCodegenTest {
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
List<File> files = generator.opts(clientOptInput).generate();
|
||||
|
||||
Assert.assertEquals(files.size(), 30);
|
||||
Assert.assertEquals(files.size(), 31);
|
||||
validateJavaSourceFiles(files);
|
||||
|
||||
Path defaultApi = Paths.get(output + "/src/main/java/xyz/abcdef/api/PingApi.java");
|
||||
|
@ -67,6 +67,7 @@ settings.gradle
|
||||
src/main/AndroidManifest.xml
|
||||
src/main/java/org/openapitools/client/ApiClient.java
|
||||
src/main/java/org/openapitools/client/ApiException.java
|
||||
src/main/java/org/openapitools/client/ApiResponse.java
|
||||
src/main/java/org/openapitools/client/Configuration.java
|
||||
src/main/java/org/openapitools/client/Pair.java
|
||||
src/main/java/org/openapitools/client/ServerConfiguration.java
|
||||
|
@ -87,7 +87,7 @@ public class AnotherFakeApiExample {
|
||||
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());
|
||||
@ -107,42 +107,79 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*AnotherFakeApi* | [**call123testSpecialTagsWithHttpInfo**](docs/AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*FakeApi* | [**createXmlItemWithHttpInfo**](docs/FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterBooleanSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterCompositeSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterNumberSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testBodyWithQueryParamsWithHttpInfo**](docs/FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testClientModelWithHttpInfo**](docs/FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testEnumParametersWithHttpInfo**](docs/FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**testGroupParametersWithHttpInfo**](docs/FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testInlineAdditionalPropertiesWithHttpInfo**](docs/FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**testJsonFormDataWithHttpInfo**](docs/FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
*FakeApi* | [**testQueryParameterCollectionFormatWithHttpInfo**](docs/FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-paramters |
|
||||
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*FakeClassnameTags123Api* | [**testClassnameWithHttpInfo**](docs/FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**addPetWithHttpInfo**](docs/PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**deletePetWithHttpInfo**](docs/PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByStatusWithHttpInfo**](docs/PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**findPetsByTagsWithHttpInfo**](docs/PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**getPetByIdWithHttpInfo**](docs/PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithHttpInfo**](docs/PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**updatePetWithFormWithHttpInfo**](docs/PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**uploadFileWithHttpInfo**](docs/PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*PetApi* | [**uploadFileWithRequiredFileWithHttpInfo**](docs/PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**deleteOrderWithHttpInfo**](docs/StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getInventoryWithHttpInfo**](docs/StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**getOrderByIdWithHttpInfo**](docs/StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*StoreApi* | [**placeOrderWithHttpInfo**](docs/StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
*UserApi* | [**createUserWithHttpInfo**](docs/UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user
|
||||
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithArrayInputWithHttpInfo**](docs/UserApi.md#createUsersWithArrayInputWithHttpInfo) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInputWithHttpInfo**](docs/UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**deleteUserWithHttpInfo**](docs/UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**getUserByNameWithHttpInfo**](docs/UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**loginUserWithHttpInfo**](docs/UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**logoutUserWithHttpInfo**](docs/UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
*UserApi* | [**updateUserWithHttpInfo**](docs/UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
@ -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 | - |
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5,6 +5,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
|
||||
@ -43,8 +44,7 @@ public class Example {
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
CompletableFuture<Client> result = apiInstance.testClassname(body);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -82,3 +82,86 @@ CompletableFuture<[**Client**](Client.md)>
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## testClassnameWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Client>> testClassname testClassnameWithHttpInfo(body)
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
To test class name in snake case
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.FakeClassnameTags123Api;
|
||||
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");
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
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)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Client>> response = apiInstance.testClassnameWithHttpInfo(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 FakeClassnameTags123Api#testClassname");
|
||||
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 FakeClassnameTags123Api#testClassname");
|
||||
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
|
||||
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
@ -5,14 +5,23 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
[**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
|
||||
@ -47,7 +56,6 @@ public class Example {
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.addPet(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -86,6 +94,85 @@ CompletableFuture<void> (empty response body)
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
## addPetWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> addPet addPetWithHttpInfo(body)
|
||||
|
||||
Add a new pet to the store
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.addPetWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
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 PetApi#addPet");
|
||||
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** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
|
||||
## deletePet
|
||||
|
||||
@ -119,7 +206,6 @@ public class Example {
|
||||
String apiKey = "apiKey_example"; // String |
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.deletePet(petId, apiKey);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -159,6 +245,87 @@ CompletableFuture<void> (empty response body)
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
## deletePetWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> deletePet deletePetWithHttpInfo(petId, apiKey)
|
||||
|
||||
Deletes a pet
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Long petId = 56L; // Long | Pet id to delete
|
||||
String apiKey = "apiKey_example"; // String |
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.deletePetWithHttpInfo(petId, apiKey);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
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 PetApi#deletePet");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| Pet id to delete |
|
||||
**apiKey** | **String**| | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid pet value | - |
|
||||
|
||||
|
||||
## findPetsByStatus
|
||||
|
||||
@ -193,8 +360,7 @@ public class Example {
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
CompletableFuture<List<Pet>> result = apiInstance.findPetsByStatus(status);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -218,6 +384,88 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**List<Pet>**](Pet.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid status value | - |
|
||||
|
||||
## findPetsByStatusWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<List<Pet>>> findPetsByStatus findPetsByStatusWithHttpInfo(status)
|
||||
|
||||
Finds Pets by status
|
||||
|
||||
Multiple status values can be provided with comma separated strings
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
CompletableFuture<ApiResponse<List<Pet>>> response = apiInstance.findPetsByStatusWithHttpInfo(status);
|
||||
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 PetApi#findPetsByStatus");
|
||||
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 PetApi#findPetsByStatus");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**status** | [**List<String>**](String.md)| Status values that need to be considered for filter | [enum: available, pending, sold]
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**List<Pet>**](Pet.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@ -267,8 +515,7 @@ public class Example {
|
||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
||||
try {
|
||||
CompletableFuture<Set<Pet>> result = apiInstance.findPetsByTags(tags);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -292,6 +539,88 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**Set<Pet>**](Pet.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid tag value | - |
|
||||
|
||||
## findPetsByTagsWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Set<Pet>>> findPetsByTags findPetsByTagsWithHttpInfo(tags)
|
||||
|
||||
Finds Pets by tags
|
||||
|
||||
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Set<Pet>>> response = apiInstance.findPetsByTagsWithHttpInfo(tags);
|
||||
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 PetApi#findPetsByTags");
|
||||
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 PetApi#findPetsByTags");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**tags** | [**Set<String>**](String.md)| Tags to filter by |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**Set<Pet>**](Pet.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@ -343,8 +672,7 @@ public class Example {
|
||||
Long petId = 56L; // Long | ID of pet to return
|
||||
try {
|
||||
CompletableFuture<Pet> result = apiInstance.getPetById(petId);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#getPetById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -368,6 +696,91 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**Pet**](Pet.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
|
||||
## getPetByIdWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Pet>> getPetById getPetByIdWithHttpInfo(petId)
|
||||
|
||||
Find pet by ID
|
||||
|
||||
Returns a single pet
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to return
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Pet>> response = apiInstance.getPetByIdWithHttpInfo(petId);
|
||||
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 PetApi#getPetById");
|
||||
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 PetApi#getPetById");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to return |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**Pet**](Pet.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
@ -416,7 +829,6 @@ public class Example {
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.updatePet(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -457,6 +869,87 @@ CompletableFuture<void> (empty response body)
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
## updatePetWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> updatePet updatePetWithHttpInfo(body)
|
||||
|
||||
Update an existing pet
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.updatePetWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
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 PetApi#updatePet");
|
||||
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** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json, application/xml
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Pet not found | - |
|
||||
| **405** | Validation exception | - |
|
||||
|
||||
|
||||
## updatePetWithForm
|
||||
|
||||
@ -491,7 +984,6 @@ public class Example {
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.updatePetWithForm(petId, name, status);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -531,6 +1023,88 @@ CompletableFuture<void> (empty response body)
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
## updatePetWithFormWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> updatePetWithForm updatePetWithFormWithHttpInfo(petId, name, status)
|
||||
|
||||
Updates a pet in the store with form data
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Long petId = 56L; // 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 {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.updatePetWithFormWithHttpInfo(petId, name, status);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
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 PetApi#updatePetWithForm");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**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]
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/x-www-form-urlencoded
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **405** | Invalid input | - |
|
||||
|
||||
|
||||
## uploadFile
|
||||
|
||||
@ -565,8 +1139,7 @@ public class Example {
|
||||
File file = new File("/path/to/file"); // File | file to upload
|
||||
try {
|
||||
CompletableFuture<ModelApiResponse> result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -592,6 +1165,89 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## uploadFileWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<ModelApiResponse>> uploadFile uploadFileWithHttpInfo(petId, additionalMetadata, file)
|
||||
|
||||
uploads an image
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
File file = new File("/path/to/file"); // File | file to upload
|
||||
try {
|
||||
CompletableFuture<ApiResponse<ModelApiResponse>> response = apiInstance.uploadFileWithHttpInfo(petId, additionalMetadata, file);
|
||||
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 PetApi#uploadFile");
|
||||
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 PetApi#uploadFile");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
**file** | **File**| file to upload | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**ModelApiResponse**](ModelApiResponse.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
@ -640,8 +1296,7 @@ public class Example {
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
try {
|
||||
CompletableFuture<ModelApiResponse> result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -681,3 +1336,86 @@ CompletableFuture<[**ModelApiResponse**](ModelApiResponse.md)>
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## uploadFileWithRequiredFileWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<ModelApiResponse>> uploadFileWithRequiredFile uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.PetApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File requiredFile = new File("/path/to/file"); // File | file to upload
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
try {
|
||||
CompletableFuture<ApiResponse<ModelApiResponse>> response = apiInstance.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
|
||||
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 PetApi#uploadFileWithRequiredFile");
|
||||
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 PetApi#uploadFileWithRequiredFile");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**requiredFile** | **File**| file to upload |
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional]
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**ModelApiResponse**](ModelApiResponse.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[petstore_auth](../README.md#petstore_auth)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: multipart/form-data
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
@ -5,9 +5,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
|
||||
@ -39,7 +43,6 @@ public class Example {
|
||||
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.deleteOrder(orderId);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -78,6 +81,82 @@ No authorization required
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
## deleteOrderWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> deleteOrder deleteOrderWithHttpInfo(orderId)
|
||||
|
||||
Delete purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
|
||||
### 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.StoreApi;
|
||||
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");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.deleteOrderWithHttpInfo(orderId);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||
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 StoreApi#deleteOrder");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **String**| ID of the order that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
|
||||
## getInventory
|
||||
|
||||
@ -113,8 +192,7 @@ public class Example {
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
try {
|
||||
CompletableFuture<Map<String, Integer>> result = apiInstance.getInventory();
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getInventory");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -135,6 +213,85 @@ This endpoint does not need any parameter.
|
||||
CompletableFuture<**Map<String, Integer>**>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## getInventoryWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Map<String, Integer>>> getInventory getInventoryWithHttpInfo()
|
||||
|
||||
Returns pet inventories by status
|
||||
|
||||
Returns a map of status codes to quantities
|
||||
|
||||
### 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.auth.*;
|
||||
import org.openapitools.client.models.*;
|
||||
import org.openapitools.client.api.StoreApi;
|
||||
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");
|
||||
|
||||
// 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(defaultClient);
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Map<String, Integer>>> response = apiInstance.getInventoryWithHttpInfo();
|
||||
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 StoreApi#getInventory");
|
||||
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 StoreApi#getInventory");
|
||||
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<**Map<String, Integer>**>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
[api_key](../README.md#api_key)
|
||||
@ -178,8 +335,7 @@ public class Example {
|
||||
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
CompletableFuture<Order> result = apiInstance.getOrderById(orderId);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getOrderById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -203,6 +359,84 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**Order**](Order.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid ID supplied | - |
|
||||
| **404** | Order not found | - |
|
||||
|
||||
## getOrderByIdWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Order>> getOrderById getOrderByIdWithHttpInfo(orderId)
|
||||
|
||||
Find purchase order by ID
|
||||
|
||||
For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
|
||||
### 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.StoreApi;
|
||||
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");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Order>> response = apiInstance.getOrderByIdWithHttpInfo(orderId);
|
||||
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 StoreApi#getOrderById");
|
||||
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 StoreApi#getOrderById");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**orderId** | **Long**| ID of pet that needs to be fetched |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**Order**](Order.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@ -246,8 +480,7 @@ public class Example {
|
||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
||||
try {
|
||||
CompletableFuture<Order> result = apiInstance.placeOrder(body);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -286,3 +519,78 @@ No authorization required
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid Order | - |
|
||||
|
||||
## placeOrderWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Order>> placeOrder placeOrderWithHttpInfo(body)
|
||||
|
||||
Place an order for a pet
|
||||
|
||||
### 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.StoreApi;
|
||||
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");
|
||||
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Order>> response = apiInstance.placeOrderWithHttpInfo(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 StoreApi#placeOrder");
|
||||
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 StoreApi#placeOrder");
|
||||
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** | [**Order**](Order.md)| order placed for purchasing the pet |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**Order**](Order.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid Order | - |
|
||||
|
||||
|
@ -5,13 +5,21 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
[**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
|
||||
@ -43,7 +51,6 @@ public class Example {
|
||||
User body = new User(); // User | Created user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUser(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -81,6 +88,81 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
## createUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUser createUserWithHttpInfo(body)
|
||||
|
||||
Create user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
User body = new User(); // User | Created user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUserWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
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 UserApi#createUser");
|
||||
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** | [**User**](User.md)| Created user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## createUsersWithArrayInput
|
||||
|
||||
@ -108,7 +190,6 @@ public class Example {
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithArrayInput(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -146,6 +227,79 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
## createUsersWithArrayInputWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithArrayInput createUsersWithArrayInputWithHttpInfo(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithArrayInputWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
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 UserApi#createUsersWithArrayInput");
|
||||
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** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## createUsersWithListInput
|
||||
|
||||
@ -173,7 +327,6 @@ public class Example {
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.createUsersWithListInput(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -211,6 +364,79 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
## createUsersWithListInputWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> createUsersWithListInput createUsersWithListInputWithHttpInfo(body)
|
||||
|
||||
Creates list of users with given input array
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.createUsersWithListInputWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
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 UserApi#createUsersWithListInput");
|
||||
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** | [**List<User>**](User.md)| List of user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## deleteUser
|
||||
|
||||
@ -240,7 +466,6 @@ public class Example {
|
||||
String username = "username_example"; // String | The name that needs to be deleted
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.deleteUser(username);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -279,6 +504,82 @@ No authorization required
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
## deleteUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> deleteUser deleteUserWithHttpInfo(username)
|
||||
|
||||
Delete user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The name that needs to be deleted
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.deleteUserWithHttpInfo(username);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
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 UserApi#deleteUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be deleted |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
|
||||
## getUserByName
|
||||
|
||||
@ -306,8 +607,7 @@ public class Example {
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
CompletableFuture<User> result = apiInstance.getUserByName(username);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUserByName");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -331,6 +631,82 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<[**User**](User.md)>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
| **400** | Invalid username supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
## getUserByNameWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<User>> getUserByName getUserByNameWithHttpInfo(username)
|
||||
|
||||
Get user by user name
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The name that needs to be fetched. Use user1 for testing.
|
||||
try {
|
||||
CompletableFuture<ApiResponse<User>> response = apiInstance.getUserByNameWithHttpInfo(username);
|
||||
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 UserApi#getUserByName");
|
||||
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 UserApi#getUserByName");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The name that needs to be fetched. Use user1 for testing. |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<[**User**](User.md)>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@ -375,8 +751,7 @@ public class Example {
|
||||
String password = "password_example"; // String | The password for login in clear text
|
||||
try {
|
||||
CompletableFuture<String> result = apiInstance.loginUser(username, password);
|
||||
|
||||
System.out.println(result);
|
||||
System.out.println(result.get());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#loginUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -401,6 +776,83 @@ Name | Type | Description | Notes
|
||||
CompletableFuture<**String**>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> |
|
||||
| **400** | Invalid username/password supplied | - |
|
||||
|
||||
## loginUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<String>> loginUser loginUserWithHttpInfo(username, password)
|
||||
|
||||
Logs user into the system
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | The user name for login
|
||||
String password = "password_example"; // String | The password for login in clear text
|
||||
try {
|
||||
CompletableFuture<ApiResponse<String>> response = apiInstance.loginUserWithHttpInfo(username, password);
|
||||
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 UserApi#loginUser");
|
||||
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 UserApi#loginUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| The user name for login |
|
||||
**password** | **String**| The password for login in clear text |
|
||||
|
||||
### Return type
|
||||
|
||||
CompletableFuture<ApiResponse<**String**>>
|
||||
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
@ -442,7 +894,6 @@ public class Example {
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.logoutUser();
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -477,6 +928,75 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
## logoutUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> logoutUser logoutUserWithHttpInfo()
|
||||
|
||||
Logs out current logged in user session
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.logoutUserWithHttpInfo();
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
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 UserApi#logoutUser");
|
||||
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<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **0** | successful operation | - |
|
||||
|
||||
|
||||
## updateUser
|
||||
|
||||
@ -507,7 +1027,6 @@ public class Example {
|
||||
User body = new User(); // User | Updated user object
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.updateUser(username, body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -547,3 +1066,81 @@ No authorization required
|
||||
| **400** | Invalid user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
## updateUserWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> updateUser updateUserWithHttpInfo(username, body)
|
||||
|
||||
Updated user
|
||||
|
||||
This can only be done by the logged in user.
|
||||
|
||||
### 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.UserApi;
|
||||
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");
|
||||
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
String username = "username_example"; // String | name that need to be deleted
|
||||
User body = new User(); // User | Updated user object
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.updateUserWithHttpInfo(username, body);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
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 UserApi#updateUser");
|
||||
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
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**username** | **String**| name that need to be deleted |
|
||||
**body** | [**User**](User.md)| Updated user object |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **400** | Invalid user supplied | - |
|
||||
| **404** | User not found | - |
|
||||
|
||||
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* API response returned by API call.
|
||||
*
|
||||
* @param <T> The type of data that is deserialized from response body
|
||||
*/
|
||||
public class ApiResponse<T> {
|
||||
final private int statusCode;
|
||||
final private Map<String, List<String>> headers;
|
||||
final private T data;
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers) {
|
||||
this(statusCode, headers, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param statusCode The status code of HTTP response
|
||||
* @param headers The headers of HTTP response
|
||||
* @param data The object deserialized from response bod
|
||||
*/
|
||||
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
|
||||
this.statusCode = statusCode;
|
||||
this.headers = headers;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public int getStatusCode() {
|
||||
return statusCode;
|
||||
}
|
||||
|
||||
public Map<String, List<String>> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
@ -59,11 +60,18 @@ public class AnotherFakeApi {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @return CompletableFuture<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Client> call123testSpecialTags(Client body) throws ApiException {
|
||||
@ -73,12 +81,8 @@ public class AnotherFakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"call123testSpecialTags call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("call123testSpecialTags", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {})
|
||||
@ -86,7 +90,6 @@ public class AnotherFakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -94,6 +97,40 @@ public class AnotherFakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @return CompletableFuture<ApiResponse<Client>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Client>> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = call123testSpecialTagsRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("call123testSpecialTags", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Client>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder call123testSpecialTagsRequestBuilder(Client body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@ -67,6 +68,13 @@ public class FakeApi {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
@ -80,14 +88,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"createXmlItem call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("createXmlItem", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -95,6 +98,33 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* creates an XmlItem
|
||||
* this route creates an XmlItem
|
||||
* @param xmlItem XmlItem Body (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = createXmlItemRequestBuilder(xmlItem);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("createXmlItem", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder createXmlItemRequestBuilder(XmlItem xmlItem) throws ApiException {
|
||||
// verify the required parameter 'xmlItem' is set
|
||||
if (xmlItem == null) {
|
||||
@ -128,7 +158,7 @@ public class FakeApi {
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return Boolean
|
||||
* @return CompletableFuture<Boolean>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Boolean> fakeOuterBooleanSerialize(Boolean body) throws ApiException {
|
||||
@ -138,12 +168,8 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterBooleanSerialize call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterBooleanSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Boolean>() {})
|
||||
@ -151,7 +177,6 @@ public class FakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -159,6 +184,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer boolean types
|
||||
* @param body Input boolean as post body (optional)
|
||||
* @return CompletableFuture<ApiResponse<Boolean>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Boolean>> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = fakeOuterBooleanSerializeRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterBooleanSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Boolean>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Boolean>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder fakeOuterBooleanSerializeRequestBuilder(Boolean body) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -188,7 +247,7 @@ public class FakeApi {
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return OuterComposite
|
||||
* @return CompletableFuture<OuterComposite>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<OuterComposite> fakeOuterCompositeSerialize(OuterComposite body) throws ApiException {
|
||||
@ -198,12 +257,8 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterCompositeSerialize call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterCompositeSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<OuterComposite>() {})
|
||||
@ -211,7 +266,6 @@ public class FakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -219,6 +273,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of object with outer number type
|
||||
* @param body Input composite as post body (optional)
|
||||
* @return CompletableFuture<ApiResponse<OuterComposite>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<OuterComposite>> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = fakeOuterCompositeSerializeRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterCompositeSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<OuterComposite>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<OuterComposite>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder fakeOuterCompositeSerializeRequestBuilder(OuterComposite body) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -248,7 +336,7 @@ public class FakeApi {
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return BigDecimal
|
||||
* @return CompletableFuture<BigDecimal>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<BigDecimal> fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
|
||||
@ -258,12 +346,8 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterNumberSerialize call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterNumberSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<BigDecimal>() {})
|
||||
@ -271,7 +355,6 @@ public class FakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -279,6 +362,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer number types
|
||||
* @param body Input number as post body (optional)
|
||||
* @return CompletableFuture<ApiResponse<BigDecimal>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<BigDecimal>> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = fakeOuterNumberSerializeRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterNumberSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<BigDecimal>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<BigDecimal>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder fakeOuterNumberSerializeRequestBuilder(BigDecimal body) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -308,7 +425,7 @@ public class FakeApi {
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return String
|
||||
* @return CompletableFuture<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<String> fakeOuterStringSerialize(String body) throws ApiException {
|
||||
@ -318,12 +435,8 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"fakeOuterStringSerialize call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterStringSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<String>() {})
|
||||
@ -331,7 +444,6 @@ public class FakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -339,6 +451,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Test serialization of outer string types
|
||||
* @param body Input string as post body (optional)
|
||||
* @return CompletableFuture<ApiResponse<String>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<String>> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = fakeOuterStringSerializeRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("fakeOuterStringSerialize", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<String>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<String>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder fakeOuterStringSerializeRequestBuilder(String body) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -377,14 +523,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testBodyWithFileSchema call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -392,6 +533,33 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param body (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyWithFileSchemaRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testBodyWithFileSchema", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBodyWithFileSchemaRequestBuilder(FileSchemaTestClass body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -435,14 +603,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testBodyWithQueryParams call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testBodyWithQueryParams", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -450,6 +613,34 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param query (required)
|
||||
* @param body (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testBodyWithQueryParamsRequestBuilder(query, body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testBodyWithQueryParams", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testBodyWithQueryParamsRequestBuilder(String query, User body) throws ApiException {
|
||||
// verify the required parameter 'query' is set
|
||||
if (query == null) {
|
||||
@ -496,7 +687,7 @@ public class FakeApi {
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @return CompletableFuture<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Client> testClientModel(Client body) throws ApiException {
|
||||
@ -506,12 +697,8 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testClientModel call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("testClientModel", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {})
|
||||
@ -519,7 +706,6 @@ public class FakeApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -527,6 +713,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param body client model (required)
|
||||
* @return CompletableFuture<ApiResponse<Client>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Client>> testClientModelWithHttpInfo(Client body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testClientModelRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testClientModel", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Client>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testClientModelRequestBuilder(Client body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -582,14 +802,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testEndpointParameters call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testEndpointParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -597,6 +812,46 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
* @param number None (required)
|
||||
* @param _double None (required)
|
||||
* @param patternWithoutDelimiter None (required)
|
||||
* @param _byte None (required)
|
||||
* @param integer None (optional)
|
||||
* @param int32 None (optional)
|
||||
* @param int64 None (optional)
|
||||
* @param _float None (optional)
|
||||
* @param string None (optional)
|
||||
* @param binary None (optional)
|
||||
* @param date None (optional)
|
||||
* @param dateTime None (optional)
|
||||
* @param password None (optional)
|
||||
* @param paramCallback None (optional)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEndpointParametersRequestBuilder(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testEndpointParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEndpointParametersRequestBuilder(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||
// verify the required parameter 'number' is set
|
||||
if (number == null) {
|
||||
@ -652,14 +907,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testEnumParameters call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testEnumParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -667,6 +917,40 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To test enum parameters
|
||||
* To test enum parameters
|
||||
* @param enumHeaderStringArray Header parameter enum test (string array) (optional
|
||||
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryStringArray Query parameter enum test (string array) (optional
|
||||
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
|
||||
* @param enumQueryInteger Query parameter enum test (double) (optional)
|
||||
* @param enumQueryDouble Query parameter enum test (double) (optional)
|
||||
* @param enumFormStringArray Form parameter enum test (string array) (optional
|
||||
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testEnumParametersRequestBuilder(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testEnumParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testEnumParametersRequestBuilder(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -720,6 +1004,23 @@ public class FakeApi {
|
||||
return testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param testGroupParametersRequest {@link APItestGroupParametersRequest}
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testGroupParametersWithHttpInfo(APItestGroupParametersRequest testGroupParametersRequest) throws ApiException {
|
||||
Integer requiredStringGroup = testGroupParametersRequest.requiredStringGroup();
|
||||
Boolean requiredBooleanGroup = testGroupParametersRequest.requiredBooleanGroup();
|
||||
Long requiredInt64Group = testGroupParametersRequest.requiredInt64Group();
|
||||
Integer stringGroup = testGroupParametersRequest.stringGroup();
|
||||
Boolean booleanGroup = testGroupParametersRequest.booleanGroup();
|
||||
Long int64Group = testGroupParametersRequest.int64Group();
|
||||
return testGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@ -738,14 +1039,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testGroupParameters call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testGroupParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -753,6 +1049,38 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testGroupParametersRequestBuilder(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testGroupParameters", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testGroupParametersRequestBuilder(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||
// verify the required parameter 'requiredStringGroup' is set
|
||||
if (requiredStringGroup == null) {
|
||||
@ -892,14 +1220,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testInlineAdditionalProperties call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testInlineAdditionalProperties", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -907,6 +1230,33 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testInlineAdditionalPropertiesRequestBuilder(param);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testInlineAdditionalProperties", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testInlineAdditionalPropertiesRequestBuilder(Map<String, String> param) throws ApiException {
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
@ -950,14 +1300,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testJsonFormData call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testJsonFormData", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -965,6 +1310,34 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
* @param param field1 (required)
|
||||
* @param param2 field2 (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testJsonFormDataRequestBuilder(param, param2);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testJsonFormData", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testJsonFormDataRequestBuilder(String param, String param2) throws ApiException {
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
@ -1009,14 +1382,9 @@ public class FakeApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testQueryParameterCollectionFormat call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("testQueryParameterCollectionFormat", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -1024,6 +1392,37 @@ public class FakeApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* To test the collection format in query parameters
|
||||
* @param pipe (required)
|
||||
* @param ioutil (required)
|
||||
* @param http (required)
|
||||
* @param url (required)
|
||||
* @param context (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryParameterCollectionFormatRequestBuilder(pipe, ioutil, http, url, context);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testQueryParameterCollectionFormat", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryParameterCollectionFormatRequestBuilder(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
||||
// verify the required parameter 'pipe' is set
|
||||
if (pipe == null) {
|
||||
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.Client;
|
||||
@ -59,11 +60,18 @@ public class FakeClassnameTags123Api {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return Client
|
||||
* @return CompletableFuture<Client>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Client> testClassname(Client body) throws ApiException {
|
||||
@ -73,12 +81,8 @@ public class FakeClassnameTags123Api {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"testClassname call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("testClassname", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {})
|
||||
@ -86,7 +90,6 @@ public class FakeClassnameTags123Api {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -94,6 +97,40 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @return CompletableFuture<ApiResponse<Client>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Client>> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testClassnameRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testClassname", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Client>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Client>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testClassnameRequestBuilder(Client body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import java.io.File;
|
||||
@ -62,6 +63,13 @@ public class PetApi {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
@ -75,14 +83,9 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"addPet call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("addPet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -90,6 +93,33 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = addPetRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("addPet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder addPetRequestBuilder(Pet body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -133,14 +163,9 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"deletePet call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("deletePet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -148,6 +173,34 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param petId Pet id to delete (required)
|
||||
* @param apiKey (optional)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = deletePetRequestBuilder(petId, apiKey);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("deletePet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder deletePetRequestBuilder(Long petId, String apiKey) throws ApiException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -179,7 +232,7 @@ public class PetApi {
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return List<Pet>
|
||||
* @return CompletableFuture<List<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<List<Pet>> findPetsByStatus(List<String> status) throws ApiException {
|
||||
@ -189,12 +242,8 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"findPetsByStatus call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("findPetsByStatus", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<List<Pet>>() {})
|
||||
@ -202,7 +251,6 @@ public class PetApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -210,6 +258,40 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* @param status Status values that need to be considered for filter (required)
|
||||
* @return CompletableFuture<ApiResponse<List<Pet>>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<List<Pet>>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = findPetsByStatusRequestBuilder(status);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("findPetsByStatus", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<List<Pet>>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<List<Pet>>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder findPetsByStatusRequestBuilder(List<String> status) throws ApiException {
|
||||
// verify the required parameter 'status' is set
|
||||
if (status == null) {
|
||||
@ -246,7 +328,7 @@ public class PetApi {
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return Set<Pet>
|
||||
* @return CompletableFuture<Set<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @deprecated
|
||||
*/
|
||||
@ -258,12 +340,8 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"findPetsByTags call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("findPetsByTags", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Set<Pet>>() {})
|
||||
@ -271,7 +349,6 @@ public class PetApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -279,6 +356,42 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return CompletableFuture<ApiResponse<Set<Pet>>>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public CompletableFuture<ApiResponse<Set<Pet>>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = findPetsByTagsRequestBuilder(tags);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("findPetsByTags", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Set<Pet>>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Set<Pet>>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder findPetsByTagsRequestBuilder(Set<String> tags) throws ApiException {
|
||||
// verify the required parameter 'tags' is set
|
||||
if (tags == null) {
|
||||
@ -315,7 +428,7 @@ public class PetApi {
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return Pet
|
||||
* @return CompletableFuture<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Pet> getPetById(Long petId) throws ApiException {
|
||||
@ -325,12 +438,8 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"getPetById call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("getPetById", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Pet>() {})
|
||||
@ -338,7 +447,6 @@ public class PetApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -346,6 +454,40 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a single pet
|
||||
* @param petId ID of pet to return (required)
|
||||
* @return CompletableFuture<ApiResponse<Pet>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Pet>> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = getPetByIdRequestBuilder(petId);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("getPetById", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Pet>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Pet>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder getPetByIdRequestBuilder(Long petId) throws ApiException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -383,14 +525,9 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"updatePet call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("updatePet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -398,6 +535,33 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param body Pet object that needs to be added to the store (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = updatePetRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("updatePet", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder updatePetRequestBuilder(Pet body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -442,14 +606,9 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"updatePetWithForm call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("updatePetWithForm", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -457,6 +616,35 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param petId ID of pet that needs to be updated (required)
|
||||
* @param name Updated name of the pet (optional)
|
||||
* @param status Updated status of the pet (optional)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = updatePetWithFormRequestBuilder(petId, name, status);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("updatePetWithForm", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder updatePetWithFormRequestBuilder(Long petId, String name, String status) throws ApiException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -487,7 +675,7 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return ModelApiResponse
|
||||
* @return CompletableFuture<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ModelApiResponse> uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
@ -497,12 +685,8 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"uploadFile call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("uploadFile", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelApiResponse>() {})
|
||||
@ -510,7 +694,6 @@ public class PetApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -518,6 +701,42 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @param file file to upload (optional)
|
||||
* @return CompletableFuture<ApiResponse<ModelApiResponse>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<ModelApiResponse>> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = uploadFileRequestBuilder(petId, additionalMetadata, file);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("uploadFile", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<ModelApiResponse>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelApiResponse>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder uploadFileRequestBuilder(Long petId, String additionalMetadata, File file) throws ApiException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
@ -548,7 +767,7 @@ public class PetApi {
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @return ModelApiResponse
|
||||
* @return CompletableFuture<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ModelApiResponse> uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
@ -558,12 +777,8 @@ public class PetApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"uploadFileWithRequiredFile call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("uploadFileWithRequiredFile", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelApiResponse>() {})
|
||||
@ -571,7 +786,6 @@ public class PetApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -579,6 +793,42 @@ public class PetApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional)
|
||||
* @return CompletableFuture<ApiResponse<ModelApiResponse>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<ModelApiResponse>> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = uploadFileWithRequiredFileRequestBuilder(petId, requiredFile, additionalMetadata);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("uploadFileWithRequiredFile", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<ModelApiResponse>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelApiResponse>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder uploadFileWithRequiredFileRequestBuilder(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId == null) {
|
||||
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.Order;
|
||||
@ -59,6 +60,13 @@ public class StoreApi {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@ -72,14 +80,9 @@ public class StoreApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"deleteOrder call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("deleteOrder", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -87,6 +90,33 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = deleteOrderRequestBuilder(orderId);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("deleteOrder", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder deleteOrderRequestBuilder(String orderId) throws ApiException {
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -114,7 +144,7 @@ public class StoreApi {
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return Map<String, Integer>
|
||||
* @return CompletableFuture<Map<String, Integer>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Map<String, Integer>> getInventory() throws ApiException {
|
||||
@ -124,12 +154,8 @@ public class StoreApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"getInventory call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("getInventory", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Map<String, Integer>>() {})
|
||||
@ -137,7 +163,6 @@ public class StoreApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -145,6 +170,39 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @return CompletableFuture<ApiResponse<Map<String, Integer>>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Map<String, Integer>>> getInventoryWithHttpInfo() throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = getInventoryRequestBuilder();
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("getInventory", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Map<String, Integer>>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Map<String, Integer>>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder getInventoryRequestBuilder() throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -168,7 +226,7 @@ public class StoreApi {
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return Order
|
||||
* @return CompletableFuture<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Order> getOrderById(Long orderId) throws ApiException {
|
||||
@ -178,12 +236,8 @@ public class StoreApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"getOrderById call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("getOrderById", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Order>() {})
|
||||
@ -191,7 +245,6 @@ public class StoreApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -199,6 +252,40 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @return CompletableFuture<ApiResponse<Order>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Order>> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = getOrderByIdRequestBuilder(orderId);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("getOrderById", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Order>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Order>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder getOrderByIdRequestBuilder(Long orderId) throws ApiException {
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -227,7 +314,7 @@ public class StoreApi {
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return Order
|
||||
* @return CompletableFuture<Order>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Order> placeOrder(Order body) throws ApiException {
|
||||
@ -237,12 +324,8 @@ public class StoreApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"placeOrder call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("placeOrder", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Order>() {})
|
||||
@ -250,7 +333,6 @@ public class StoreApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -258,6 +340,40 @@ public class StoreApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @return CompletableFuture<ApiResponse<Order>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Order>> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = placeOrderRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("placeOrder", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Order>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<Order>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder placeOrderRequestBuilder(Order body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
|
@ -14,6 +14,7 @@ package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.User;
|
||||
@ -59,6 +60,13 @@ public class UserApi {
|
||||
memberVarResponseInterceptor = apiClient.getResponseInterceptor();
|
||||
}
|
||||
|
||||
private ApiException getApiException(String operationId, HttpResponse<String>localVarResponse) {
|
||||
return new ApiException(localVarResponse.statusCode(),
|
||||
operationId + " call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body());
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
@ -72,14 +80,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"createUser call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("createUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -87,6 +90,33 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param body Created user object (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> createUserWithHttpInfo(User body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = createUserRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("createUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder createUserRequestBuilder(User body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -129,14 +159,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"createUsersWithArrayInput call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("createUsersWithArrayInput", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -144,6 +169,33 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = createUsersWithArrayInputRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("createUsersWithArrayInput", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder createUsersWithArrayInputRequestBuilder(List<User> body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -186,14 +238,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"createUsersWithListInput call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("createUsersWithListInput", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -201,6 +248,33 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param body List of user object (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = createUsersWithListInputRequestBuilder(body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("createUsersWithListInput", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder createUsersWithListInputRequestBuilder(List<User> body) throws ApiException {
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -243,14 +317,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"deleteUser call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("deleteUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -258,6 +327,33 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username The name that needs to be deleted (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = deleteUserRequestBuilder(username);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("deleteUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder deleteUserRequestBuilder(String username) throws ApiException {
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@ -286,7 +382,7 @@ public class UserApi {
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return User
|
||||
* @return CompletableFuture<User>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<User> getUserByName(String username) throws ApiException {
|
||||
@ -296,12 +392,8 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"getUserByName call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("getUserByName", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<User>() {})
|
||||
@ -309,7 +401,6 @@ public class UserApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -317,6 +408,40 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
* @param username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
* @return CompletableFuture<ApiResponse<User>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<User>> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = getUserByNameRequestBuilder(username);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("getUserByName", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<User>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<User>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder getUserByNameRequestBuilder(String username) throws ApiException {
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@ -346,7 +471,7 @@ public class UserApi {
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return String
|
||||
* @return CompletableFuture<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<String> loginUser(String username, String password) throws ApiException {
|
||||
@ -356,12 +481,8 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"loginUser call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.failedFuture(getApiException("loginUser", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<String>() {})
|
||||
@ -369,7 +490,6 @@ public class UserApi {
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -377,6 +497,41 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
* @param username The user name for login (required)
|
||||
* @param password The password for login in clear text (required)
|
||||
* @return CompletableFuture<ApiResponse<String>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<String>> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = loginUserRequestBuilder(username, password);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("loginUser", localVarResponse));
|
||||
}
|
||||
try {
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<String>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<String>() {}))
|
||||
);
|
||||
} catch (IOException e) {
|
||||
return CompletableFuture.failedFuture(new ApiException(e));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder loginUserRequestBuilder(String username, String password) throws ApiException {
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
@ -426,14 +581,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"logoutUser call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("logoutUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -441,6 +591,32 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> logoutUserWithHttpInfo() throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = logoutUserRequestBuilder();
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("logoutUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder logoutUserRequestBuilder() throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
@ -474,14 +650,9 @@ public class UserApi {
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(new ApiException(localVarResponse.statusCode(),
|
||||
"updateUser call received non-success response",
|
||||
localVarResponse.headers(),
|
||||
localVarResponse.body())
|
||||
);
|
||||
} else {
|
||||
return CompletableFuture.completedFuture(null);
|
||||
return CompletableFuture.failedFuture(getApiException("updateUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
@ -489,6 +660,34 @@ public class UserApi {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
* @param username name that need to be deleted (required)
|
||||
* @param body Updated user object (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = updateUserRequestBuilder(username, body);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("updateUser", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder updateUserRequestBuilder(String username, User body) throws ApiException {
|
||||
// verify the required parameter 'username' is set
|
||||
if (username == null) {
|
||||
|
@ -106,42 +106,79 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
*AnotherFakeApi* | [**call123testSpecialTags**](docs/AnotherFakeApi.md#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*AnotherFakeApi* | [**call123testSpecialTagsWithHttpInfo**](docs/AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags
|
||||
*FakeApi* | [**createXmlItem**](docs/FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*FakeApi* | [**createXmlItemWithHttpInfo**](docs/FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
*FakeApi* | [**fakeOuterBooleanSerialize**](docs/FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterBooleanSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean |
|
||||
*FakeApi* | [**fakeOuterCompositeSerialize**](docs/FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterCompositeSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite |
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterNumberSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testBodyWithQueryParamsWithHttpInfo**](docs/FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testClientModelWithHttpInfo**](docs/FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model
|
||||
*FakeApi* | [**testEndpointParameters**](docs/FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEndpointParametersWithHttpInfo**](docs/FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*FakeApi* | [**testEnumParameters**](docs/FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testEnumParametersWithHttpInfo**](docs/FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters
|
||||
*FakeApi* | [**testGroupParameters**](docs/FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**testGroupParametersWithHttpInfo**](docs/FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
*FakeApi* | [**testInlineAdditionalProperties**](docs/FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testInlineAdditionalPropertiesWithHttpInfo**](docs/FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
*FakeApi* | [**testJsonFormData**](docs/FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**testJsonFormDataWithHttpInfo**](docs/FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
*FakeApi* | [**testQueryParameterCollectionFormat**](docs/FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
*FakeApi* | [**testQueryParameterCollectionFormatWithHttpInfo**](docs/FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-paramters |
|
||||
*FakeClassnameTags123Api* | [**testClassname**](docs/FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*FakeClassnameTags123Api* | [**testClassnameWithHttpInfo**](docs/FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
*PetApi* | [**addPet**](docs/PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**addPetWithHttpInfo**](docs/PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store
|
||||
*PetApi* | [**deletePet**](docs/PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**deletePetWithHttpInfo**](docs/PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByStatusWithHttpInfo**](docs/PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**findPetsByTagsWithHttpInfo**](docs/PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
*PetApi* | [**getPetById**](docs/PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**getPetByIdWithHttpInfo**](docs/PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID
|
||||
*PetApi* | [**updatePet**](docs/PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithHttpInfo**](docs/PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet
|
||||
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**updatePetWithFormWithHttpInfo**](docs/PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**uploadFileWithHttpInfo**](docs/PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
*PetApi* | [**uploadFileWithRequiredFile**](docs/PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*PetApi* | [**uploadFileWithRequiredFileWithHttpInfo**](docs/PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**deleteOrderWithHttpInfo**](docs/StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
*StoreApi* | [**getInventory**](docs/StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getInventoryWithHttpInfo**](docs/StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status
|
||||
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**getOrderByIdWithHttpInfo**](docs/StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
*StoreApi* | [**placeOrderWithHttpInfo**](docs/StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet
|
||||
*UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create user
|
||||
*UserApi* | [**createUserWithHttpInfo**](docs/UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user
|
||||
*UserApi* | [**createUsersWithArrayInput**](docs/UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithArrayInputWithHttpInfo**](docs/UserApi.md#createUsersWithArrayInputWithHttpInfo) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**createUsersWithListInputWithHttpInfo**](docs/UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**deleteUserWithHttpInfo**](docs/UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user
|
||||
*UserApi* | [**getUserByName**](docs/UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**getUserByNameWithHttpInfo**](docs/UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name
|
||||
*UserApi* | [**loginUser**](docs/UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**loginUserWithHttpInfo**](docs/UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system
|
||||
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**logoutUserWithHttpInfo**](docs/UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session
|
||||
*UserApi* | [**updateUser**](docs/UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
*UserApi* | [**updateUserWithHttpInfo**](docs/UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
## Documentation for Models
|
||||
|
@ -5,7 +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#call123testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags
|
||||
[**call123testSpecialTagsWithHttpInfo**](AnotherFakeApi.md#call123testSpecialTagsWithHttpInfo) | **PATCH** /another-fake/dummy | To test special tags
|
||||
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ public class Example {
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.call123testSpecialTags(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
|
||||
@ -104,13 +103,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Client> response = apiInstance.call123testSpecialTagsWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -5,33 +5,33 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**createXmlItemWithHttpInfo**](FakeApi.md#createXmlItemWithHttpInfo) | **POST** /fake/create_xml_item | creates an XmlItem
|
||||
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterBooleanSerializeWithHttpInfo**](FakeApi.md#fakeOuterBooleanSerializeWithHttpInfo) | **POST** /fake/outer/boolean |
|
||||
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterCompositeSerializeWithHttpInfo**](FakeApi.md#fakeOuterCompositeSerializeWithHttpInfo) | **POST** /fake/outer/composite |
|
||||
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
[**fakeOuterNumberSerializeWithHttpInfo**](FakeApi.md#fakeOuterNumberSerializeWithHttpInfo) | **POST** /fake/outer/number |
|
||||
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
[**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string |
|
||||
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema |
|
||||
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
[**testBodyWithQueryParamsWithHttpInfo**](FakeApi.md#testBodyWithQueryParamsWithHttpInfo) | **PUT** /fake/body-with-query-params |
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testClientModelWithHttpInfo**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testClientModelWithHttpInfo**](FakeApi.md#testClientModelWithHttpInfo) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEndpointParametersWithHttpInfo**](FakeApi.md#testEndpointParametersWithHttpInfo) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testEnumParametersWithHttpInfo**](FakeApi.md#testEnumParametersWithHttpInfo) | **GET** /fake | To test enum parameters
|
||||
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testGroupParametersWithHttpInfo**](FakeApi.md#testGroupParametersWithHttpInfo) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testInlineAdditionalPropertiesWithHttpInfo**](FakeApi.md#testInlineAdditionalPropertiesWithHttpInfo) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testJsonFormDataWithHttpInfo**](FakeApi.md#testJsonFormDataWithHttpInfo) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
[**testQueryParameterCollectionFormat**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
[**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormat) | **PUT** /fake/test-query-paramters |
|
||||
[**testQueryParameterCollectionFormatWithHttpInfo**](FakeApi.md#testQueryParameterCollectionFormatWithHttpInfo) | **PUT** /fake/test-query-paramters |
|
||||
|
||||
|
||||
|
||||
@ -62,7 +62,6 @@ public class Example {
|
||||
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
|
||||
try {
|
||||
apiInstance.createXmlItem(xmlItem);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#createXmlItem");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -129,12 +128,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.createXmlItemWithHttpInfo(xmlItem);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#createXmlItem");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -195,7 +194,6 @@ public class Example {
|
||||
Boolean body = true; // Boolean | Input boolean as post body
|
||||
try {
|
||||
Boolean result = apiInstance.fakeOuterBooleanSerialize(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
||||
@ -263,13 +261,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Boolean> response = apiInstance.fakeOuterBooleanSerializeWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterBooleanSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -330,7 +328,6 @@ public class Example {
|
||||
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body
|
||||
try {
|
||||
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
|
||||
@ -398,13 +395,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<OuterComposite> response = apiInstance.fakeOuterCompositeSerializeWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -465,7 +462,6 @@ public class Example {
|
||||
BigDecimal body = new BigDecimal(); // BigDecimal | Input number as post body
|
||||
try {
|
||||
BigDecimal result = apiInstance.fakeOuterNumberSerialize(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
|
||||
@ -533,13 +529,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<BigDecimal> response = apiInstance.fakeOuterNumberSerializeWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterNumberSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -600,7 +596,6 @@ public class Example {
|
||||
String body = "body_example"; // String | Input string as post body
|
||||
try {
|
||||
String result = apiInstance.fakeOuterStringSerialize(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
|
||||
@ -668,13 +663,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<String> response = apiInstance.fakeOuterStringSerializeWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#fakeOuterStringSerialize");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -735,7 +730,6 @@ public class Example {
|
||||
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass |
|
||||
try {
|
||||
apiInstance.testBodyWithFileSchema(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -802,12 +796,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testBodyWithFileSchemaWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -867,7 +861,6 @@ public class Example {
|
||||
User body = new User(); // User |
|
||||
try {
|
||||
apiInstance.testBodyWithQueryParams(query, body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -934,12 +927,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testBodyWithQueryParamsWithHttpInfo(query, body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1001,7 +994,6 @@ public class Example {
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.testClientModel(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testClientModel");
|
||||
@ -1069,13 +1061,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Client> response = apiInstance.testClientModelWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testClientModel");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1155,7 +1147,6 @@ public class Example {
|
||||
String paramCallback = "paramCallback_example"; // String | None
|
||||
try {
|
||||
apiInstance.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1255,12 +1246,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEndpointParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1342,7 +1333,6 @@ public class Example {
|
||||
String enumFormString = "-efg"; // String | Form parameter enum test (string)
|
||||
try {
|
||||
apiInstance.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEnumParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1424,12 +1414,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testEnumParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1591,12 +1581,12 @@ public class Example {
|
||||
.build();
|
||||
ApiResponse<Void> response = apiInstance.testGroupParametersWithHttpInfo(request);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testGroupParameters");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1669,7 +1659,6 @@ public class Example {
|
||||
Map<String, String> param = new HashMap(); // Map<String, String> | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1734,12 +1723,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testInlineAdditionalPropertiesWithHttpInfo(param);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1799,7 +1788,6 @@ public class Example {
|
||||
String param2 = "param2_example"; // String | field2
|
||||
try {
|
||||
apiInstance.testJsonFormData(param, param2);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testJsonFormData");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1866,12 +1854,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testJsonFormDataWithHttpInfo(param, param2);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testJsonFormData");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1937,7 +1925,6 @@ public class Example {
|
||||
List<String> context = Arrays.asList(); // List<String> |
|
||||
try {
|
||||
apiInstance.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -2012,12 +1999,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testQueryParameterCollectionFormat");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**testClassname**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassname) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
[**testClassnameWithHttpInfo**](FakeClassnameTags123Api.md#testClassnameWithHttpInfo) | **PATCH** /fake_classname_test | To test class name in snake case
|
||||
|
||||
|
||||
|
||||
@ -43,7 +43,6 @@ public class Example {
|
||||
Client body = new Client(); // Client | client model
|
||||
try {
|
||||
Client result = apiInstance.testClassname(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
|
||||
@ -118,13 +117,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Client> response = apiInstance.testClassnameWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -5,23 +5,23 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**addPet**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetWithHttpInfo**](PetApi.md#addPet) | **POST** /pet | Add a new pet to the store
|
||||
[**addPetWithHttpInfo**](PetApi.md#addPetWithHttpInfo) | **POST** /pet | Add a new pet to the store
|
||||
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**deletePetWithHttpInfo**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**deletePetWithHttpInfo**](PetApi.md#deletePetWithHttpInfo) | **DELETE** /pet/{petId} | Deletes a pet
|
||||
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByStatusWithHttpInfo**](PetApi.md#findPetsByStatusWithHttpInfo) | **GET** /pet/findByStatus | Finds Pets by status
|
||||
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**findPetsByTagsWithHttpInfo**](PetApi.md#findPetsByTagsWithHttpInfo) | **GET** /pet/findByTags | Finds Pets by tags
|
||||
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdWithHttpInfo**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**getPetByIdWithHttpInfo**](PetApi.md#getPetByIdWithHttpInfo) | **GET** /pet/{petId} | Find pet by ID
|
||||
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithHttpInfo**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithHttpInfo**](PetApi.md#updatePetWithHttpInfo) | **PUT** /pet | Update an existing pet
|
||||
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**updatePetWithFormWithHttpInfo**](PetApi.md#updatePetWithFormWithHttpInfo) | **POST** /pet/{petId} | Updates a pet in the store with form data
|
||||
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithHttpInfo**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithHttpInfo**](PetApi.md#uploadFileWithHttpInfo) | **POST** /pet/{petId}/uploadImage | uploads an image
|
||||
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
[**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
[**uploadFileWithRequiredFileWithHttpInfo**](PetApi.md#uploadFileWithRequiredFileWithHttpInfo) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
|
||||
|
||||
|
||||
|
||||
@ -55,7 +55,6 @@ public class Example {
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.addPet(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -126,12 +125,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.addPetWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#addPet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -197,7 +196,6 @@ public class Example {
|
||||
String apiKey = "apiKey_example"; // String |
|
||||
try {
|
||||
apiInstance.deletePet(petId, apiKey);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -270,12 +268,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.deletePetWithHttpInfo(petId, apiKey);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#deletePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -343,7 +341,6 @@ public class Example {
|
||||
List<String> status = Arrays.asList("available"); // List<String> | Status values that need to be considered for filter
|
||||
try {
|
||||
List<Pet> result = apiInstance.findPetsByStatus(status);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||
@ -417,13 +414,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<List<Pet>> response = apiInstance.findPetsByStatusWithHttpInfo(status);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByStatus");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -490,7 +487,6 @@ public class Example {
|
||||
Set<String> tags = Arrays.asList(); // Set<String> | Tags to filter by
|
||||
try {
|
||||
Set<Pet> result = apiInstance.findPetsByTags(tags);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
@ -564,13 +560,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Set<Pet>> response = apiInstance.findPetsByTagsWithHttpInfo(tags);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#findPetsByTags");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -639,7 +635,6 @@ public class Example {
|
||||
Long petId = 56L; // Long | ID of pet to return
|
||||
try {
|
||||
Pet result = apiInstance.getPetById(petId);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#getPetById");
|
||||
@ -716,13 +711,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Pet> response = apiInstance.getPetByIdWithHttpInfo(petId);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#getPetById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -788,7 +783,6 @@ public class Example {
|
||||
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store
|
||||
try {
|
||||
apiInstance.updatePet(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -861,12 +855,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.updatePetWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePet");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -935,7 +929,6 @@ public class Example {
|
||||
String status = "status_example"; // String | Updated status of the pet
|
||||
try {
|
||||
apiInstance.updatePetWithForm(petId, name, status);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1009,12 +1002,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.updatePetWithFormWithHttpInfo(petId, name, status);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#updatePetWithForm");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1082,7 +1075,6 @@ public class Example {
|
||||
File file = new File("/path/to/file"); // File | file to upload
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
@ -1157,13 +1149,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<ModelApiResponse> response = apiInstance.uploadFileWithHttpInfo(petId, additionalMetadata, file);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFile");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -1231,7 +1223,6 @@ public class Example {
|
||||
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@ -1306,13 +1297,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<ModelApiResponse> response = apiInstance.uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -5,13 +5,13 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**deleteOrder**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**deleteOrderWithHttpInfo**](StoreApi.md#deleteOrderWithHttpInfo) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
|
||||
[**getInventory**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryWithHttpInfo**](StoreApi.md#getInventory) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getInventoryWithHttpInfo**](StoreApi.md#getInventoryWithHttpInfo) | **GET** /store/inventory | Returns pet inventories by status
|
||||
[**getOrderById**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderById) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**getOrderByIdWithHttpInfo**](StoreApi.md#getOrderByIdWithHttpInfo) | **GET** /store/order/{order_id} | Find purchase order by ID
|
||||
[**placeOrder**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
[**placeOrderWithHttpInfo**](StoreApi.md#placeOrder) | **POST** /store/order | Place an order for a pet
|
||||
[**placeOrderWithHttpInfo**](StoreApi.md#placeOrderWithHttpInfo) | **POST** /store/order | Place an order for a pet
|
||||
|
||||
|
||||
|
||||
@ -42,7 +42,6 @@ public class Example {
|
||||
String orderId = "orderId_example"; // String | ID of the order that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteOrder(orderId);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -110,12 +109,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.deleteOrderWithHttpInfo(orderId);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#deleteOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -183,7 +182,6 @@ public class Example {
|
||||
StoreApi apiInstance = new StoreApi(defaultClient);
|
||||
try {
|
||||
Map<String, Integer> result = apiInstance.getInventory();
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getInventory");
|
||||
@ -254,13 +252,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Map<String, Integer>> response = apiInstance.getInventoryWithHttpInfo();
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getInventory");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -318,7 +316,6 @@ public class Example {
|
||||
Long orderId = 56L; // Long | ID of pet that needs to be fetched
|
||||
try {
|
||||
Order result = apiInstance.getOrderById(orderId);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getOrderById");
|
||||
@ -388,13 +385,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Order> response = apiInstance.getOrderByIdWithHttpInfo(orderId);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#getOrderById");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -455,7 +452,6 @@ public class Example {
|
||||
Order body = new Order(); // Order | order placed for purchasing the pet
|
||||
try {
|
||||
Order result = apiInstance.placeOrder(body);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||
@ -522,13 +518,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Order> response = apiInstance.placeOrderWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling StoreApi#placeOrder");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
@ -5,21 +5,21 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**createUser**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUserWithHttpInfo**](UserApi.md#createUser) | **POST** /user | Create user
|
||||
[**createUserWithHttpInfo**](UserApi.md#createUserWithHttpInfo) | **POST** /user | Create user
|
||||
[**createUsersWithArrayInput**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInput) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithArrayInputWithHttpInfo**](UserApi.md#createUsersWithArrayInputWithHttpInfo) | **POST** /user/createWithArray | Creates list of users with given input array
|
||||
[**createUsersWithListInput**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInput) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**createUsersWithListInputWithHttpInfo**](UserApi.md#createUsersWithListInputWithHttpInfo) | **POST** /user/createWithList | Creates list of users with given input array
|
||||
[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**deleteUserWithHttpInfo**](UserApi.md#deleteUser) | **DELETE** /user/{username} | Delete user
|
||||
[**deleteUserWithHttpInfo**](UserApi.md#deleteUserWithHttpInfo) | **DELETE** /user/{username} | Delete user
|
||||
[**getUserByName**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**getUserByNameWithHttpInfo**](UserApi.md#getUserByName) | **GET** /user/{username} | Get user by user name
|
||||
[**getUserByNameWithHttpInfo**](UserApi.md#getUserByNameWithHttpInfo) | **GET** /user/{username} | Get user by user name
|
||||
[**loginUser**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**loginUserWithHttpInfo**](UserApi.md#loginUser) | **GET** /user/login | Logs user into the system
|
||||
[**loginUserWithHttpInfo**](UserApi.md#loginUserWithHttpInfo) | **GET** /user/login | Logs user into the system
|
||||
[**logoutUser**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**logoutUserWithHttpInfo**](UserApi.md#logoutUser) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**logoutUserWithHttpInfo**](UserApi.md#logoutUserWithHttpInfo) | **GET** /user/logout | Logs out current logged in user session
|
||||
[**updateUser**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
[**updateUserWithHttpInfo**](UserApi.md#updateUser) | **PUT** /user/{username} | Updated user
|
||||
[**updateUserWithHttpInfo**](UserApi.md#updateUserWithHttpInfo) | **PUT** /user/{username} | Updated user
|
||||
|
||||
|
||||
|
||||
@ -50,7 +50,6 @@ public class Example {
|
||||
User body = new User(); // User | Created user object
|
||||
try {
|
||||
apiInstance.createUser(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -117,12 +116,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.createUserWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -181,7 +180,6 @@ public class Example {
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithArrayInput(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -246,12 +244,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.createUsersWithArrayInputWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -310,7 +308,6 @@ public class Example {
|
||||
List<User> body = Arrays.asList(); // List<User> | List of user object
|
||||
try {
|
||||
apiInstance.createUsersWithListInput(body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -375,12 +372,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.createUsersWithListInputWithHttpInfo(body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#createUsersWithListInput");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -441,7 +438,6 @@ public class Example {
|
||||
String username = "username_example"; // String | The name that needs to be deleted
|
||||
try {
|
||||
apiInstance.deleteUser(username);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -509,12 +505,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.deleteUserWithHttpInfo(username);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#deleteUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -574,7 +570,6 @@ public class Example {
|
||||
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);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUserByName");
|
||||
@ -642,13 +637,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<User> response = apiInstance.getUserByNameWithHttpInfo(username);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#getUserByName");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -710,7 +705,6 @@ public class Example {
|
||||
String password = "password_example"; // String | The password for login in clear text
|
||||
try {
|
||||
String result = apiInstance.loginUser(username, password);
|
||||
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#loginUser");
|
||||
@ -779,13 +773,13 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<String> response = apiInstance.loginUserWithHttpInfo(username, password);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response body: " + response.getData().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
System.out.println("Response body: " + response.getData());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#loginUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -845,7 +839,6 @@ public class Example {
|
||||
UserApi apiInstance = new UserApi(defaultClient);
|
||||
try {
|
||||
apiInstance.logoutUser();
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -906,12 +899,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.logoutUserWithHttpInfo();
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#logoutUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -970,7 +963,6 @@ public class Example {
|
||||
User body = new User(); // User | Updated user object
|
||||
try {
|
||||
apiInstance.updateUser(username, body);
|
||||
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
@ -1040,12 +1032,12 @@ public class Example {
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.updateUserWithHttpInfo(username, body);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders().toString());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling UserApi#updateUser");
|
||||
System.err.println("Status code: " + e.getCode());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||
System.err.println("Reason: " + e.getResponseBody());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user