Allow Java apache-httpclient users to supply additional HTTP headers per call, updated (#14929)

* Allow Java apache-httpclient users to supply additional HTTP headers per API call

* fix 'unexpected return value' problem

* make "fullJavaUtil" work

* Revert 'make "fullJavaUtil" work'

This reverts commit 60c8846.

---------

Co-authored-by: Jigar Joshi <jigarjm@gmail.com>
This commit is contained in:
martin-mfg 2023-03-14 19:20:31 +01:00 committed by GitHub
parent b172f622b9
commit f1d05fc7f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 948 additions and 0 deletions

View File

@ -15,6 +15,7 @@ import {{invokerPackage}}.Pair;
{{^fullJavaUtil}} {{^fullJavaUtil}}
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -24,6 +25,8 @@ import java.util.StringJoiner;
{{>generatedAnnotation}} {{>generatedAnnotation}}
{{#operations}} {{#operations}}
public class {{classname}} { public class {{classname}} {
private ApiClient apiClient; private ApiClient apiClient;
public {{classname}}() { public {{classname}}() {
@ -65,6 +68,33 @@ public class {{classname}} {
@Deprecated @Deprecated
{{/isDeprecated}} {{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException { public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
{{#returnType}}return {{/returnType}}this.{{operationId}}({{#allParams}}{{paramName}}, {{/allParams}}Collections.emptyMap());
}
/**
* {{summary}}
* {{notes}}
{{#allParams}}
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/isContainer}}{{/required}}
{{/allParams}}
* @param additionalHeaders additionalHeaders for this call
{{#returnType}}
* @return {{returnType}}
{{/returnType}}
* @throws ApiException if fails to make API call
{{#isDeprecated}}
* @deprecated
{{/isDeprecated}}
{{#externalDocs}}
* {{description}}
* @see <a href="{{url}}">{{summary}} Documentation</a>
{{/externalDocs}}
*/
{{#isDeprecated}}
@Deprecated
{{/isDeprecated}}
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
{{#allParams}}{{#required}} {{#allParams}}{{#required}}
// verify the required parameter '{{paramName}}' is set // verify the required parameter '{{paramName}}' is set
@ -126,6 +156,8 @@ public class {{classname}} {
localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
{{/headerParams}} {{/headerParams}}
localVarHeaderParams.putAll(additionalHeaders);
{{#cookieParams}}if ({{paramName}} != null) {{#cookieParams}}if ({{paramName}} != null)
localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}})); localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
{{/cookieParams}} {{/cookieParams}}
@ -168,6 +200,7 @@ public class {{classname}} {
{{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}} {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}
); );
} }
{{/operation}} {{/operation}}
} }
{{/operations}} {{/operations}}

View File

@ -24,6 +24,7 @@ import org.openapitools.client.model.Pet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,6 +32,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BodyApi { public class BodyApi {
private ApiClient apiClient; private ApiClient apiClient;
public BodyApi() { public BodyApi() {
@ -57,6 +60,19 @@ public class BodyApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Pet testEchoBodyPet(Pet pet) throws ApiException { public Pet testEchoBodyPet(Pet pet) throws ApiException {
return this.testEchoBodyPet(pet, Collections.emptyMap());
}
/**
* Test body parameter(s)
* Test body parameter(s)
* @param pet Pet object that needs to be added to the store (optional)
* @param additionalHeaders additionalHeaders for this call
* @return Pet
* @throws ApiException if fails to make API call
*/
public Pet testEchoBodyPet(Pet pet, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = pet; Object localVarPostBody = pet;
// create path and map variables // create path and map variables
@ -71,6 +87,8 @@ public class BodyApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -102,6 +120,7 @@ public class BodyApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test empty response body * Test empty response body
* Test empty response body * Test empty response body
@ -110,6 +129,19 @@ public class BodyApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testEchoBodyPetResponseString(Pet pet) throws ApiException { public String testEchoBodyPetResponseString(Pet pet) throws ApiException {
return this.testEchoBodyPetResponseString(pet, Collections.emptyMap());
}
/**
* Test empty response body
* Test empty response body
* @param pet Pet object that needs to be added to the store (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testEchoBodyPetResponseString(Pet pet, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = pet; Object localVarPostBody = pet;
// create path and map variables // create path and map variables
@ -124,6 +156,8 @@ public class BodyApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -155,4 +189,5 @@ public class BodyApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -23,6 +23,7 @@ import org.openapitools.client.Pair;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -30,6 +31,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FormApi { public class FormApi {
private ApiClient apiClient; private ApiClient apiClient;
public FormApi() { public FormApi() {
@ -58,6 +61,21 @@ public class FormApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws ApiException { public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws ApiException {
return this.testFormIntegerBooleanString(integerForm, booleanForm, stringForm, Collections.emptyMap());
}
/**
* Test form parameter(s)
* Test form parameter(s)
* @param integerForm (optional)
* @param booleanForm (optional)
* @param stringForm (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -72,6 +90,8 @@ public class FormApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (integerForm != null) if (integerForm != null)
localVarFormParams.put("integer_form", integerForm); localVarFormParams.put("integer_form", integerForm);
@ -109,4 +129,5 @@ if (stringForm != null)
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -23,6 +23,7 @@ import org.openapitools.client.Pair;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -30,6 +31,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HeaderApi { public class HeaderApi {
private ApiClient apiClient; private ApiClient apiClient;
public HeaderApi() { public HeaderApi() {
@ -58,6 +61,21 @@ public class HeaderApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testHeaderIntegerBooleanString(Integer integerHeader, Boolean booleanHeader, String stringHeader) throws ApiException { public String testHeaderIntegerBooleanString(Integer integerHeader, Boolean booleanHeader, String stringHeader) throws ApiException {
return this.testHeaderIntegerBooleanString(integerHeader, booleanHeader, stringHeader, Collections.emptyMap());
}
/**
* Test header parameter(s)
* Test header parameter(s)
* @param integerHeader (optional)
* @param booleanHeader (optional)
* @param stringHeader (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testHeaderIntegerBooleanString(Integer integerHeader, Boolean booleanHeader, String stringHeader, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -78,6 +96,8 @@ if (booleanHeader != null)
if (stringHeader != null) if (stringHeader != null)
localVarHeaderParams.put("string_header", apiClient.parameterToString(stringHeader)); localVarHeaderParams.put("string_header", apiClient.parameterToString(stringHeader));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -109,4 +129,5 @@ if (stringHeader != null)
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -23,6 +23,7 @@ import org.openapitools.client.Pair;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -30,6 +31,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PathApi { public class PathApi {
private ApiClient apiClient; private ApiClient apiClient;
public PathApi() { public PathApi() {
@ -57,6 +60,20 @@ public class PathApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testsPathStringPathStringIntegerPathInteger(String pathString, Integer pathInteger) throws ApiException { public String testsPathStringPathStringIntegerPathInteger(String pathString, Integer pathInteger) throws ApiException {
return this.testsPathStringPathStringIntegerPathInteger(pathString, pathInteger, Collections.emptyMap());
}
/**
* Test path parameter(s)
* Test path parameter(s)
* @param pathString (required)
* @param pathInteger (required)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testsPathStringPathStringIntegerPathInteger(String pathString, Integer pathInteger, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'pathString' is set // verify the required parameter 'pathString' is set
@ -83,6 +100,8 @@ public class PathApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -114,4 +133,5 @@ public class PathApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -29,6 +29,7 @@ import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQue
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -36,6 +37,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class QueryApi { public class QueryApi {
private ApiClient apiClient; private ApiClient apiClient;
public QueryApi() { public QueryApi() {
@ -64,6 +67,21 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws ApiException { public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws ApiException {
return this.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param datetimeQuery (optional)
* @param dateQuery (optional)
* @param stringQuery (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -81,6 +99,8 @@ public class QueryApi {
localVarQueryParams.addAll(apiClient.parameterToPair("date_query", dateQuery)); localVarQueryParams.addAll(apiClient.parameterToPair("date_query", dateQuery));
localVarQueryParams.addAll(apiClient.parameterToPair("string_query", stringQuery)); localVarQueryParams.addAll(apiClient.parameterToPair("string_query", stringQuery));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -112,6 +132,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -122,6 +143,21 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException { public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws ApiException {
return this.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param integerQuery (optional)
* @param booleanQuery (optional)
* @param stringQuery (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -139,6 +175,8 @@ public class QueryApi {
localVarQueryParams.addAll(apiClient.parameterToPair("boolean_query", booleanQuery)); localVarQueryParams.addAll(apiClient.parameterToPair("boolean_query", booleanQuery));
localVarQueryParams.addAll(apiClient.parameterToPair("string_query", stringQuery)); localVarQueryParams.addAll(apiClient.parameterToPair("string_query", stringQuery));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -170,6 +208,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -178,6 +217,19 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws ApiException { public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws ApiException {
return this.testQueryStyleDeepObjectExplodeTrueObject(queryObject, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param queryObject (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -194,6 +246,8 @@ public class QueryApi {
localVarQueryParameterBaseName = "query_object"; localVarQueryParameterBaseName = "query_object";
localVarQueryStringJoiner.add(queryObject.toUrlQueryString("query_object")); localVarQueryStringJoiner.add(queryObject.toUrlQueryString("query_object"));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -225,6 +279,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -233,6 +288,19 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException { public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
return this.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param queryObject (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -249,6 +317,8 @@ public class QueryApi {
localVarQueryParameterBaseName = "query_object"; localVarQueryParameterBaseName = "query_object";
localVarQueryStringJoiner.add(queryObject.toUrlQueryString("query_object")); localVarQueryStringJoiner.add(queryObject.toUrlQueryString("query_object"));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -280,6 +350,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -288,6 +359,19 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException { public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws ApiException {
return this.testQueryStyleFormExplodeTrueArrayString(queryObject, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param queryObject (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -303,6 +387,8 @@ public class QueryApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "values", queryObject.getValues())); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "values", queryObject.getValues()));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -334,6 +420,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -342,6 +429,19 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws ApiException { public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws ApiException {
return this.testQueryStyleFormExplodeTrueObject(queryObject, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param queryObject (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryStyleFormExplodeTrueObject(Pet queryObject, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -362,6 +462,8 @@ public class QueryApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", queryObject.getTags())); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", queryObject.getTags()));
localVarQueryParams.addAll(apiClient.parameterToPair("status", queryObject.getStatus())); localVarQueryParams.addAll(apiClient.parameterToPair("status", queryObject.getStatus()));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -393,6 +495,7 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Test query parameter(s) * Test query parameter(s)
* Test query parameter(s) * Test query parameter(s)
@ -401,6 +504,19 @@ public class QueryApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws ApiException { public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws ApiException {
return this.testQueryStyleFormExplodeTrueObjectAllOf(queryObject, Collections.emptyMap());
}
/**
* Test query parameter(s)
* Test query parameter(s)
* @param queryObject (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -416,6 +532,8 @@ public class QueryApi {
localVarQueryStringJoiner.add(queryObject.toUrlQueryString()); localVarQueryStringJoiner.add(queryObject.toUrlQueryString());
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -447,4 +565,5 @@ public class QueryApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -24,6 +24,7 @@ import org.openapitools.client.model.Client;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,6 +32,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AnotherFakeApi { public class AnotherFakeApi {
private ApiClient apiClient; private ApiClient apiClient;
public AnotherFakeApi() { public AnotherFakeApi() {
@ -57,6 +60,19 @@ public class AnotherFakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client call123testSpecialTags(Client client) throws ApiException { public Client call123testSpecialTags(Client client) throws ApiException {
return this.call123testSpecialTags(client, Collections.emptyMap());
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* @param client client model (required)
* @param additionalHeaders additionalHeaders for this call
* @return Client
* @throws ApiException if fails to make API call
*/
public Client call123testSpecialTags(Client client, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = client; Object localVarPostBody = client;
// verify the required parameter 'client' is set // verify the required parameter 'client' is set
@ -76,6 +92,8 @@ public class AnotherFakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -107,4 +125,5 @@ public class AnotherFakeApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -24,6 +24,7 @@ import org.openapitools.client.model.FooGetDefaultResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,6 +32,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DefaultApi { public class DefaultApi {
private ApiClient apiClient; private ApiClient apiClient;
public DefaultApi() { public DefaultApi() {
@ -56,6 +59,18 @@ public class DefaultApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public FooGetDefaultResponse fooGet() throws ApiException { public FooGetDefaultResponse fooGet() throws ApiException {
return this.fooGet(Collections.emptyMap());
}
/**
*
*
* @param additionalHeaders additionalHeaders for this call
* @return FooGetDefaultResponse
* @throws ApiException if fails to make API call
*/
public FooGetDefaultResponse fooGet(Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -70,6 +85,8 @@ public class DefaultApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -101,4 +118,5 @@ public class DefaultApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -35,6 +35,7 @@ import org.openapitools.client.model.User;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -42,6 +43,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FakeApi { public class FakeApi {
private ApiClient apiClient; private ApiClient apiClient;
public FakeApi() { public FakeApi() {
@ -67,6 +70,18 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public HealthCheckResult fakeHealthGet() throws ApiException { public HealthCheckResult fakeHealthGet() throws ApiException {
return this.fakeHealthGet(Collections.emptyMap());
}
/**
* Health check endpoint
*
* @param additionalHeaders additionalHeaders for this call
* @return HealthCheckResult
* @throws ApiException if fails to make API call
*/
public HealthCheckResult fakeHealthGet(Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -81,6 +96,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -112,6 +129,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* test http signature authentication * test http signature authentication
* *
@ -121,6 +139,20 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException { public void fakeHttpSignatureTest(Pet pet, String query1, String header1) throws ApiException {
this.fakeHttpSignatureTest(pet, query1, header1, Collections.emptyMap());
}
/**
* test http signature authentication
*
* @param pet Pet object that needs to be added to the store (required)
* @param query1 query parameter (optional)
* @param header1 header parameter (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void fakeHttpSignatureTest(Pet pet, String query1, String header1, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = pet; Object localVarPostBody = pet;
// verify the required parameter 'pet' is set // verify the required parameter 'pet' is set
@ -143,6 +175,8 @@ public class FakeApi {
if (header1 != null) if (header1 != null)
localVarHeaderParams.put("header_1", apiClient.parameterToString(header1)); localVarHeaderParams.put("header_1", apiClient.parameterToString(header1));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -173,6 +207,7 @@ public class FakeApi {
null null
); );
} }
/** /**
* *
* Test serialization of outer boolean types * Test serialization of outer boolean types
@ -181,6 +216,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException { public Boolean fakeOuterBooleanSerialize(Boolean body) throws ApiException {
return this.fakeOuterBooleanSerialize(body, Collections.emptyMap());
}
/**
*
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @param additionalHeaders additionalHeaders for this call
* @return Boolean
* @throws ApiException if fails to make API call
*/
public Boolean fakeOuterBooleanSerialize(Boolean body, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -195,6 +243,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -226,6 +276,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* *
* Test serialization of object with outer number type * Test serialization of object with outer number type
@ -234,6 +285,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException { public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite) throws ApiException {
return this.fakeOuterCompositeSerialize(outerComposite, Collections.emptyMap());
}
/**
*
* Test serialization of object with outer number type
* @param outerComposite Input composite as post body (optional)
* @param additionalHeaders additionalHeaders for this call
* @return OuterComposite
* @throws ApiException if fails to make API call
*/
public OuterComposite fakeOuterCompositeSerialize(OuterComposite outerComposite, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = outerComposite; Object localVarPostBody = outerComposite;
// create path and map variables // create path and map variables
@ -248,6 +312,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -279,6 +345,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* *
* Test serialization of outer number types * Test serialization of outer number types
@ -287,6 +354,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException { public BigDecimal fakeOuterNumberSerialize(BigDecimal body) throws ApiException {
return this.fakeOuterNumberSerialize(body, Collections.emptyMap());
}
/**
*
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @param additionalHeaders additionalHeaders for this call
* @return BigDecimal
* @throws ApiException if fails to make API call
*/
public BigDecimal fakeOuterNumberSerialize(BigDecimal body, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -301,6 +381,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -332,6 +414,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* *
* Test serialization of outer string types * Test serialization of outer string types
@ -340,6 +423,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String fakeOuterStringSerialize(String body) throws ApiException { public String fakeOuterStringSerialize(String body) throws ApiException {
return this.fakeOuterStringSerialize(body, Collections.emptyMap());
}
/**
*
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String fakeOuterStringSerialize(String body, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = body;
// create path and map variables // create path and map variables
@ -354,6 +450,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -385,6 +483,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* *
* Test serialization of enum (int) properties with examples * Test serialization of enum (int) properties with examples
@ -393,6 +492,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException { public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException {
return this.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty, Collections.emptyMap());
}
/**
*
* Test serialization of enum (int) properties with examples
* @param outerObjectWithEnumProperty Input enum (int) as post body (required)
* @param additionalHeaders additionalHeaders for this call
* @return OuterObjectWithEnumProperty
* @throws ApiException if fails to make API call
*/
public OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = outerObjectWithEnumProperty; Object localVarPostBody = outerObjectWithEnumProperty;
// verify the required parameter 'outerObjectWithEnumProperty' is set // verify the required parameter 'outerObjectWithEnumProperty' is set
@ -412,6 +524,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -443,6 +557,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* *
* For this test, the body has to be a binary file. * For this test, the body has to be a binary file.
@ -450,6 +565,18 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testBodyWithBinary(File body) throws ApiException { public void testBodyWithBinary(File body) throws ApiException {
this.testBodyWithBinary(body, Collections.emptyMap());
}
/**
*
* For this test, the body has to be a binary file.
* @param body image to upload (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testBodyWithBinary(File body, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = body;
// verify the required parameter 'body' is set // verify the required parameter 'body' is set
@ -469,6 +596,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -499,6 +628,7 @@ public class FakeApi {
null null
); );
} }
/** /**
* *
* 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;.
@ -506,6 +636,18 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException { public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
this.testBodyWithFileSchema(fileSchemaTestClass, Collections.emptyMap());
}
/**
*
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
* @param fileSchemaTestClass (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = fileSchemaTestClass; Object localVarPostBody = fileSchemaTestClass;
// verify the required parameter 'fileSchemaTestClass' is set // verify the required parameter 'fileSchemaTestClass' is set
@ -525,6 +667,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -555,6 +699,7 @@ public class FakeApi {
null null
); );
} }
/** /**
* *
* *
@ -563,6 +708,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testBodyWithQueryParams(String query, User user) throws ApiException { public void testBodyWithQueryParams(String query, User user) throws ApiException {
this.testBodyWithQueryParams(query, user, Collections.emptyMap());
}
/**
*
*
* @param query (required)
* @param user (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testBodyWithQueryParams(String query, User user, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = user; Object localVarPostBody = user;
// verify the required parameter 'query' is set // verify the required parameter 'query' is set
@ -588,6 +746,8 @@ public class FakeApi {
localVarQueryParams.addAll(apiClient.parameterToPair("query", query)); localVarQueryParams.addAll(apiClient.parameterToPair("query", query));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -618,6 +778,7 @@ public class FakeApi {
null null
); );
} }
/** /**
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model * To test \&quot;client\&quot; model
@ -626,6 +787,19 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client testClientModel(Client client) throws ApiException { public Client testClientModel(Client client) throws ApiException {
return this.testClientModel(client, Collections.emptyMap());
}
/**
* To test \&quot;client\&quot; model
* To test \&quot;client\&quot; model
* @param client client model (required)
* @param additionalHeaders additionalHeaders for this call
* @return Client
* @throws ApiException if fails to make API call
*/
public Client testClientModel(Client client, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = client; Object localVarPostBody = client;
// verify the required parameter 'client' is set // verify the required parameter 'client' is set
@ -645,6 +819,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -676,6 +852,7 @@ public class FakeApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
@ -696,6 +873,31 @@ public class FakeApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException { public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
this.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, Collections.emptyMap());
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param number None (required)
* @param _double None (required)
* @param patternWithoutDelimiter None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param string None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testEndpointParameters(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'number' is set // verify the required parameter 'number' is set
@ -730,6 +932,8 @@ public class FakeApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (integer != null) if (integer != null)
localVarFormParams.put("integer", integer); localVarFormParams.put("integer", integer);
@ -788,6 +992,7 @@ if (paramCallback != null)
null null
); );
} }
/** /**
* To test enum parameters * To test enum parameters
* To test enum parameters * To test enum parameters
@ -803,6 +1008,26 @@ if (paramCallback != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<EnumClass> enumQueryModelArray, List<String> enumFormStringArray, String enumFormString) throws ApiException { public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<EnumClass> enumQueryModelArray, List<String> enumFormStringArray, String enumFormString) throws ApiException {
this.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, Collections.emptyMap());
}
/**
* To test enum parameters
* To test enum parameters
* @param enumHeaderStringArray Header parameter enum test (string array) (optional
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @param enumQueryModelArray (optional
* @param enumFormStringArray Form parameter enum test (string array) (optional
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testEnumParameters(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<EnumClass> enumQueryModelArray, List<String> enumFormStringArray, String enumFormString, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -826,6 +1051,8 @@ if (paramCallback != null)
if (enumHeaderString != null) if (enumHeaderString != null)
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString)); localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
localVarHeaderParams.putAll(additionalHeaders);
if (enumFormStringArray != null) if (enumFormStringArray != null)
localVarFormParams.put("enum_form_string_array", enumFormStringArray); localVarFormParams.put("enum_form_string_array", enumFormStringArray);
@ -860,6 +1087,7 @@ if (enumFormString != null)
null null
); );
} }
/** /**
* 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)
@ -872,6 +1100,23 @@ if (enumFormString != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException { public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
this.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, Collections.emptyMap());
}
/**
* Fake endpoint to test group parameters (optional)
* Fake endpoint to test group parameters (optional)
* @param requiredStringGroup Required String in group parameters (required)
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @param requiredInt64Group Required Integer in group parameters (required)
* @param stringGroup String in group parameters (optional)
* @param booleanGroup Boolean in group parameters (optional)
* @param int64Group Integer in group parameters (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testGroupParameters(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'requiredStringGroup' is set // verify the required parameter 'requiredStringGroup' is set
@ -909,6 +1154,8 @@ if (enumFormString != null)
if (booleanGroup != null) if (booleanGroup != null)
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup)); localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -939,6 +1186,7 @@ if (booleanGroup != null)
null null
); );
} }
/** /**
* test inline additionalProperties * test inline additionalProperties
* *
@ -946,6 +1194,18 @@ if (booleanGroup != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testInlineAdditionalProperties(Map<String, String> requestBody) throws ApiException { public void testInlineAdditionalProperties(Map<String, String> requestBody) throws ApiException {
this.testInlineAdditionalProperties(requestBody, Collections.emptyMap());
}
/**
* test inline additionalProperties
*
* @param requestBody request body (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testInlineAdditionalProperties(Map<String, String> requestBody, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = requestBody; Object localVarPostBody = requestBody;
// verify the required parameter 'requestBody' is set // verify the required parameter 'requestBody' is set
@ -965,6 +1225,8 @@ if (booleanGroup != null)
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -995,6 +1257,7 @@ if (booleanGroup != null)
null null
); );
} }
/** /**
* test json serialization of form data * test json serialization of form data
* *
@ -1003,6 +1266,19 @@ if (booleanGroup != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testJsonFormData(String param, String param2) throws ApiException { public void testJsonFormData(String param, String param2) throws ApiException {
this.testJsonFormData(param, param2, Collections.emptyMap());
}
/**
* test json serialization of form data
*
* @param param field1 (required)
* @param param2 field2 (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testJsonFormData(String param, String param2, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'param' is set // verify the required parameter 'param' is set
@ -1027,6 +1303,8 @@ if (booleanGroup != null)
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (param != null) if (param != null)
localVarFormParams.put("param", param); localVarFormParams.put("param", param);
@ -1061,6 +1339,7 @@ if (param2 != null)
null null
); );
} }
/** /**
* *
* To test the collection format in query parameters * To test the collection format in query parameters
@ -1074,6 +1353,24 @@ if (param2 != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, String allowEmpty, Map<String, String> language) throws ApiException { public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, String allowEmpty, Map<String, String> language) throws ApiException {
this.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language, Collections.emptyMap());
}
/**
*
* 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
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void testQueryParameterCollectionFormat(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context, String allowEmpty, Map<String, String> language, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'pipe' is set // verify the required parameter 'pipe' is set
@ -1125,6 +1422,8 @@ if (param2 != null)
localVarQueryParams.addAll(apiClient.parameterToPair("language", language)); localVarQueryParams.addAll(apiClient.parameterToPair("language", language));
localVarQueryParams.addAll(apiClient.parameterToPair("allowEmpty", allowEmpty)); localVarQueryParams.addAll(apiClient.parameterToPair("allowEmpty", allowEmpty));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -1155,4 +1454,5 @@ if (param2 != null)
null null
); );
} }
} }

View File

@ -24,6 +24,7 @@ import org.openapitools.client.model.Client;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,6 +32,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FakeClassnameTags123Api { public class FakeClassnameTags123Api {
private ApiClient apiClient; private ApiClient apiClient;
public FakeClassnameTags123Api() { public FakeClassnameTags123Api() {
@ -57,6 +60,19 @@ public class FakeClassnameTags123Api {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Client testClassname(Client client) throws ApiException { public Client testClassname(Client client) throws ApiException {
return this.testClassname(client, Collections.emptyMap());
}
/**
* To test class name in snake case
* To test class name in snake case
* @param client client model (required)
* @param additionalHeaders additionalHeaders for this call
* @return Client
* @throws ApiException if fails to make API call
*/
public Client testClassname(Client client, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = client; Object localVarPostBody = client;
// verify the required parameter 'client' is set // verify the required parameter 'client' is set
@ -76,6 +92,8 @@ public class FakeClassnameTags123Api {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -107,4 +125,5 @@ public class FakeClassnameTags123Api {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -27,6 +27,7 @@ import java.util.Set;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -34,6 +35,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PetApi { public class PetApi {
private ApiClient apiClient; private ApiClient apiClient;
public PetApi() { public PetApi() {
@ -59,6 +62,18 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void addPet(Pet pet) throws ApiException { public void addPet(Pet pet) throws ApiException {
this.addPet(pet, Collections.emptyMap());
}
/**
* Add a new pet to the store
*
* @param pet Pet object that needs to be added to the store (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void addPet(Pet pet, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = pet; Object localVarPostBody = pet;
// verify the required parameter 'pet' is set // verify the required parameter 'pet' is set
@ -78,6 +93,8 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -108,6 +125,7 @@ public class PetApi {
null null
); );
} }
/** /**
* Deletes a pet * Deletes a pet
* *
@ -116,6 +134,19 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void deletePet(Long petId, String apiKey) throws ApiException { public void deletePet(Long petId, String apiKey) throws ApiException {
this.deletePet(petId, apiKey, Collections.emptyMap());
}
/**
* Deletes a pet
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void deletePet(Long petId, String apiKey, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -138,6 +169,8 @@ public class PetApi {
if (apiKey != null) if (apiKey != null)
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey)); localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -168,6 +201,7 @@ public class PetApi {
null null
); );
} }
/** /**
* 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
@ -176,6 +210,19 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public List<Pet> findPetsByStatus(List<String> status) throws ApiException { public List<Pet> findPetsByStatus(List<String> status) throws ApiException {
return this.findPetsByStatus(status, Collections.emptyMap());
}
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @param additionalHeaders additionalHeaders for this call
* @return List&lt;Pet&gt;
* @throws ApiException if fails to make API call
*/
public List<Pet> findPetsByStatus(List<String> status, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'status' is set // verify the required parameter 'status' is set
@ -196,6 +243,8 @@ public class PetApi {
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -227,6 +276,7 @@ public class PetApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* 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.
@ -237,6 +287,21 @@ public class PetApi {
*/ */
@Deprecated @Deprecated
public Set<Pet> findPetsByTags(Set<String> tags) throws ApiException { public Set<Pet> findPetsByTags(Set<String> tags) throws ApiException {
return this.findPetsByTags(tags, Collections.emptyMap());
}
/**
* Finds Pets by tags
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @param additionalHeaders additionalHeaders for this call
* @return Set&lt;Pet&gt;
* @throws ApiException if fails to make API call
* @deprecated
*/
@Deprecated
public Set<Pet> findPetsByTags(Set<String> tags, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'tags' is set // verify the required parameter 'tags' is set
@ -257,6 +322,8 @@ public class PetApi {
localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags)); localVarCollectionQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -288,6 +355,7 @@ public class PetApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Find pet by ID * Find pet by ID
* Returns a single pet * Returns a single pet
@ -296,6 +364,19 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Pet getPetById(Long petId) throws ApiException { public Pet getPetById(Long petId) throws ApiException {
return this.getPetById(petId, Collections.emptyMap());
}
/**
* Find pet by ID
* Returns a single pet
* @param petId ID of pet to return (required)
* @param additionalHeaders additionalHeaders for this call
* @return Pet
* @throws ApiException if fails to make API call
*/
public Pet getPetById(Long petId, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -316,6 +397,8 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -347,6 +430,7 @@ public class PetApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Update an existing pet * Update an existing pet
* *
@ -354,6 +438,18 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void updatePet(Pet pet) throws ApiException { public void updatePet(Pet pet) throws ApiException {
this.updatePet(pet, Collections.emptyMap());
}
/**
* Update an existing pet
*
* @param pet Pet object that needs to be added to the store (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void updatePet(Pet pet, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = pet; Object localVarPostBody = pet;
// verify the required parameter 'pet' is set // verify the required parameter 'pet' is set
@ -373,6 +469,8 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -403,6 +501,7 @@ public class PetApi {
null null
); );
} }
/** /**
* Updates a pet in the store with form data * Updates a pet in the store with form data
* *
@ -412,6 +511,20 @@ public class PetApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void updatePetWithForm(Long petId, String name, String status) throws ApiException { public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
this.updatePetWithForm(petId, name, status, Collections.emptyMap());
}
/**
* Updates a pet in the store with form data
*
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void updatePetWithForm(Long petId, String name, String status, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -432,6 +545,8 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (name != null) if (name != null)
localVarFormParams.put("name", name); localVarFormParams.put("name", name);
@ -466,6 +581,7 @@ if (status != null)
null null
); );
} }
/** /**
* uploads an image * uploads an image
* *
@ -476,6 +592,21 @@ if (status != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException { public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file) throws ApiException {
return this.uploadFile(petId, additionalMetadata, _file, Collections.emptyMap());
}
/**
* uploads an image
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param _file file to upload (optional)
* @param additionalHeaders additionalHeaders for this call
* @return ModelApiResponse
* @throws ApiException if fails to make API call
*/
public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File _file, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -496,6 +627,8 @@ if (status != null)
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (additionalMetadata != null) if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata); localVarFormParams.put("additionalMetadata", additionalMetadata);
@ -531,6 +664,7 @@ if (_file != null)
localVarReturnType localVarReturnType
); );
} }
/** /**
* uploads an image (required) * uploads an image (required)
* *
@ -541,6 +675,21 @@ if (_file != null)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException { public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
return this.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata, Collections.emptyMap());
}
/**
* uploads an image (required)
*
* @param petId ID of pet to update (required)
* @param requiredFile file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param additionalHeaders additionalHeaders for this call
* @return ModelApiResponse
* @throws ApiException if fails to make API call
*/
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -566,6 +715,8 @@ if (_file != null)
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
if (additionalMetadata != null) if (additionalMetadata != null)
localVarFormParams.put("additionalMetadata", additionalMetadata); localVarFormParams.put("additionalMetadata", additionalMetadata);
@ -601,4 +752,5 @@ if (requiredFile != null)
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -24,6 +24,7 @@ import org.openapitools.client.model.Order;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -31,6 +32,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient apiClient;
public StoreApi() { public StoreApi() {
@ -56,6 +59,18 @@ public class StoreApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void deleteOrder(String orderId) throws ApiException { public void deleteOrder(String orderId) throws ApiException {
this.deleteOrder(orderId, Collections.emptyMap());
}
/**
* Delete purchase order by ID
* 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)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void deleteOrder(String orderId, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'orderId' is set // verify the required parameter 'orderId' is set
@ -76,6 +91,8 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -106,6 +123,7 @@ public class StoreApi {
null null
); );
} }
/** /**
* 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
@ -113,6 +131,18 @@ public class StoreApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
return this.getInventory(Collections.emptyMap());
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @param additionalHeaders additionalHeaders for this call
* @return Map&lt;String, Integer&gt;
* @throws ApiException if fails to make API call
*/
public Map<String, Integer> getInventory(Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -127,6 +157,8 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -158,6 +190,7 @@ public class StoreApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* 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 generate exceptions * For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
@ -166,6 +199,19 @@ public class StoreApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Order getOrderById(Long orderId) throws ApiException { public Order getOrderById(Long orderId) throws ApiException {
return this.getOrderById(orderId, Collections.emptyMap());
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @param additionalHeaders additionalHeaders for this call
* @return Order
* @throws ApiException if fails to make API call
*/
public Order getOrderById(Long orderId, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'orderId' is set // verify the required parameter 'orderId' is set
@ -186,6 +232,8 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -217,6 +265,7 @@ public class StoreApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Place an order for a pet * Place an order for a pet
* *
@ -225,6 +274,19 @@ public class StoreApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public Order placeOrder(Order order) throws ApiException { public Order placeOrder(Order order) throws ApiException {
return this.placeOrder(order, Collections.emptyMap());
}
/**
* Place an order for a pet
*
* @param order order placed for purchasing the pet (required)
* @param additionalHeaders additionalHeaders for this call
* @return Order
* @throws ApiException if fails to make API call
*/
public Order placeOrder(Order order, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = order; Object localVarPostBody = order;
// verify the required parameter 'order' is set // verify the required parameter 'order' is set
@ -244,6 +306,8 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -275,4 +339,5 @@ public class StoreApi {
localVarReturnType localVarReturnType
); );
} }
} }

View File

@ -25,6 +25,7 @@ import org.openapitools.client.model.User;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -32,6 +33,8 @@ import java.util.StringJoiner;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class UserApi { public class UserApi {
private ApiClient apiClient; private ApiClient apiClient;
public UserApi() { public UserApi() {
@ -57,6 +60,18 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUser(User user) throws ApiException { public void createUser(User user) throws ApiException {
this.createUser(user, Collections.emptyMap());
}
/**
* Create user
* This can only be done by the logged in user.
* @param user Created user object (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void createUser(User user, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = user; Object localVarPostBody = user;
// verify the required parameter 'user' is set // verify the required parameter 'user' is set
@ -76,6 +91,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -106,6 +123,7 @@ public class UserApi {
null null
); );
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -113,6 +131,18 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUsersWithArrayInput(List<User> user) throws ApiException { public void createUsersWithArrayInput(List<User> user) throws ApiException {
this.createUsersWithArrayInput(user, Collections.emptyMap());
}
/**
* Creates list of users with given input array
*
* @param user List of user object (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void createUsersWithArrayInput(List<User> user, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = user; Object localVarPostBody = user;
// verify the required parameter 'user' is set // verify the required parameter 'user' is set
@ -132,6 +162,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -162,6 +194,7 @@ public class UserApi {
null null
); );
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
@ -169,6 +202,18 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void createUsersWithListInput(List<User> user) throws ApiException { public void createUsersWithListInput(List<User> user) throws ApiException {
this.createUsersWithListInput(user, Collections.emptyMap());
}
/**
* Creates list of users with given input array
*
* @param user List of user object (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void createUsersWithListInput(List<User> user, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = user; Object localVarPostBody = user;
// verify the required parameter 'user' is set // verify the required parameter 'user' is set
@ -188,6 +233,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -218,6 +265,7 @@ public class UserApi {
null null
); );
} }
/** /**
* Delete user * Delete user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -225,6 +273,18 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void deleteUser(String username) throws ApiException { public void deleteUser(String username) throws ApiException {
this.deleteUser(username, Collections.emptyMap());
}
/**
* Delete user
* This can only be done by the logged in user.
* @param username The name that needs to be deleted (required)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void deleteUser(String username, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
@ -245,6 +305,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -275,6 +337,7 @@ public class UserApi {
null null
); );
} }
/** /**
* Get user by user name * Get user by user name
* *
@ -283,6 +346,19 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public User getUserByName(String username) throws ApiException { public User getUserByName(String username) throws ApiException {
return this.getUserByName(username, Collections.emptyMap());
}
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param additionalHeaders additionalHeaders for this call
* @return User
* @throws ApiException if fails to make API call
*/
public User getUserByName(String username, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
@ -303,6 +379,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -334,6 +412,7 @@ public class UserApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Logs user into the system * Logs user into the system
* *
@ -343,6 +422,20 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public String loginUser(String username, String password) throws ApiException { public String loginUser(String username, String password) throws ApiException {
return this.loginUser(username, password, Collections.emptyMap());
}
/**
* Logs user into the system
*
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @param additionalHeaders additionalHeaders for this call
* @return String
* @throws ApiException if fails to make API call
*/
public String loginUser(String username, String password, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
@ -369,6 +462,8 @@ public class UserApi {
localVarQueryParams.addAll(apiClient.parameterToPair("username", username)); localVarQueryParams.addAll(apiClient.parameterToPair("username", username));
localVarQueryParams.addAll(apiClient.parameterToPair("password", password)); localVarQueryParams.addAll(apiClient.parameterToPair("password", password));
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -400,12 +495,24 @@ public class UserApi {
localVarReturnType localVarReturnType
); );
} }
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void logoutUser() throws ApiException { public void logoutUser() throws ApiException {
this.logoutUser(Collections.emptyMap());
}
/**
* Logs out current logged in user session
*
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void logoutUser(Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
@ -420,6 +527,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -450,6 +559,7 @@ public class UserApi {
null null
); );
} }
/** /**
* Updated user * Updated user
* This can only be done by the logged in user. * This can only be done by the logged in user.
@ -458,6 +568,19 @@ public class UserApi {
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public void updateUser(String username, User user) throws ApiException { public void updateUser(String username, User user) throws ApiException {
this.updateUser(username, user, Collections.emptyMap());
}
/**
* Updated user
* 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)
* @param additionalHeaders additionalHeaders for this call
* @throws ApiException if fails to make API call
*/
public void updateUser(String username, User user, Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = user; Object localVarPostBody = user;
// verify the required parameter 'username' is set // verify the required parameter 'username' is set
@ -483,6 +606,8 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = { final String[] localVarAccepts = {
@ -513,4 +638,5 @@ public class UserApi {
null null
); );
} }
} }