[Java][Feign] Expose response headers for feign client (#10507)

* Add .circleci/config.yml

* Add the property exposeResponseHeaders to feign client

This new property indicates if the feign client should expose the response headers on the API class.

* Generate new docs for exposeResponseHeaders additional property

* Rename HeaderAwareResponse to HttpResponse

* Update samples

* Refactor the implementation to use the same approach as the c# generator.
Creates a new feign operation with the suffix WithHttpInfo, this operation returns the response encapsulated in a HttpResponse class.
The HttpResponse class contains the decoded body and the response headers

* Refactor the implementation to use the same approach as the c# generator.
Generate samples

* Refactor the implementation to use the same approach as the c# generator.
Generate docs

* Use Void instead of void for HttpResponse parameterized type
This commit is contained in:
Hugo Alves 2021-10-09 08:50:55 +01:00 committed by GitHub
parent e1f7fb0fbd
commit 331b61dc1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
26 changed files with 1888 additions and 6 deletions

View File

@ -328,6 +328,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/"); final String invokerFolder = (sourceFolder + '/' + invokerPackage).replace(".", "/");
final String apiFolder = (sourceFolder + '/' + apiPackage).replace(".", "/"); final String apiFolder = (sourceFolder + '/' + apiPackage).replace(".", "/");
final String modelsFolder = (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar);
authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/"); authFolder = (sourceFolder + '/' + invokerPackage + ".auth").replace(".", "/");
//Common files //Common files
@ -387,6 +388,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen
if (FEIGN.equals(getLibrary())) { if (FEIGN.equals(getLibrary())) {
modelDocTemplateFiles.remove("model_doc.mustache"); modelDocTemplateFiles.remove("model_doc.mustache");
apiDocTemplateFiles.remove("api_doc.mustache"); apiDocTemplateFiles.remove("api_doc.mustache");
//Templates to decode response headers
supportingFiles.add(new SupportingFile("model/HttpResponse.mustache", modelsFolder, "HttpResponse.java"));
supportingFiles.add(new SupportingFile("JacksonResponseDecoder.mustache", invokerFolder, "JacksonResponseDecoder.java"));
} }
if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) {
@ -431,7 +435,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
if (ProcessUtils.hasHttpSignatureMethods(openAPI)) { if (ProcessUtils.hasHttpSignatureMethods(openAPI)) {
supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java")); supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java"));
} }
supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java")); supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", modelsFolder, "AbstractOpenApiSchema.java"));
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
// Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema. // Composed schemas can have the 'additionalProperties' keyword, as specified in JSON schema.
@ -445,7 +449,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
setJava8ModeAndAdditionalProperties(true); setJava8ModeAndAdditionalProperties(true);
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java")); supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java")); supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", modelsFolder, "AbstractOpenApiSchema.java"));
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);
} else if (RESTEASY.equals(getLibrary())) { } else if (RESTEASY.equals(getLibrary())) {
setJava8ModeAndAdditionalProperties(true); setJava8ModeAndAdditionalProperties(true);

View File

@ -35,6 +35,7 @@ import feign.slf4j.Slf4jLogger;
import {{invokerPackage}}.auth.HttpBasicAuth; import {{invokerPackage}}.auth.HttpBasicAuth;
import {{invokerPackage}}.auth.HttpBearerAuth; import {{invokerPackage}}.auth.HttpBearerAuth;
import {{invokerPackage}}.auth.ApiKeyAuth; import {{invokerPackage}}.auth.ApiKeyAuth;
import {{invokerPackage}}.JacksonResponseDecoder;
{{#hasOAuthMethods}} {{#hasOAuthMethods}}
import {{invokerPackage}}.auth.ApiErrorDecoder; import {{invokerPackage}}.auth.ApiErrorDecoder;
@ -63,7 +64,7 @@ public class ApiClient {
feignBuilder = Feign.builder() feignBuilder = Feign.builder()
.client(new OkHttpClient()) .client(new OkHttpClient())
.encoder(new FormEncoder(new JacksonEncoder(objectMapper))) .encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
.decoder(new JacksonDecoder(objectMapper)) .decoder(new JacksonResponseDecoder(objectMapper))
{{#hasOAuthMethods}} {{#hasOAuthMethods}}
.errorDecoder(new ApiErrorDecoder()) .errorDecoder(new ApiErrorDecoder())
.retryer(new Retryer.Default(0, 0, 2)) .retryer(new Retryer.Default(0, 0, 2))

View File

@ -0,0 +1,38 @@
package {{invokerPackage}};
import com.fasterxml.jackson.databind.ObjectMapper;
import feign.Response;
import feign.Types;
import feign.jackson.JacksonDecoder;
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import {{modelPackage}}.HttpResponse;
public class JacksonResponseDecoder extends JacksonDecoder {
public JacksonResponseDecoder(ObjectMapper mapper) {
super(mapper);
}
@Override
public Object decode(Response response, Type type) throws IOException {
Map<String, Collection<String>> responseHeaders = Collections.unmodifiableMap(response.headers());
//Detects if the type is an instance of the parameterized class HttpResponse
Type responseBodyType;
if (Types.getRawType(type).isAssignableFrom(HttpResponse.class)) {
//The HttpResponse class has a single type parameter, the Dto class itself
responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0];
Object body = super.decode(response, responseBodyType);
return new HttpResponse(responseHeaders, body);
} else {
//The response is not encapsulated in the HttpResponse, decode the Dto as normal
return super.decode(response, type);
}
}
}

View File

@ -5,6 +5,7 @@ import {{invokerPackage}}.EncodingUtils;
{{#legacyDates}} {{#legacyDates}}
import {{invokerPackage}}.ParamExpander; import {{invokerPackage}}.ParamExpander;
{{/legacyDates}} {{/legacyDates}}
import {{modelPackage}}.HttpResponse;
{{#imports}}import {{import}}; {{#imports}}import {{import}};
{{/imports}} {{/imports}}
@ -49,8 +50,39 @@ public interface {{classname}} extends ApiClient.Api {
{{/-last}}{{/headerParams}} {{/-last}}{{/headerParams}}
}) })
{{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{#hasQueryParams}}
/**
* {{summary}}
* Similar to <code>{{operationId}}</code> but it also returns the http response headers .
* {{notes}}
{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
{{/allParams}}
{{#returnType}}
* @return A HttpResponse that wraps the response boyd and the http headers.
{{/returnType}}
{{#externalDocs}}
* {{description}}
* @see <a href="{{url}}">{{summary}} Documentation</a>
{{/externalDocs}}
{{#isDeprecated}}
* @deprecated
{{/isDeprecated}}
*/
{{#isDeprecated}}
@Deprecated
{{/isDeprecated}}
@RequestLine("{{httpMethod}} {{{path}}}{{#hasQueryParams}}?{{/hasQueryParams}}{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}")
@Headers({
{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}",
{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/-last}}{{/headerParams}}
})
HttpResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{nickname}}WithHttpInfo({{#allParams}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
{{#hasQueryParams}}
/** /**
* {{summary}} * {{summary}}
* {{notes}} * {{notes}}
@ -95,6 +127,47 @@ public interface {{classname}} extends ApiClient.Api {
{{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map<String, Object> queryParams); {{#returnType}}{{{.}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{nickname}}({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* {{summary}}
* {{notes}}
* Note, this is equivalent to the other <code>{{operationId}}</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
{{#allParams}}
{{^isQueryParam}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}
{{/isQueryParam}}
{{/allParams}}
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
{{#queryParams}}
* <li>{{paramName}} - {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}</li>
{{/queryParams}}
* </ul>
{{#returnType}}
* @return {{.}}
{{/returnType}}
{{#externalDocs}}
* {{description}}
* @see <a href="{{url}}">{{summary}} Documentation</a>
{{/externalDocs}}
{{#isDeprecated}}
* @deprecated
{{/isDeprecated}}
*/
{{#isDeprecated}}
@Deprecated
{{/isDeprecated}}
@RequestLine("{{httpMethod}} {{{path}}}?{{#queryParams}}{{baseName}}={{=<% %>=}}{<%paramName%>}<%={{ }}=%>{{^-last}}&{{/-last}}{{/queryParams}}")
@Headers({
{{#vendorExtensions.x-contentType}} "Content-Type: {{vendorExtensions.x-contentType}}",
{{/vendorExtensions.x-contentType}} "Accept: {{vendorExtensions.x-accepts}}",{{#headerParams}}
"{{baseName}}: {{=<% %>=}}{<%paramName%>}<%={{ }}=%>"{{^-last}},
{{/-last}}{{/headerParams}}
})
HttpResponse<{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{nickname}}WithHttpInfo({{#allParams}}{{^isQueryParam}}{{^isBodyParam}}{{^legacyDates}}@Param("{{paramName}}") {{/legacyDates}}{{#legacyDates}}@Param(value="{{paramName}}", expander=ParamExpander.class) {{/legacyDates}}{{/isBodyParam}}{{{dataType}}} {{paramName}}, {{/isQueryParam}}{{/allParams}}@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>{{operationId}}</code> method in a fluent style. * <code>{{operationId}}</code> method in a fluent style.
*/ */

View File

@ -0,0 +1,24 @@
package {{modelPackage}};
import java.util.Map;
import java.util.Collection;
public class HttpResponse<T>{
private Map<String, Collection<String>> headers;
private T body;
public HttpResponse(Map<String, Collection<String>> headers, T body) {
this.headers = headers;
this.body = body;
}
public T getBody(){
return body;
}
public Map<String, Collection<String>> getHeaders(){
return headers;
}
}

View File

@ -16,6 +16,7 @@ src/main/AndroidManifest.xml
src/main/java/org/openapitools/client/ApiClient.java src/main/java/org/openapitools/client/ApiClient.java
src/main/java/org/openapitools/client/CustomInstantDeserializer.java src/main/java/org/openapitools/client/CustomInstantDeserializer.java
src/main/java/org/openapitools/client/EncodingUtils.java src/main/java/org/openapitools/client/EncodingUtils.java
src/main/java/org/openapitools/client/JacksonResponseDecoder.java
src/main/java/org/openapitools/client/ParamExpander.java src/main/java/org/openapitools/client/ParamExpander.java
src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/RFC3339DateFormat.java
src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerConfiguration.java
@ -64,6 +65,7 @@ src/main/java/org/openapitools/client/model/EnumTest.java
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/FormatTest.java
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
src/main/java/org/openapitools/client/model/HttpResponse.java
src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MapTest.java
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/Model200Response.java src/main/java/org/openapitools/client/model/Model200Response.java

View File

@ -22,6 +22,7 @@ import feign.slf4j.Slf4jLogger;
import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.JacksonResponseDecoder;
import org.openapitools.client.auth.ApiErrorDecoder; import org.openapitools.client.auth.ApiErrorDecoder;
import org.openapitools.client.auth.OAuth; import org.openapitools.client.auth.OAuth;
@ -48,7 +49,7 @@ public class ApiClient {
feignBuilder = Feign.builder() feignBuilder = Feign.builder()
.client(new OkHttpClient()) .client(new OkHttpClient())
.encoder(new FormEncoder(new JacksonEncoder(objectMapper))) .encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
.decoder(new JacksonDecoder(objectMapper)) .decoder(new JacksonResponseDecoder(objectMapper))
.errorDecoder(new ApiErrorDecoder()) .errorDecoder(new ApiErrorDecoder())
.retryer(new Retryer.Default(0, 0, 2)) .retryer(new Retryer.Default(0, 0, 2))
.logger(new Slf4jLogger()); .logger(new Slf4jLogger());

View File

@ -0,0 +1,38 @@
package org.openapitools.client;
import com.fasterxml.jackson.databind.ObjectMapper;
import feign.Response;
import feign.Types;
import feign.jackson.JacksonDecoder;
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import org.openapitools.client.model.HttpResponse;
public class JacksonResponseDecoder extends JacksonDecoder {
public JacksonResponseDecoder(ObjectMapper mapper) {
super(mapper);
}
@Override
public Object decode(Response response, Type type) throws IOException {
Map<String, Collection<String>> responseHeaders = Collections.unmodifiableMap(response.headers());
//Detects if the type is an instance of the parameterized class HttpResponse
Type responseBodyType;
if (Types.getRawType(type).isAssignableFrom(HttpResponse.class)) {
//The HttpResponse class has a single type parameter, the Dto class itself
responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0];
Object body = super.decode(response, responseBodyType);
return new HttpResponse(responseHeaders, body);
} else {
//The response is not encapsulated in the HttpResponse, decode the Dto as normal
return super.decode(response, type);
}
}
}

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -27,4 +28,20 @@ public interface AnotherFakeApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Client call123testSpecialTags(Client body); Client call123testSpecialTags(Client body);
/**
* To test special tags
* Similar to <code>call123testSpecialTags</code> but it also returns the http response headers .
* To test special tags and operation ID starting with number
* @param body client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /another-fake/dummy")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> call123testSpecialTagsWithHttpInfo(Client body);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -35,6 +36,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void createXmlItem(XmlItem xmlItem); void createXmlItem(XmlItem xmlItem);
/**
* creates an XmlItem
* Similar to <code>createXmlItem</code> but it also returns the http response headers .
* this route creates an XmlItem
* @param xmlItem XmlItem Body (required)
*/
@RequestLine("POST /fake/create_xml_item")
@Headers({
"Content-Type: application/xml",
"Accept: application/json",
})
HttpResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem);
/** /**
* *
* Test serialization of outer boolean types * Test serialization of outer boolean types
@ -48,6 +64,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
Boolean fakeOuterBooleanSerialize(Boolean body); Boolean fakeOuterBooleanSerialize(Boolean body);
/**
*
* Similar to <code>fakeOuterBooleanSerialize</code> but it also returns the http response headers .
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/boolean")
@Headers({
"Content-Type: */*",
"Accept: */*",
})
HttpResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body);
/** /**
* *
* Test serialization of object with outer number type * Test serialization of object with outer number type
@ -61,6 +93,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
OuterComposite fakeOuterCompositeSerialize(OuterComposite body); OuterComposite fakeOuterCompositeSerialize(OuterComposite body);
/**
*
* Similar to <code>fakeOuterCompositeSerialize</code> but it also returns the http response headers .
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/composite")
@Headers({
"Content-Type: */*",
"Accept: */*",
})
HttpResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body);
/** /**
* *
* Test serialization of outer number types * Test serialization of outer number types
@ -74,6 +122,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
BigDecimal fakeOuterNumberSerialize(BigDecimal body); BigDecimal fakeOuterNumberSerialize(BigDecimal body);
/**
*
* Similar to <code>fakeOuterNumberSerialize</code> but it also returns the http response headers .
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/number")
@Headers({
"Content-Type: */*",
"Accept: */*",
})
HttpResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body);
/** /**
* *
* Test serialization of outer string types * Test serialization of outer string types
@ -87,6 +151,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
String fakeOuterStringSerialize(String body); String fakeOuterStringSerialize(String body);
/**
*
* Similar to <code>fakeOuterStringSerialize</code> but it also returns the http response headers .
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/string")
@Headers({
"Content-Type: */*",
"Accept: */*",
})
HttpResponse<String> fakeOuterStringSerializeWithHttpInfo(String body);
/** /**
* *
* For this test, the body for this request much reference a schema named &#x60;File&#x60;. * For this test, the body for this request much reference a schema named &#x60;File&#x60;.
@ -99,6 +179,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testBodyWithFileSchema(FileSchemaTestClass body); void testBodyWithFileSchema(FileSchemaTestClass body);
/**
*
* Similar to <code>testBodyWithFileSchema</code> but it also returns the http response headers .
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param body (required)
*/
@RequestLine("PUT /fake/body-with-file-schema")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body);
/** /**
* *
* *
@ -112,6 +207,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testBodyWithQueryParams(@Param("query") String query, User body); void testBodyWithQueryParams(@Param("query") String query, User body);
/**
*
* Similar to <code>testBodyWithQueryParams</code> but it also returns the http response headers .
*
* @param query (required)
* @param body (required)
*/
@RequestLine("PUT /fake/body-with-query-params?query={query}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithQueryParamsWithHttpInfo(@Param("query") String query, User body);
/** /**
* *
* *
@ -135,6 +245,26 @@ public interface FakeApi extends ApiClient.Api {
void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map<String, Object> queryParams); void testBodyWithQueryParams(User body, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
*
*
* Note, this is equivalent to the other <code>testBodyWithQueryParams</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param body (required)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>query - (required)</li>
* </ul>
*/
@RequestLine("PUT /fake/body-with-query-params?query={query}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithQueryParamsWithHttpInfo(User body, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testBodyWithQueryParams</code> method in a fluent style. * <code>testBodyWithQueryParams</code> method in a fluent style.
*/ */
@ -158,6 +288,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
Client testClientModel(Client body); Client testClientModel(Client body);
/**
* To test \&quot;client\&quot; model
* Similar to <code>testClientModel</code> but it also returns the http response headers .
* To test \&quot;client\&quot; model
* @param body client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /fake")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> testClientModelWithHttpInfo(Client body);
/** /**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -183,6 +329,34 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Similar to <code>testEndpointParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("POST /fake")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> testEndpointParametersWithHttpInfo(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
@ -205,6 +379,30 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString); void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
/**
* To test enum parameters
* Similar to <code>testEnumParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
HttpResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
@ -237,6 +435,35 @@ public interface FakeApi extends ApiClient.Api {
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams); void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* To test enum parameters
* To test enum parameters
* Note, this is equivalent to the other <code>testEnumParameters</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>enumQueryStringArray - Query parameter enum test (string array) (optional)</li>
* <li>enumQueryString - Query parameter enum test (string) (optional, default to -efg)</li>
* <li>enumQueryInteger - Query parameter enum test (double) (optional)</li>
* <li>enumQueryDouble - Query parameter enum test (double) (optional)</li>
* </ul>
*/
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
HttpResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testEnumParameters</code> method in a fluent style. * <code>testEnumParameters</code> method in a fluent style.
*/ */
@ -278,6 +505,27 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
/**
* Fake endpoint to test group parameters (optional)
* Similar to <code>testGroupParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
@Headers({
"Accept: application/json",
"required_boolean_group: {requiredBooleanGroup}",
"boolean_group: {booleanGroup}"
})
HttpResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
/** /**
* Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional)
@ -307,6 +555,32 @@ public interface FakeApi extends ApiClient.Api {
void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams); void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* Note, this is equivalent to the other <code>testGroupParameters</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @param booleanGroup Boolean in group parameters (optional)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>requiredStringGroup - Required String in group parameters (required)</li>
* <li>requiredInt64Group - Required Integer in group parameters (required)</li>
* <li>stringGroup - String in group parameters (optional)</li>
* <li>int64Group - Integer in group parameters (optional)</li>
* </ul>
*/
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
@Headers({
"Accept: application/json",
"required_boolean_group: {requiredBooleanGroup}",
"boolean_group: {booleanGroup}"
})
HttpResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testGroupParameters</code> method in a fluent style. * <code>testGroupParameters</code> method in a fluent style.
*/ */
@ -341,6 +615,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testInlineAdditionalProperties(Map<String, String> param); void testInlineAdditionalProperties(Map<String, String> param);
/**
* test inline additionalProperties
* Similar to <code>testInlineAdditionalProperties</code> but it also returns the http response headers .
*
* @param param request body (required)
*/
@RequestLine("POST /fake/inline-additionalProperties")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param);
/** /**
* test json serialization of form data * test json serialization of form data
* *
@ -354,6 +643,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testJsonFormData(@Param("param") String param, @Param("param2") String param2); void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
/**
* test json serialization of form data
* Similar to <code>testJsonFormData</code> but it also returns the http response headers .
*
* @param param field1 (required)
* @param param2 field2 (required)
*/
@RequestLine("GET /fake/jsonFormData")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> testJsonFormDataWithHttpInfo(@Param("param") String param, @Param("param2") String param2);
/** /**
* *
* To test the collection format in query parameters * To test the collection format in query parameters
@ -369,6 +674,23 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context); void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context);
/**
*
* Similar to <code>testQueryParameterCollectionFormat</code> but it also returns the http response headers .
* To test the collection format in query parameters
* @param pipe (required)
* @param ioutil (required)
* @param http (required)
* @param url (required)
* @param context (required)
*/
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context);
/** /**
* *
* To test the collection format in query parameters * To test the collection format in query parameters
@ -394,6 +716,28 @@ public interface FakeApi extends ApiClient.Api {
void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map<String, Object> queryParams); void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
*
* To test the collection format in query parameters
* Note, this is equivalent to the other <code>testQueryParameterCollectionFormat</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>pipe - (required)</li>
* <li>ioutil - (required)</li>
* <li>http - (required)</li>
* <li>url - (required)</li>
* <li>context - (required)</li>
* </ul>
*/
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testQueryParameterCollectionFormat</code> method in a fluent style. * <code>testQueryParameterCollectionFormat</code> method in a fluent style.
*/ */

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -27,4 +28,20 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Client testClassname(Client body); Client testClassname(Client body);
/**
* To test class name in snake case
* Similar to <code>testClassname</code> but it also returns the http response headers .
* To test class name in snake case
* @param body client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /fake_classname_test")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> testClassnameWithHttpInfo(Client body);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import java.io.File; import java.io.File;
import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.ModelApiResponse;
@ -30,6 +31,21 @@ public interface PetApi extends ApiClient.Api {
}) })
void addPet(Pet body); void addPet(Pet body);
/**
* Add a new pet to the store
* Similar to <code>addPet</code> but it also returns the http response headers .
*
* @param body Pet object that needs to be added to the store (required)
*/
@RequestLine("POST /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> addPetWithHttpInfo(Pet body);
/** /**
* Deletes a pet * Deletes a pet
* *
@ -43,6 +59,22 @@ public interface PetApi extends ApiClient.Api {
}) })
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
/**
* Deletes a pet
* Similar to <code>deletePet</code> but it also returns the http response headers .
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
*/
@RequestLine("DELETE /pet/{petId}")
@Headers({
"Accept: application/json",
"api_key: {apiKey}"
})
HttpResponse<Void> deletePetWithHttpInfo(@Param("petId") Long petId, @Param("apiKey") String apiKey);
/** /**
* Finds Pets by status * Finds Pets by status
* Multiple status values can be provided with comma separated strings * Multiple status values can be provided with comma separated strings
@ -55,6 +87,20 @@ public interface PetApi extends ApiClient.Api {
}) })
List<Pet> findPetsByStatus(@Param("status") List<String> status); List<Pet> findPetsByStatus(@Param("status") List<String> status);
/**
* Finds Pets by status
* Similar to <code>findPetsByStatus</code> but it also returns the http response headers .
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@Headers({
"Accept: application/json",
})
HttpResponse<List<Pet>> findPetsByStatusWithHttpInfo(@Param("status") List<String> status);
/** /**
* Finds Pets by status * Finds Pets by status
* Multiple status values can be provided with comma separated strings * Multiple status values can be provided with comma separated strings
@ -77,6 +123,25 @@ public interface PetApi extends ApiClient.Api {
List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams); List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* Note, this is equivalent to the other <code>findPetsByStatus</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>status - Status values that need to be considered for filter (required)</li>
* </ul>
* @return List&lt;Pet&gt;
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@Headers({
"Accept: application/json",
})
HttpResponse<List<Pet>> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>findPetsByStatus</code> method in a fluent style. * <code>findPetsByStatus</code> method in a fluent style.
*/ */
@ -101,6 +166,22 @@ public interface PetApi extends ApiClient.Api {
}) })
Set<Pet> findPetsByTags(@Param("tags") Set<String> tags); Set<Pet> findPetsByTags(@Param("tags") Set<String> tags);
/**
* Finds Pets by tags
* Similar to <code>findPetsByTags</code> but it also returns the http response headers .
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
* @deprecated
*/
@Deprecated
@RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({
"Accept: application/json",
})
HttpResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@Param("tags") Set<String> tags);
/** /**
* Finds Pets by tags * Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@ -125,6 +206,27 @@ public interface PetApi extends ApiClient.Api {
Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams); Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* Note, this is equivalent to the other <code>findPetsByTags</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>tags - Tags to filter by (required)</li>
* </ul>
* @return Set&lt;Pet&gt;
* @deprecated
*/
@Deprecated
@RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({
"Accept: application/json",
})
HttpResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>findPetsByTags</code> method in a fluent style. * <code>findPetsByTags</code> method in a fluent style.
*/ */
@ -147,6 +249,21 @@ public interface PetApi extends ApiClient.Api {
}) })
Pet getPetById(@Param("petId") Long petId); Pet getPetById(@Param("petId") Long petId);
/**
* Find pet by ID
* Similar to <code>getPetById</code> but it also returns the http response headers .
* Returns a single pet
* @param petId ID of pet to return (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /pet/{petId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Pet> getPetByIdWithHttpInfo(@Param("petId") Long petId);
/** /**
* Update an existing pet * Update an existing pet
* *
@ -159,6 +276,21 @@ public interface PetApi extends ApiClient.Api {
}) })
void updatePet(Pet body); void updatePet(Pet body);
/**
* Update an existing pet
* Similar to <code>updatePet</code> but it also returns the http response headers .
*
* @param body Pet object that needs to be added to the store (required)
*/
@RequestLine("PUT /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> updatePetWithHttpInfo(Pet body);
/** /**
* Updates a pet in the store with form data * Updates a pet in the store with form data
* *
@ -173,6 +305,23 @@ public interface PetApi extends ApiClient.Api {
}) })
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status); void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
/**
* Updates a pet in the store with form data
* Similar to <code>updatePetWithForm</code> but it also returns the http response headers .
*
* @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)
*/
@RequestLine("POST /pet/{petId}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> updatePetWithFormWithHttpInfo(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
/** /**
* uploads an image * uploads an image
* *
@ -188,6 +337,24 @@ public interface PetApi extends ApiClient.Api {
}) })
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
/**
* uploads an image
* Similar to <code>uploadFile</code> but it also returns the http response headers .
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /pet/{petId}/uploadImage")
@Headers({
"Content-Type: multipart/form-data",
"Accept: application/json",
})
HttpResponse<ModelApiResponse> uploadFileWithHttpInfo(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
/** /**
* uploads an image (required) * uploads an image (required)
* *
@ -202,4 +369,22 @@ public interface PetApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata); ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
/**
* uploads an image (required)
* Similar to <code>uploadFileWithRequiredFile</code> but it also returns the http response headers .
*
* @param petId ID of pet to update (required)
* @param requiredFile file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
@Headers({
"Content-Type: multipart/form-data",
"Accept: application/json",
})
HttpResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Order; import org.openapitools.client.model.Order;
@ -26,6 +27,20 @@ public interface StoreApi extends ApiClient.Api {
}) })
void deleteOrder(@Param("orderId") String orderId); void deleteOrder(@Param("orderId") String orderId);
/**
* Delete purchase order by ID
* Similar to <code>deleteOrder</code> but it also returns the http response headers .
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required)
*/
@RequestLine("DELETE /store/order/{orderId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> deleteOrderWithHttpInfo(@Param("orderId") String orderId);
/** /**
* Returns pet inventories by status * Returns pet inventories by status
* Returns a map of status codes to quantities * Returns a map of status codes to quantities
@ -37,6 +52,20 @@ public interface StoreApi extends ApiClient.Api {
}) })
Map<String, Integer> getInventory(); Map<String, Integer> getInventory();
/**
* Returns pet inventories by status
* Similar to <code>getInventory</code> but it also returns the http response headers .
* Returns a map of status codes to quantities
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /store/inventory")
@Headers({
"Accept: application/json",
})
HttpResponse<Map<String, Integer>> getInventoryWithHttpInfo();
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
@ -49,6 +78,21 @@ public interface StoreApi extends ApiClient.Api {
}) })
Order getOrderById(@Param("orderId") Long orderId); Order getOrderById(@Param("orderId") Long orderId);
/**
* Find purchase order by ID
* Similar to <code>getOrderById</code> but it also returns the http response headers .
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /store/order/{orderId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Order> getOrderByIdWithHttpInfo(@Param("orderId") Long orderId);
/** /**
* Place an order for a pet * Place an order for a pet
* *
@ -61,4 +105,20 @@ public interface StoreApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Order placeOrder(Order body); Order placeOrder(Order body);
/**
* Place an order for a pet
* Similar to <code>placeOrder</code> but it also returns the http response headers .
*
* @param body order placed for purchasing the pet (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /store/order")
@Headers({
"Content-Type: */*",
"Accept: application/json",
})
HttpResponse<Order> placeOrderWithHttpInfo(Order body);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.User; import org.openapitools.client.model.User;
@ -27,6 +28,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUser(User body); void createUser(User body);
/**
* Create user
* Similar to <code>createUser</code> but it also returns the http response headers .
* This can only be done by the logged in user.
* @param body Created user object (required)
*/
@RequestLine("POST /user")
@Headers({
"Content-Type: */*",
"Accept: application/json",
})
HttpResponse<Void> createUserWithHttpInfo(User body);
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -39,6 +55,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUsersWithArrayInput(List<User> body); void createUsersWithArrayInput(List<User> body);
/**
* Creates list of users with given input array
* Similar to <code>createUsersWithArrayInput</code> but it also returns the http response headers .
*
* @param body List of user object (required)
*/
@RequestLine("POST /user/createWithArray")
@Headers({
"Content-Type: */*",
"Accept: application/json",
})
HttpResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body);
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -51,6 +82,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUsersWithListInput(List<User> body); void createUsersWithListInput(List<User> body);
/**
* Creates list of users with given input array
* Similar to <code>createUsersWithListInput</code> but it also returns the http response headers .
*
* @param body List of user object (required)
*/
@RequestLine("POST /user/createWithList")
@Headers({
"Content-Type: */*",
"Accept: application/json",
})
HttpResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body);
/** /**
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -62,6 +108,20 @@ public interface UserApi extends ApiClient.Api {
}) })
void deleteUser(@Param("username") String username); void deleteUser(@Param("username") String username);
/**
* Delete user
* Similar to <code>deleteUser</code> but it also returns the http response headers .
* This can only be done by the logged in user.
* @param username The name that needs to be deleted (required)
*/
@RequestLine("DELETE /user/{username}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> deleteUserWithHttpInfo(@Param("username") String username);
/** /**
* Get user by user name * Get user by user name
* *
@ -74,6 +134,21 @@ public interface UserApi extends ApiClient.Api {
}) })
User getUserByName(@Param("username") String username); User getUserByName(@Param("username") String username);
/**
* Get user by user name
* Similar to <code>getUserByName</code> but it also returns the http response headers .
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /user/{username}")
@Headers({
"Accept: application/json",
})
HttpResponse<User> getUserByNameWithHttpInfo(@Param("username") String username);
/** /**
* Logs user into the system * Logs user into the system
* *
@ -87,6 +162,21 @@ public interface UserApi extends ApiClient.Api {
}) })
String loginUser(@Param("username") String username, @Param("password") String password); String loginUser(@Param("username") String username, @Param("password") String password);
/**
* Logs user into the system
* Similar to <code>loginUser</code> but it also returns the http response headers .
*
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@Headers({
"Accept: application/json",
})
HttpResponse<String> loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password);
/** /**
* Logs user into the system * Logs user into the system
* *
@ -110,6 +200,26 @@ public interface UserApi extends ApiClient.Api {
String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams); String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Logs user into the system
*
* Note, this is equivalent to the other <code>loginUser</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>username - The user name for login (required)</li>
* <li>password - The password for login in clear text (required)</li>
* </ul>
* @return String
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@Headers({
"Accept: application/json",
})
HttpResponse<String> loginUserWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>loginUser</code> method in a fluent style. * <code>loginUser</code> method in a fluent style.
*/ */
@ -134,6 +244,19 @@ public interface UserApi extends ApiClient.Api {
}) })
void logoutUser(); void logoutUser();
/**
* Logs out current logged in user session
* Similar to <code>logoutUser</code> but it also returns the http response headers .
*
*/
@RequestLine("GET /user/logout")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> logoutUserWithHttpInfo();
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -146,4 +269,20 @@ public interface UserApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
void updateUser(@Param("username") String username, User body); void updateUser(@Param("username") String username, User body);
/**
* Updated user
* Similar to <code>updateUser</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("PUT /user/{username}")
@Headers({
"Content-Type: */*",
"Accept: application/json",
})
HttpResponse<Void> updateUserWithHttpInfo(@Param("username") String username, User body);
} }

View File

@ -0,0 +1,24 @@
package org.openapitools.client.model;
import java.util.Map;
import java.util.Collection;
public class HttpResponse<T>{
private Map<String, Collection<String>> headers;
private T body;
public HttpResponse(Map<String, Collection<String>> headers, T body) {
this.headers = headers;
this.body = body;
}
public T getBody(){
return body;
}
public Map<String, Collection<String>> getHeaders(){
return headers;
}
}

View File

@ -16,6 +16,7 @@ src/main/AndroidManifest.xml
src/main/java/org/openapitools/client/ApiClient.java src/main/java/org/openapitools/client/ApiClient.java
src/main/java/org/openapitools/client/CustomInstantDeserializer.java src/main/java/org/openapitools/client/CustomInstantDeserializer.java
src/main/java/org/openapitools/client/EncodingUtils.java src/main/java/org/openapitools/client/EncodingUtils.java
src/main/java/org/openapitools/client/JacksonResponseDecoder.java
src/main/java/org/openapitools/client/ParamExpander.java src/main/java/org/openapitools/client/ParamExpander.java
src/main/java/org/openapitools/client/RFC3339DateFormat.java src/main/java/org/openapitools/client/RFC3339DateFormat.java
src/main/java/org/openapitools/client/ServerConfiguration.java src/main/java/org/openapitools/client/ServerConfiguration.java
@ -59,6 +60,7 @@ src/main/java/org/openapitools/client/model/Foo.java
src/main/java/org/openapitools/client/model/FormatTest.java src/main/java/org/openapitools/client/model/FormatTest.java
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
src/main/java/org/openapitools/client/model/HealthCheckResult.java src/main/java/org/openapitools/client/model/HealthCheckResult.java
src/main/java/org/openapitools/client/model/HttpResponse.java
src/main/java/org/openapitools/client/model/InlineResponseDefault.java src/main/java/org/openapitools/client/model/InlineResponseDefault.java
src/main/java/org/openapitools/client/model/MapTest.java src/main/java/org/openapitools/client/model/MapTest.java
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java

View File

@ -23,6 +23,7 @@ import feign.slf4j.Slf4jLogger;
import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.JacksonResponseDecoder;
import org.openapitools.client.auth.ApiErrorDecoder; import org.openapitools.client.auth.ApiErrorDecoder;
import org.openapitools.client.auth.OAuth; import org.openapitools.client.auth.OAuth;
@ -49,7 +50,7 @@ public class ApiClient {
feignBuilder = Feign.builder() feignBuilder = Feign.builder()
.client(new OkHttpClient()) .client(new OkHttpClient())
.encoder(new FormEncoder(new JacksonEncoder(objectMapper))) .encoder(new FormEncoder(new JacksonEncoder(objectMapper)))
.decoder(new JacksonDecoder(objectMapper)) .decoder(new JacksonResponseDecoder(objectMapper))
.errorDecoder(new ApiErrorDecoder()) .errorDecoder(new ApiErrorDecoder())
.retryer(new Retryer.Default(0, 0, 2)) .retryer(new Retryer.Default(0, 0, 2))
.logger(new Slf4jLogger()); .logger(new Slf4jLogger());

View File

@ -0,0 +1,38 @@
package org.openapitools.client;
import com.fasterxml.jackson.databind.ObjectMapper;
import feign.Response;
import feign.Types;
import feign.jackson.JacksonDecoder;
import java.io.IOException;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import org.openapitools.client.model.HttpResponse;
public class JacksonResponseDecoder extends JacksonDecoder {
public JacksonResponseDecoder(ObjectMapper mapper) {
super(mapper);
}
@Override
public Object decode(Response response, Type type) throws IOException {
Map<String, Collection<String>> responseHeaders = Collections.unmodifiableMap(response.headers());
//Detects if the type is an instance of the parameterized class HttpResponse
Type responseBodyType;
if (Types.getRawType(type).isAssignableFrom(HttpResponse.class)) {
//The HttpResponse class has a single type parameter, the Dto class itself
responseBodyType = ((ParameterizedType) type).getActualTypeArguments()[0];
Object body = super.decode(response, responseBodyType);
return new HttpResponse(responseHeaders, body);
} else {
//The response is not encapsulated in the HttpResponse, decode the Dto as normal
return super.decode(response, type);
}
}
}

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -27,4 +28,20 @@ public interface AnotherFakeApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Client call123testSpecialTags(Client client); Client call123testSpecialTags(Client client);
/**
* To test special tags
* Similar to <code>call123testSpecialTags</code> but it also returns the http response headers .
* To test special tags and operation ID starting with number
* @param client client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /another-fake/dummy")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> call123testSpecialTagsWithHttpInfo(Client client);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.InlineResponseDefault; import org.openapitools.client.model.InlineResponseDefault;
@ -25,4 +26,18 @@ public interface DefaultApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
InlineResponseDefault fooGet(); InlineResponseDefault fooGet();
/**
*
* Similar to <code>fooGet</code> but it also returns the http response headers .
*
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /foo")
@Headers({
"Accept: application/json",
})
HttpResponse<InlineResponseDefault> fooGetWithHttpInfo();
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -36,6 +37,20 @@ public interface FakeApi extends ApiClient.Api {
}) })
HealthCheckResult fakeHealthGet(); HealthCheckResult fakeHealthGet();
/**
* Health check endpoint
* Similar to <code>fakeHealthGet</code> but it also returns the http response headers .
*
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /fake/health")
@Headers({
"Accept: application/json",
})
HttpResponse<HealthCheckResult> fakeHealthGetWithHttpInfo();
/** /**
* test http signature authentication * test http signature authentication
* *
@ -51,6 +66,23 @@ public interface FakeApi extends ApiClient.Api {
}) })
void fakeHttpSignatureTest(Pet pet, @Param("query1") String query1, @Param("header1") String header1); void fakeHttpSignatureTest(Pet pet, @Param("query1") String query1, @Param("header1") String header1);
/**
* test http signature authentication
* Similar to <code>fakeHttpSignatureTest</code> but it also returns the http response headers .
*
* @param pet Pet object that needs to be added to the store (required)
* @param query1 query parameter (optional)
* @param header1 header parameter (optional)
*/
@RequestLine("GET /fake/http-signature-test?query_1={query1}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
"header_1: {header1}"
})
HttpResponse<Void> fakeHttpSignatureTestWithHttpInfo(Pet pet, @Param("query1") String query1, @Param("header1") String header1);
/** /**
* test http signature authentication * test http signature authentication
* *
@ -76,6 +108,28 @@ public interface FakeApi extends ApiClient.Api {
void fakeHttpSignatureTest(Pet pet, @Param("header1") String header1, @QueryMap(encoded=true) Map<String, Object> queryParams); void fakeHttpSignatureTest(Pet pet, @Param("header1") String header1, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* test http signature authentication
*
* Note, this is equivalent to the other <code>fakeHttpSignatureTest</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param pet Pet object that needs to be added to the store (required)
* @param header1 header parameter (optional)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>query1 - query parameter (optional)</li>
* </ul>
*/
@RequestLine("GET /fake/http-signature-test?query_1={query1}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
"header_1: {header1}"
})
HttpResponse<Void> fakeHttpSignatureTestWithHttpInfo(Pet pet, @Param("header1") String header1, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>fakeHttpSignatureTest</code> method in a fluent style. * <code>fakeHttpSignatureTest</code> method in a fluent style.
*/ */
@ -99,6 +153,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
Boolean fakeOuterBooleanSerialize(Boolean body); Boolean fakeOuterBooleanSerialize(Boolean body);
/**
*
* Similar to <code>fakeOuterBooleanSerialize</code> but it also returns the http response headers .
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/boolean")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
HttpResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body);
/** /**
* *
* Test serialization of object with outer number type * Test serialization of object with outer number type
@ -112,6 +182,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite); OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite);
/**
*
* Similar to <code>fakeOuterCompositeSerialize</code> but it also returns the http response headers .
* Test serialization of object with outer number type
* @param outerComposite Input composite as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/composite")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
HttpResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite);
/** /**
* *
* Test serialization of outer number types * Test serialization of outer number types
@ -125,6 +211,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
BigDecimal fakeOuterNumberSerialize(BigDecimal body); BigDecimal fakeOuterNumberSerialize(BigDecimal body);
/**
*
* Similar to <code>fakeOuterNumberSerialize</code> but it also returns the http response headers .
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/number")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
HttpResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body);
/** /**
* *
* Test serialization of outer string types * Test serialization of outer string types
@ -138,6 +240,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
String fakeOuterStringSerialize(String body); String fakeOuterStringSerialize(String body);
/**
*
* Similar to <code>fakeOuterStringSerialize</code> but it also returns the http response headers .
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/outer/string")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
HttpResponse<String> fakeOuterStringSerializeWithHttpInfo(String body);
/** /**
* *
* Test serialization of enum (int) properties with examples * Test serialization of enum (int) properties with examples
@ -151,6 +269,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty); OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty);
/**
*
* Similar to <code>fakePropertyEnumIntegerSerialize</code> but it also returns the http response headers .
* Test serialization of enum (int) properties with examples
* @param outerObjectWithEnumProperty Input enum (int) as post body (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/property/enum-int")
@Headers({
"Content-Type: application/json",
"Accept: */*",
})
HttpResponse<OuterObjectWithEnumProperty> fakePropertyEnumIntegerSerializeWithHttpInfo(OuterObjectWithEnumProperty outerObjectWithEnumProperty);
/** /**
* *
* For this test, the body has to be a binary file. * For this test, the body has to be a binary file.
@ -163,6 +297,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testBodyWithBinary(File body); void testBodyWithBinary(File body);
/**
*
* Similar to <code>testBodyWithBinary</code> but it also returns the http response headers .
* For this test, the body has to be a binary file.
* @param body image to upload (required)
*/
@RequestLine("PUT /fake/body-with-binary")
@Headers({
"Content-Type: image/png",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithBinaryWithHttpInfo(File body);
/** /**
* *
* For this test, the body for this request must reference a schema named &#x60;File&#x60;. * For this test, the body for this request must reference a schema named &#x60;File&#x60;.
@ -175,6 +324,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass); void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
/**
*
* Similar to <code>testBodyWithFileSchema</code> but it also returns the http response headers .
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
* @param fileSchemaTestClass (required)
*/
@RequestLine("PUT /fake/body-with-file-schema")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass);
/** /**
* *
* *
@ -188,6 +352,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testBodyWithQueryParams(@Param("query") String query, User user); void testBodyWithQueryParams(@Param("query") String query, User user);
/**
*
* Similar to <code>testBodyWithQueryParams</code> but it also returns the http response headers .
*
* @param query (required)
* @param user (required)
*/
@RequestLine("PUT /fake/body-with-query-params?query={query}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithQueryParamsWithHttpInfo(@Param("query") String query, User user);
/** /**
* *
* *
@ -211,6 +390,26 @@ public interface FakeApi extends ApiClient.Api {
void testBodyWithQueryParams(User user, @QueryMap(encoded=true) Map<String, Object> queryParams); void testBodyWithQueryParams(User user, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
*
*
* Note, this is equivalent to the other <code>testBodyWithQueryParams</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param user (required)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>query - (required)</li>
* </ul>
*/
@RequestLine("PUT /fake/body-with-query-params?query={query}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testBodyWithQueryParamsWithHttpInfo(User user, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testBodyWithQueryParams</code> method in a fluent style. * <code>testBodyWithQueryParams</code> method in a fluent style.
*/ */
@ -234,6 +433,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
Client testClientModel(Client client); Client testClientModel(Client client);
/**
* To test \&quot;client\&quot; model
* Similar to <code>testClientModel</code> but it also returns the http response headers .
* To test \&quot;client\&quot; model
* @param client client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /fake")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> testClientModelWithHttpInfo(Client client);
/** /**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -259,6 +474,34 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback); void testEndpointParameters(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Similar to <code>testEndpointParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("POST /fake")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> testEndpointParametersWithHttpInfo(@Param("number") BigDecimal number, @Param("_double") Double _double, @Param("patternWithoutDelimiter") String patternWithoutDelimiter, @Param("_byte") byte[] _byte, @Param("integer") Integer integer, @Param("int32") Integer int32, @Param("int64") Long int64, @Param("_float") Float _float, @Param("string") String string, @Param("binary") File binary, @Param("date") LocalDate date, @Param("dateTime") OffsetDateTime dateTime, @Param("password") String password, @Param("paramCallback") String paramCallback);
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
@ -281,6 +524,30 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString); void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
/**
* To test enum parameters
* Similar to <code>testEnumParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
HttpResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumQueryStringArray") List<String> enumQueryStringArray, @Param("enumQueryString") String enumQueryString, @Param("enumQueryInteger") Integer enumQueryInteger, @Param("enumQueryDouble") Double enumQueryDouble, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString);
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
@ -313,6 +580,35 @@ public interface FakeApi extends ApiClient.Api {
void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams); void testEnumParameters(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* To test enum parameters
* To test enum parameters
* Note, this is equivalent to the other <code>testEnumParameters</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param enumHeaderStringArray Header parameter enum test (string array) (optional)
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumFormStringArray Form parameter enum test (string array) (optional)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>enumQueryStringArray - Query parameter enum test (string array) (optional)</li>
* <li>enumQueryString - Query parameter enum test (string) (optional, default to -efg)</li>
* <li>enumQueryInteger - Query parameter enum test (double) (optional)</li>
* <li>enumQueryDouble - Query parameter enum test (double) (optional)</li>
* </ul>
*/
@RequestLine("GET /fake?enum_query_string_array={enumQueryStringArray}&enum_query_string={enumQueryString}&enum_query_integer={enumQueryInteger}&enum_query_double={enumQueryDouble}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
"enum_header_string_array: {enumHeaderStringArray}",
"enum_header_string: {enumHeaderString}"
})
HttpResponse<Void> testEnumParametersWithHttpInfo(@Param("enumHeaderStringArray") List<String> enumHeaderStringArray, @Param("enumHeaderString") String enumHeaderString, @Param("enumFormStringArray") List<String> enumFormStringArray, @Param("enumFormString") String enumFormString, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testEnumParameters</code> method in a fluent style. * <code>testEnumParameters</code> method in a fluent style.
*/ */
@ -354,6 +650,27 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group); void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
/**
* Fake endpoint to test group parameters (optional)
* Similar to <code>testGroupParameters</code> but it also returns the http response headers .
* 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)
*/
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
@Headers({
"Accept: application/json",
"required_boolean_group: {requiredBooleanGroup}",
"boolean_group: {booleanGroup}"
})
HttpResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
/** /**
* Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional) * Fake endpoint to test group parameters (optional)
@ -383,6 +700,32 @@ public interface FakeApi extends ApiClient.Api {
void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams); void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* Note, this is equivalent to the other <code>testGroupParameters</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @param booleanGroup Boolean in group parameters (optional)
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>requiredStringGroup - Required String in group parameters (required)</li>
* <li>requiredInt64Group - Required Integer in group parameters (required)</li>
* <li>stringGroup - String in group parameters (optional)</li>
* <li>int64Group - Integer in group parameters (optional)</li>
* </ul>
*/
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
@Headers({
"Accept: application/json",
"required_boolean_group: {requiredBooleanGroup}",
"boolean_group: {booleanGroup}"
})
HttpResponse<Void> testGroupParametersWithHttpInfo(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testGroupParameters</code> method in a fluent style. * <code>testGroupParameters</code> method in a fluent style.
*/ */
@ -417,6 +760,21 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testInlineAdditionalProperties(Map<String, String> requestBody); void testInlineAdditionalProperties(Map<String, String> requestBody);
/**
* test inline additionalProperties
* Similar to <code>testInlineAdditionalProperties</code> but it also returns the http response headers .
*
* @param requestBody request body (required)
*/
@RequestLine("POST /fake/inline-additionalProperties")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> requestBody);
/** /**
* test json serialization of form data * test json serialization of form data
* *
@ -430,6 +788,22 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testJsonFormData(@Param("param") String param, @Param("param2") String param2); void testJsonFormData(@Param("param") String param, @Param("param2") String param2);
/**
* test json serialization of form data
* Similar to <code>testJsonFormData</code> but it also returns the http response headers .
*
* @param param field1 (required)
* @param param2 field2 (required)
*/
@RequestLine("GET /fake/jsonFormData")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> testJsonFormDataWithHttpInfo(@Param("param") String param, @Param("param2") String param2);
/** /**
* *
* To test the collection format in query parameters * To test the collection format in query parameters
@ -447,6 +821,25 @@ public interface FakeApi extends ApiClient.Api {
}) })
void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context, @Param("allowEmpty") String allowEmpty, @Param("language") Map<String, String> language); void testQueryParameterCollectionFormat(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context, @Param("allowEmpty") String allowEmpty, @Param("language") Map<String, String> language);
/**
*
* Similar to <code>testQueryParameterCollectionFormat</code> but it also returns the http response headers .
* To test the collection format in query parameters
* @param pipe (required)
* @param ioutil (required)
* @param http (required)
* @param url (required)
* @param context (required)
* @param allowEmpty (required)
* @param language (optional)
*/
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}&language={language}&allowEmpty={allowEmpty}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@Param("pipe") List<String> pipe, @Param("ioutil") List<String> ioutil, @Param("http") List<String> http, @Param("url") List<String> url, @Param("context") List<String> context, @Param("allowEmpty") String allowEmpty, @Param("language") Map<String, String> language);
/** /**
* *
* To test the collection format in query parameters * To test the collection format in query parameters
@ -474,6 +867,30 @@ public interface FakeApi extends ApiClient.Api {
void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map<String, Object> queryParams); void testQueryParameterCollectionFormat(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
*
* To test the collection format in query parameters
* Note, this is equivalent to the other <code>testQueryParameterCollectionFormat</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>pipe - (required)</li>
* <li>ioutil - (required)</li>
* <li>http - (required)</li>
* <li>url - (required)</li>
* <li>context - (required)</li>
* <li>language - (optional)</li>
* <li>allowEmpty - (required)</li>
* </ul>
*/
@RequestLine("PUT /fake/test-query-parameters?pipe={pipe}&ioutil={ioutil}&http={http}&url={url}&context={context}&language={language}&allowEmpty={allowEmpty}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>testQueryParameterCollectionFormat</code> method in a fluent style. * <code>testQueryParameterCollectionFormat</code> method in a fluent style.
*/ */

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Client; import org.openapitools.client.model.Client;
@ -27,4 +28,20 @@ public interface FakeClassnameTags123Api extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Client testClassname(Client client); Client testClassname(Client client);
/**
* To test class name in snake case
* Similar to <code>testClassname</code> but it also returns the http response headers .
* To test class name in snake case
* @param client client model (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("PATCH /fake_classname_test")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Client> testClassnameWithHttpInfo(Client client);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import java.io.File; import java.io.File;
import org.openapitools.client.model.ModelApiResponse; import org.openapitools.client.model.ModelApiResponse;
@ -30,6 +31,21 @@ public interface PetApi extends ApiClient.Api {
}) })
void addPet(Pet pet); void addPet(Pet pet);
/**
* Add a new pet to the store
* Similar to <code>addPet</code> but it also returns the http response headers .
*
* @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("POST /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> addPetWithHttpInfo(Pet pet);
/** /**
* Deletes a pet * Deletes a pet
* *
@ -43,6 +59,22 @@ public interface PetApi extends ApiClient.Api {
}) })
void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey); void deletePet(@Param("petId") Long petId, @Param("apiKey") String apiKey);
/**
* Deletes a pet
* Similar to <code>deletePet</code> but it also returns the http response headers .
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
*/
@RequestLine("DELETE /pet/{petId}")
@Headers({
"Accept: application/json",
"api_key: {apiKey}"
})
HttpResponse<Void> deletePetWithHttpInfo(@Param("petId") Long petId, @Param("apiKey") String apiKey);
/** /**
* Finds Pets by status * Finds Pets by status
* Multiple status values can be provided with comma separated strings * Multiple status values can be provided with comma separated strings
@ -55,6 +87,20 @@ public interface PetApi extends ApiClient.Api {
}) })
List<Pet> findPetsByStatus(@Param("status") List<String> status); List<Pet> findPetsByStatus(@Param("status") List<String> status);
/**
* Finds Pets by status
* Similar to <code>findPetsByStatus</code> but it also returns the http response headers .
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@Headers({
"Accept: application/json",
})
HttpResponse<List<Pet>> findPetsByStatusWithHttpInfo(@Param("status") List<String> status);
/** /**
* Finds Pets by status * Finds Pets by status
* Multiple status values can be provided with comma separated strings * Multiple status values can be provided with comma separated strings
@ -77,6 +123,25 @@ public interface PetApi extends ApiClient.Api {
List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams); List<Pet> findPetsByStatus(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* Note, this is equivalent to the other <code>findPetsByStatus</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>status - Status values that need to be considered for filter (required)</li>
* </ul>
* @return List&lt;Pet&gt;
*/
@RequestLine("GET /pet/findByStatus?status={status}")
@Headers({
"Accept: application/json",
})
HttpResponse<List<Pet>> findPetsByStatusWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>findPetsByStatus</code> method in a fluent style. * <code>findPetsByStatus</code> method in a fluent style.
*/ */
@ -101,6 +166,22 @@ public interface PetApi extends ApiClient.Api {
}) })
Set<Pet> findPetsByTags(@Param("tags") Set<String> tags); Set<Pet> findPetsByTags(@Param("tags") Set<String> tags);
/**
* Finds Pets by tags
* Similar to <code>findPetsByTags</code> but it also returns the http response headers .
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
* @deprecated
*/
@Deprecated
@RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({
"Accept: application/json",
})
HttpResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@Param("tags") Set<String> tags);
/** /**
* Finds Pets by tags * Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
@ -125,6 +206,27 @@ public interface PetApi extends ApiClient.Api {
Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams); Set<Pet> findPetsByTags(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* Note, this is equivalent to the other <code>findPetsByTags</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>tags - Tags to filter by (required)</li>
* </ul>
* @return Set&lt;Pet&gt;
* @deprecated
*/
@Deprecated
@RequestLine("GET /pet/findByTags?tags={tags}")
@Headers({
"Accept: application/json",
})
HttpResponse<Set<Pet>> findPetsByTagsWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>findPetsByTags</code> method in a fluent style. * <code>findPetsByTags</code> method in a fluent style.
*/ */
@ -147,6 +249,21 @@ public interface PetApi extends ApiClient.Api {
}) })
Pet getPetById(@Param("petId") Long petId); Pet getPetById(@Param("petId") Long petId);
/**
* Find pet by ID
* Similar to <code>getPetById</code> but it also returns the http response headers .
* Returns a single pet
* @param petId ID of pet to return (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /pet/{petId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Pet> getPetByIdWithHttpInfo(@Param("petId") Long petId);
/** /**
* Update an existing pet * Update an existing pet
* *
@ -159,6 +276,21 @@ public interface PetApi extends ApiClient.Api {
}) })
void updatePet(Pet pet); void updatePet(Pet pet);
/**
* Update an existing pet
* Similar to <code>updatePet</code> but it also returns the http response headers .
*
* @param pet Pet object that needs to be added to the store (required)
*/
@RequestLine("PUT /pet")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> updatePetWithHttpInfo(Pet pet);
/** /**
* Updates a pet in the store with form data * Updates a pet in the store with form data
* *
@ -173,6 +305,23 @@ public interface PetApi extends ApiClient.Api {
}) })
void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status); void updatePetWithForm(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
/**
* Updates a pet in the store with form data
* Similar to <code>updatePetWithForm</code> but it also returns the http response headers .
*
* @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)
*/
@RequestLine("POST /pet/{petId}")
@Headers({
"Content-Type: application/x-www-form-urlencoded",
"Accept: application/json",
})
HttpResponse<Void> updatePetWithFormWithHttpInfo(@Param("petId") Long petId, @Param("name") String name, @Param("status") String status);
/** /**
* uploads an image * uploads an image
* *
@ -188,6 +337,24 @@ public interface PetApi extends ApiClient.Api {
}) })
ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
/**
* uploads an image
* Similar to <code>uploadFile</code> but it also returns the http response headers .
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /pet/{petId}/uploadImage")
@Headers({
"Content-Type: multipart/form-data",
"Accept: application/json",
})
HttpResponse<ModelApiResponse> uploadFileWithHttpInfo(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
/** /**
* uploads an image (required) * uploads an image (required)
* *
@ -202,4 +369,22 @@ public interface PetApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata); ModelApiResponse uploadFileWithRequiredFile(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
/**
* uploads an image (required)
* Similar to <code>uploadFileWithRequiredFile</code> but it also returns the http response headers .
*
* @param petId ID of pet to update (required)
* @param requiredFile file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /fake/{petId}/uploadImageWithRequiredFile")
@Headers({
"Content-Type: multipart/form-data",
"Accept: application/json",
})
HttpResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(@Param("petId") Long petId, @Param("requiredFile") File requiredFile, @Param("additionalMetadata") String additionalMetadata);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.Order; import org.openapitools.client.model.Order;
@ -26,6 +27,20 @@ public interface StoreApi extends ApiClient.Api {
}) })
void deleteOrder(@Param("orderId") String orderId); void deleteOrder(@Param("orderId") String orderId);
/**
* Delete purchase order by ID
* Similar to <code>deleteOrder</code> but it also returns the http response headers .
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required)
*/
@RequestLine("DELETE /store/order/{orderId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> deleteOrderWithHttpInfo(@Param("orderId") String orderId);
/** /**
* Returns pet inventories by status * Returns pet inventories by status
* Returns a map of status codes to quantities * Returns a map of status codes to quantities
@ -37,6 +52,20 @@ public interface StoreApi extends ApiClient.Api {
}) })
Map<String, Integer> getInventory(); Map<String, Integer> getInventory();
/**
* Returns pet inventories by status
* Similar to <code>getInventory</code> but it also returns the http response headers .
* Returns a map of status codes to quantities
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /store/inventory")
@Headers({
"Accept: application/json",
})
HttpResponse<Map<String, Integer>> getInventoryWithHttpInfo();
/** /**
* Find purchase order by ID * Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
@ -49,6 +78,21 @@ public interface StoreApi extends ApiClient.Api {
}) })
Order getOrderById(@Param("orderId") Long orderId); Order getOrderById(@Param("orderId") Long orderId);
/**
* Find purchase order by ID
* Similar to <code>getOrderById</code> but it also returns the http response headers .
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /store/order/{orderId}")
@Headers({
"Accept: application/json",
})
HttpResponse<Order> getOrderByIdWithHttpInfo(@Param("orderId") Long orderId);
/** /**
* Place an order for a pet * Place an order for a pet
* *
@ -61,4 +105,20 @@ public interface StoreApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
Order placeOrder(Order order); Order placeOrder(Order order);
/**
* Place an order for a pet
* Similar to <code>placeOrder</code> but it also returns the http response headers .
*
* @param order order placed for purchasing the pet (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("POST /store/order")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Order> placeOrderWithHttpInfo(Order order);
} }

View File

@ -2,6 +2,7 @@ package org.openapitools.client.api;
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.EncodingUtils; import org.openapitools.client.EncodingUtils;
import org.openapitools.client.model.HttpResponse;
import org.openapitools.client.model.User; import org.openapitools.client.model.User;
@ -27,6 +28,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUser(User user); void createUser(User user);
/**
* Create user
* Similar to <code>createUser</code> but it also returns the http response headers .
* This can only be done by the logged in user.
* @param user Created user object (required)
*/
@RequestLine("POST /user")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> createUserWithHttpInfo(User user);
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -39,6 +55,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUsersWithArrayInput(List<User> user); void createUsersWithArrayInput(List<User> user);
/**
* Creates list of users with given input array
* Similar to <code>createUsersWithArrayInput</code> but it also returns the http response headers .
*
* @param user List of user object (required)
*/
@RequestLine("POST /user/createWithArray")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user);
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -51,6 +82,21 @@ public interface UserApi extends ApiClient.Api {
}) })
void createUsersWithListInput(List<User> user); void createUsersWithListInput(List<User> user);
/**
* Creates list of users with given input array
* Similar to <code>createUsersWithListInput</code> but it also returns the http response headers .
*
* @param user List of user object (required)
*/
@RequestLine("POST /user/createWithList")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user);
/** /**
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -62,6 +108,20 @@ public interface UserApi extends ApiClient.Api {
}) })
void deleteUser(@Param("username") String username); void deleteUser(@Param("username") String username);
/**
* Delete user
* Similar to <code>deleteUser</code> but it also returns the http response headers .
* This can only be done by the logged in user.
* @param username The name that needs to be deleted (required)
*/
@RequestLine("DELETE /user/{username}")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> deleteUserWithHttpInfo(@Param("username") String username);
/** /**
* Get user by user name * Get user by user name
* *
@ -74,6 +134,21 @@ public interface UserApi extends ApiClient.Api {
}) })
User getUserByName(@Param("username") String username); User getUserByName(@Param("username") String username);
/**
* Get user by user name
* Similar to <code>getUserByName</code> but it also returns the http response headers .
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /user/{username}")
@Headers({
"Accept: application/json",
})
HttpResponse<User> getUserByNameWithHttpInfo(@Param("username") String username);
/** /**
* Logs user into the system * Logs user into the system
* *
@ -87,6 +162,21 @@ public interface UserApi extends ApiClient.Api {
}) })
String loginUser(@Param("username") String username, @Param("password") String password); String loginUser(@Param("username") String username, @Param("password") String password);
/**
* Logs user into the system
* Similar to <code>loginUser</code> but it also returns the http response headers .
*
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return A HttpResponse that wraps the response boyd and the http headers.
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@Headers({
"Accept: application/json",
})
HttpResponse<String> loginUserWithHttpInfo(@Param("username") String username, @Param("password") String password);
/** /**
* Logs user into the system * Logs user into the system
* *
@ -110,6 +200,26 @@ public interface UserApi extends ApiClient.Api {
String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams); String loginUser(@QueryMap(encoded=true) Map<String, Object> queryParams);
/** /**
* Logs user into the system
*
* Note, this is equivalent to the other <code>loginUser</code> that receives the query parameters as a map,
* but this one also exposes the Http response headers
* @param queryParams Map of query parameters as name-value pairs
* <p>The following elements may be specified in the query map:</p>
* <ul>
* <li>username - The user name for login (required)</li>
* <li>password - The password for login in clear text (required)</li>
* </ul>
* @return String
*/
@RequestLine("GET /user/login?username={username}&password={password}")
@Headers({
"Accept: application/json",
})
HttpResponse<String> loginUserWithHttpInfo(@QueryMap(encoded=true) Map<String, Object> queryParams);
/**
* A convenience class for generating query parameters for the * A convenience class for generating query parameters for the
* <code>loginUser</code> method in a fluent style. * <code>loginUser</code> method in a fluent style.
*/ */
@ -134,6 +244,19 @@ public interface UserApi extends ApiClient.Api {
}) })
void logoutUser(); void logoutUser();
/**
* Logs out current logged in user session
* Similar to <code>logoutUser</code> but it also returns the http response headers .
*
*/
@RequestLine("GET /user/logout")
@Headers({
"Accept: application/json",
})
HttpResponse<Void> logoutUserWithHttpInfo();
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -146,4 +269,20 @@ public interface UserApi extends ApiClient.Api {
"Accept: application/json", "Accept: application/json",
}) })
void updateUser(@Param("username") String username, User user); void updateUser(@Param("username") String username, User user);
/**
* Updated user
* Similar to <code>updateUser</code> but it also returns the http response headers .
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param user Updated user object (required)
*/
@RequestLine("PUT /user/{username}")
@Headers({
"Content-Type: application/json",
"Accept: application/json",
})
HttpResponse<Void> updateUserWithHttpInfo(@Param("username") String username, User user);
} }

View File

@ -0,0 +1,24 @@
package org.openapitools.client.model;
import java.util.Map;
import java.util.Collection;
public class HttpResponse<T>{
private Map<String, Collection<String>> headers;
private T body;
public HttpResponse(Map<String, Collection<String>> headers, T body) {
this.headers = headers;
this.body = body;
}
public T getBody(){
return body;
}
public Map<String, Collection<String>> getHeaders(){
return headers;
}
}