forked from loafle/openapi-generator-original
[java][jersey] Remove double brace initialization and some more jersey cleanup (#14783)
* Remove double brace initialization * Use diamond operator * Less clutter in generated api classes * Optimize isJsonMime * Revert change in escapeString Skip toString() on string parameters. * Fix edge-cases A ServerVariable without enumValues and/or operationServers with any ServerVariables would lead to invalid code.
This commit is contained in:
@@ -820,6 +820,11 @@ public class DefaultGenerator implements Generator {
|
|||||||
bundle.put("hasServers", true);
|
bundle.put("hasServers", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean hasOperationServers = allOperations != null && allOperations.stream()
|
||||||
|
.flatMap(om -> om.getOperations().getOperation().stream())
|
||||||
|
.anyMatch(o -> o.servers != null && !o.servers.isEmpty());
|
||||||
|
bundle.put("hasOperationServers", hasOperationServers);
|
||||||
|
|
||||||
if (openAPI.getExternalDocs() != null) {
|
if (openAPI.getExternalDocs() != null) {
|
||||||
bundle.put("externalDocs", openAPI.getExternalDocs());
|
bundle.put("externalDocs", openAPI.getExternalDocs());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -45,11 +46,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
{{#jsr310}}
|
{{#jsr310}}
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
{{/jsr310}}
|
{{/jsr310}}
|
||||||
@@ -79,80 +83,93 @@ import {{invokerPackage}}.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "{{{basePath}}}";
|
protected String basePath = "{{{basePath}}}";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>({{#servers}}{{#-first}}Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>({{#servers}}{{#-first}}Arrays.asList(
|
||||||
{{/-first}} new ServerConfiguration(
|
{{/-first}} new ServerConfiguration(
|
||||||
"{{{url}}}",
|
"{{{url}}}",
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
new HashMap<String, ServerVariable>(){{#variables}}{{#-first}} {{
|
{{^variables}}
|
||||||
{{/-first}} put("{{{name}}}", new ServerVariable(
|
new LinkedHashMap<>()
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
{{/variables}}
|
||||||
"{{{defaultValue}}}",
|
{{#variables}}
|
||||||
new HashSet<String>(
|
{{#-first}}
|
||||||
{{#enumValues}}
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
{{#-first}}
|
{{/-first}}
|
||||||
Arrays.asList(
|
new SimpleEntry<>("{{{name}}}", new ServerVariable(
|
||||||
{{/-first}}
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
"{{{.}}}"{{^-last}},{{/-last}}
|
"{{{defaultValue}}}",
|
||||||
{{#-last}}
|
new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}}
|
||||||
)
|
"{{{.}}}"{{^-last}},{{/-last}}{{#-last}}
|
||||||
{{/-last}}
|
){{/-last}}{{/enumValues}})
|
||||||
{{/enumValues}}
|
)){{^-last}},{{/-last}}
|
||||||
)
|
{{#-last}}
|
||||||
));
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
{{#-last}}
|
{{/-last}}
|
||||||
}}{{/-last}}{{/variables}}
|
{{/variables}}
|
||||||
){{^-last}},{{/-last}}
|
){{^-last}},{{/-last}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
){{/-last}}{{/servers}});
|
){{/-last}}{{/servers}});
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
{{^hasOperationServers}}
|
||||||
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
|
{{/hasOperationServers}}
|
||||||
|
{{#hasOperationServers}}
|
||||||
|
protected Map<String, List<ServerConfiguration>> operationServers;
|
||||||
|
|
||||||
|
{
|
||||||
|
Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
{{#apiInfo}}
|
{{#apiInfo}}
|
||||||
{{#apis}}
|
{{#apis}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
{{#servers}}
|
{{#servers}}
|
||||||
{{#-first}}
|
{{#-first}}
|
||||||
put("{{{classname}}}.{{{operationId}}}", new ArrayList<ServerConfiguration>(Arrays.asList(
|
operationServers.put("{{{classname}}}.{{{operationId}}}", new ArrayList<>(Arrays.asList(
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"{{{url}}}",
|
"{{{url}}}",
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
new HashMap<String, ServerVariable>(){{#variables}}{{#-first}} {{
|
{{^variables}}
|
||||||
{{/-first}} put("{{{name}}}", new ServerVariable(
|
new LinkedHashMap<>()
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
{{/variables}}
|
||||||
"{{{defaultValue}}}",
|
{{#variables}}
|
||||||
new HashSet<String>(
|
{{#-first}}
|
||||||
{{#enumValues}}
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
{{#-first}}
|
{{/-first}}
|
||||||
Arrays.asList(
|
new SimpleEntry<>("{{{name}}}", new ServerVariable(
|
||||||
{{/-first}}
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
"{{{.}}}"{{^-last}},{{/-last}}
|
"{{{defaultValue}}}",
|
||||||
{{#-last}}
|
new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}}
|
||||||
)
|
"{{{.}}}"{{^-last}},{{/-last}}{{#-last}}
|
||||||
{{/-last}}
|
){{/-last}}{{/enumValues}})
|
||||||
{{/enumValues}}
|
)){{^-last}},{{/-last}}
|
||||||
)
|
{{#-last}}
|
||||||
));
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
{{#-last}}
|
{{/-last}}
|
||||||
}}{{/-last}}{{/variables}}
|
{{/variables}}
|
||||||
){{^-last}},{{/-last}}
|
){{^-last}},{{/-last}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
)));{{/-last}}
|
)));
|
||||||
|
{{/-last}}
|
||||||
{{/servers}}
|
{{/servers}}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
{{/apis}}
|
{{/apis}}
|
||||||
{{/apiInfo}}
|
{{/apiInfo}}
|
||||||
}};
|
this.operationServers = operationServers;
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
}
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
|
{{/hasOperationServers}}
|
||||||
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -189,7 +206,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}");
|
setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
@@ -235,7 +252,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}}
|
authenticationLookup = new HashMap<>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}}
|
||||||
authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}}
|
authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -830,7 +847,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -889,14 +906,13 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -908,8 +924,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -929,8 +945,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1222,20 +1238,22 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
{{#hasHttpSignatureMethods}}
|
cookieParams,
|
||||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
{{#hasHttpSignatureMethods}}
|
||||||
{{/hasHttpSignatureMethods}}
|
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||||
{{^hasHttpSignatureMethods}}
|
{{/hasHttpSignatureMethods}}
|
||||||
null,
|
{{^hasHttpSignatureMethods}}
|
||||||
{{/hasHttpSignatureMethods}}
|
null,
|
||||||
method,
|
{{/hasHttpSignatureMethods}}
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1253,7 +1271,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
|
|
||||||
{{#hasOAuthMethods}}
|
{{#hasOAuthMethods}}
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1425,10 +1443,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -205,12 +205,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, {{{.}}}>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in anyOf
|
// store a list of schema names defined in anyOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public {{classname}}() {
|
public {{classname}}() {
|
||||||
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||||
@@ -134,7 +134,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
@@ -166,7 +166,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
|
|
||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#anyOf}}
|
{{#anyOf}}
|
||||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {{javaxPackage}}.ws.rs.core.GenericType;
|
|||||||
{{^fullJavaUtil}}
|
{{^fullJavaUtil}}
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -116,58 +117,84 @@ public class {{classname}} {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
|
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
|
||||||
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
{{#hasRequiredParams}}
|
||||||
{{#allParams}}{{#required}}
|
// Check required parameters
|
||||||
// verify the required parameter '{{paramName}}' is set
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}
|
||||||
// create path and map variables
|
{{/allParams}}
|
||||||
|
|
||||||
|
{{/hasRequiredParams}}
|
||||||
|
{{#hasPathParams}}
|
||||||
|
// Path parameters
|
||||||
String localVarPath = "{{{path}}}"{{#pathParams}}
|
String localVarPath = "{{{path}}}"{{#pathParams}}
|
||||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
.replaceAll({{=% %=}}"\\{%baseName%}"%={{ }}=%, apiClient.escapeString({{{paramName}}}{{^isString}}.toString(){{/isString}})){{/pathParams}};
|
||||||
|
|
||||||
// query params
|
|
||||||
{{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
|
||||||
{{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
|
||||||
{{javaUtilPrefix}}Map<String, String> localVarCookieParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
|
||||||
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
{{/hasPathParams}}
|
||||||
{{#queryParams}}
|
{{#queryParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Query parameters
|
||||||
|
{{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>(
|
||||||
|
apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})
|
||||||
|
);
|
||||||
|
{{/-first}}
|
||||||
|
{{^-first}}
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
|
||||||
|
{{/-first}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
|
{{/-last}}
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
|
{{#headerParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Header parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#headerParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
|
|
||||||
{{/headerParams}}
|
{{/headerParams}}
|
||||||
|
{{#cookieParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Cookie parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, String> localVarCookieParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#cookieParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
|
|
||||||
{{/cookieParams}}
|
{{/cookieParams}}
|
||||||
|
{{#formParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Form parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#formParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarFormParams.put("{{baseName}}", {{paramName}});
|
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept({{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}});
|
||||||
final String[] localVarAccepts = {
|
String localVarContentType = apiClient.selectHeaderContentType({{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}});
|
||||||
{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
|
{{#hasAuthMethods}}
|
||||||
};
|
String[] localVarAuthNames = {{=% %=}}new String[] {%#authMethods%"%name%"%^-last%, %/-last%%/authMethods%};%={{ }}=%
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
{{/hasAuthMethods}}
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
|
|
||||||
|
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
||||||
|
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
return apiClient.invokeAPI("{{classname}}.{{operationId}}", localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody,
|
return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}},
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
{{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType,
|
||||||
localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}});
|
{{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}});
|
||||||
}
|
}
|
||||||
{{#vendorExtensions.x-group-parameters}}
|
{{#vendorExtensions.x-group-parameters}}
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
{{#useOneOfDiscriminatorLookup}}
|
{{#useOneOfDiscriminatorLookup}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
{{classname}} new{{classname}} = new {{classname}}();
|
{{classname}} new{{classname}} = new {{classname}}();
|
||||||
Map<String,Object> result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference<Map<String, Object>>() {});
|
Map<String, Object> result2 = tree.traverse(jp.getCodec()).readValueAs(new TypeReference<Map<String, Object>>() {});
|
||||||
String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}");
|
String discriminatorValue = (String)result2.get("{{{propertyBaseName}}}");
|
||||||
switch (discriminatorValue) {
|
switch (discriminatorValue) {
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
@@ -132,7 +132,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public {{classname}}() {
|
public {{classname}}() {
|
||||||
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||||
@@ -167,7 +167,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
@@ -199,7 +199,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
|
|
||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#oneOf}}
|
{{#oneOf}}
|
||||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() {
|
public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<>() {
|
||||||
public {{classname}} createFromParcel(Parcel in) {
|
public {{classname}} createFromParcel(Parcel in) {
|
||||||
{{#model}}
|
{{#model}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
@@ -408,14 +408,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
|||||||
};
|
};
|
||||||
{{/parcelableModel}}
|
{{/parcelableModel}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
mappings.put("{{name}}", {{classname}}.class);
|
mappings.put("{{name}}", {{classname}}.class);
|
||||||
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
||||||
}
|
}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -45,11 +46,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
{{#jsr310}}
|
{{#jsr310}}
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
{{/jsr310}}
|
{{/jsr310}}
|
||||||
@@ -79,80 +83,93 @@ import {{invokerPackage}}.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "{{{basePath}}}";
|
protected String basePath = "{{{basePath}}}";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>({{#servers}}{{#-first}}Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>({{#servers}}{{#-first}}Arrays.asList(
|
||||||
{{/-first}} new ServerConfiguration(
|
{{/-first}} new ServerConfiguration(
|
||||||
"{{{url}}}",
|
"{{{url}}}",
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
new HashMap<String, ServerVariable>(){{#variables}}{{#-first}} {{
|
{{^variables}}
|
||||||
{{/-first}} put("{{{name}}}", new ServerVariable(
|
new LinkedHashMap<>()
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
{{/variables}}
|
||||||
"{{{defaultValue}}}",
|
{{#variables}}
|
||||||
new HashSet<String>(
|
{{#-first}}
|
||||||
{{#enumValues}}
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
{{#-first}}
|
{{/-first}}
|
||||||
Arrays.asList(
|
new SimpleEntry<>("{{{name}}}", new ServerVariable(
|
||||||
{{/-first}}
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
"{{{.}}}"{{^-last}},{{/-last}}
|
"{{{defaultValue}}}",
|
||||||
{{#-last}}
|
new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}}
|
||||||
)
|
"{{{.}}}"{{^-last}},{{/-last}}{{#-last}}
|
||||||
{{/-last}}
|
){{/-last}}{{/enumValues}})
|
||||||
{{/enumValues}}
|
)){{^-last}},{{/-last}}
|
||||||
)
|
{{#-last}}
|
||||||
));
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
{{#-last}}
|
{{/-last}}
|
||||||
}}{{/-last}}{{/variables}}
|
{{/variables}}
|
||||||
){{^-last}},{{/-last}}
|
){{^-last}},{{/-last}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
){{/-last}}{{/servers}});
|
){{/-last}}{{/servers}});
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
{{^hasOperationServers}}
|
||||||
|
protected Map<String, List<ServerConfiguration>> operationServers = new LinkedHashMap<>();
|
||||||
|
{{/hasOperationServers}}
|
||||||
|
{{#hasOperationServers}}
|
||||||
|
protected Map<String, List<ServerConfiguration>> operationServers;
|
||||||
|
|
||||||
|
{
|
||||||
|
Map<String, List<ServerConfiguration>> operationServers = new LinkedHashMap<>();
|
||||||
{{#apiInfo}}
|
{{#apiInfo}}
|
||||||
{{#apis}}
|
{{#apis}}
|
||||||
{{#operations}}
|
{{#operations}}
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
{{#servers}}
|
{{#servers}}
|
||||||
{{#-first}}
|
{{#-first}}
|
||||||
put("{{{classname}}}.{{{operationId}}}", new ArrayList<ServerConfiguration>(Arrays.asList(
|
operationServers.put("{{{classname}}}.{{{operationId}}}", new ArrayList<>(Arrays.asList(
|
||||||
{{/-first}}
|
{{/-first}}
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"{{{url}}}",
|
"{{{url}}}",
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
new HashMap<String, ServerVariable>(){{#variables}}{{#-first}} {{
|
{{^variables}}
|
||||||
{{/-first}} put("{{{name}}}", new ServerVariable(
|
new LinkedHashMap<>()
|
||||||
"{{{description}}}{{^description}}No description provided{{/description}}",
|
{{/variables}}
|
||||||
"{{{defaultValue}}}",
|
{{#variables}}
|
||||||
new HashSet<String>(
|
{{#-first}}
|
||||||
{{#enumValues}}
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
{{#-first}}
|
{{/-first}}
|
||||||
Arrays.asList(
|
new SimpleEntry<>("{{{name}}}", new ServerVariable(
|
||||||
{{/-first}}
|
"{{{description}}}{{^description}}No description provided{{/description}}",
|
||||||
"{{{.}}}"{{^-last}},{{/-last}}
|
"{{{defaultValue}}}",
|
||||||
{{#-last}}
|
new LinkedHashSet<>({{#enumValues}}{{#-first}}Arrays.asList({{/-first}}
|
||||||
)
|
"{{{.}}}"{{^-last}},{{/-last}}{{#-last}}
|
||||||
{{/-last}}
|
){{/-last}}{{/enumValues}})
|
||||||
{{/enumValues}}
|
)){{^-last}},{{/-last}}
|
||||||
)
|
{{#-last}}
|
||||||
));
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
{{#-last}}
|
{{/-last}}
|
||||||
}}{{/-last}}{{/variables}}
|
{{/variables}}
|
||||||
){{^-last}},{{/-last}}
|
){{^-last}},{{/-last}}
|
||||||
{{#-last}}
|
{{#-last}}
|
||||||
)));{{/-last}}
|
)));
|
||||||
|
{{/-last}}
|
||||||
{{/servers}}
|
{{/servers}}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
{{/operations}}
|
{{/operations}}
|
||||||
{{/apis}}
|
{{/apis}}
|
||||||
{{/apiInfo}}
|
{{/apiInfo}}
|
||||||
}};
|
this.operationServers = operationServers;
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
}
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
|
{{/hasOperationServers}}
|
||||||
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -189,7 +206,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}");
|
setUserAgent("{{{httpUserAgent}}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
@@ -235,7 +252,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}}
|
authenticationLookup = new HashMap<>();{{#authMethods}}{{#vendorExtensions.x-auth-id-alias}}
|
||||||
authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}}
|
authenticationLookup.put("{{name}}", "{{.}}");{{/vendorExtensions.x-auth-id-alias}}{{/authMethods}}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -830,7 +847,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -889,14 +906,13 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -908,8 +924,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -929,8 +945,8 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1222,20 +1238,22 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
{{#hasHttpSignatureMethods}}
|
cookieParams,
|
||||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
{{#hasHttpSignatureMethods}}
|
||||||
{{/hasHttpSignatureMethods}}
|
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||||
{{^hasHttpSignatureMethods}}
|
{{/hasHttpSignatureMethods}}
|
||||||
null,
|
{{^hasHttpSignatureMethods}}
|
||||||
{{/hasHttpSignatureMethods}}
|
null,
|
||||||
method,
|
{{/hasHttpSignatureMethods}}
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1253,7 +1271,7 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
|
|
||||||
{{#hasOAuthMethods}}
|
{{#hasOAuthMethods}}
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1425,10 +1443,10 @@ public class ApiClient{{#jsr310}} extends JavaTimeFormatter{{/jsr310}} {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -205,12 +205,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
public {{classname}} putAdditionalProperty(String key, {{{.}}} value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, {{{.}}}>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in anyOf
|
// store a list of schema names defined in anyOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public {{classname}}() {
|
public {{classname}}() {
|
||||||
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||||
@@ -134,7 +134,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
@@ -166,7 +166,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
|
|
||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#anyOf}}
|
{{#anyOf}}
|
||||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import {{javaxPackage}}.ws.rs.core.GenericType;
|
|||||||
{{^fullJavaUtil}}
|
{{^fullJavaUtil}}
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -116,58 +117,84 @@ public class {{classname}} {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
{{/isDeprecated}}
|
{{/isDeprecated}}
|
||||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
|
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{{returnType}}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) throws ApiException {
|
||||||
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
{{#hasRequiredParams}}
|
||||||
{{#allParams}}{{#required}}
|
// Check required parameters
|
||||||
// verify the required parameter '{{paramName}}' is set
|
{{#allParams}}
|
||||||
|
{{#required}}
|
||||||
if ({{paramName}} == null) {
|
if ({{paramName}} == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}");
|
||||||
}
|
}
|
||||||
{{/required}}{{/allParams}}
|
{{/required}}
|
||||||
// create path and map variables
|
{{/allParams}}
|
||||||
|
|
||||||
|
{{/hasRequiredParams}}
|
||||||
|
{{#hasPathParams}}
|
||||||
|
// Path parameters
|
||||||
String localVarPath = "{{{path}}}"{{#pathParams}}
|
String localVarPath = "{{{path}}}"{{#pathParams}}
|
||||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
.replaceAll({{=% %=}}"\\{%baseName%}"%={{ }}=%, apiClient.escapeString({{{paramName}}}{{^isString}}.toString(){{/isString}})){{/pathParams}};
|
||||||
|
|
||||||
// query params
|
|
||||||
{{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
|
||||||
{{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
|
||||||
{{javaUtilPrefix}}Map<String, String> localVarCookieParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
|
||||||
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
{{/hasPathParams}}
|
||||||
{{#queryParams}}
|
{{#queryParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Query parameters
|
||||||
|
{{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<>(
|
||||||
|
apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}})
|
||||||
|
);
|
||||||
|
{{/-first}}
|
||||||
|
{{^-first}}
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("{{{collectionFormat}}}", "{{baseName}}", {{paramName}}));
|
||||||
|
{{/-first}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
|
{{/-last}}
|
||||||
{{/queryParams}}
|
{{/queryParams}}
|
||||||
|
{{#headerParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Header parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#headerParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarHeaderParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
|
|
||||||
{{/headerParams}}
|
{{/headerParams}}
|
||||||
|
{{#cookieParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Cookie parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, String> localVarCookieParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#cookieParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarCookieParams.put("{{baseName}}", apiClient.parameterToString({{paramName}}));
|
|
||||||
{{/cookieParams}}
|
{{/cookieParams}}
|
||||||
|
{{#formParams}}
|
||||||
|
{{#-first}}
|
||||||
|
// Form parameters
|
||||||
|
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}LinkedHashMap<>();
|
||||||
|
{{/-first}}
|
||||||
|
{{^required}}if ({{paramName}} != null) {
|
||||||
|
{{/required}}localVarFormParams.put("{{baseName}}", {{paramName}});{{^required}}
|
||||||
|
}{{/required}}
|
||||||
|
{{#-last}}
|
||||||
|
|
||||||
{{#formParams}}if ({{paramName}} != null)
|
{{/-last}}
|
||||||
localVarFormParams.put("{{baseName}}", {{paramName}});
|
|
||||||
{{/formParams}}
|
{{/formParams}}
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept({{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}});
|
||||||
final String[] localVarAccepts = {
|
String localVarContentType = apiClient.selectHeaderContentType({{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}});
|
||||||
{{#produces}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/produces}}
|
{{#hasAuthMethods}}
|
||||||
};
|
String[] localVarAuthNames = {{=% %=}}new String[] {%#authMethods%"%name%"%^-last%, %/-last%%/authMethods%};%={{ }}=%
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
{{/hasAuthMethods}}
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
{{#consumes}}"{{{mediaType}}}"{{^-last}}, {{/-last}}{{/consumes}}
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} };
|
|
||||||
|
|
||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
GenericType<{{{returnType}}}> localVarReturnType = new GenericType<{{{returnType}}}>() {};
|
||||||
|
|
||||||
{{/returnType}}
|
{{/returnType}}
|
||||||
return apiClient.invokeAPI("{{classname}}.{{operationId}}", localVarPath, "{{httpMethod}}", localVarQueryParams, localVarPostBody,
|
return apiClient.invokeAPI("{{classname}}.{{operationId}}", {{#hasPathParams}}localVarPath{{/hasPathParams}}{{^hasPathParams}}"{{path}}"{{/hasPathParams}}, "{{httpMethod}}", {{#queryParams}}{{#-first}}localVarQueryParams{{/-first}}{{/queryParams}}{{^queryParams}}new ArrayList<>(){{/queryParams}}, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}},
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
{{#headerParams}}{{#-first}}localVarHeaderParams{{/-first}}{{/headerParams}}{{^headerParams}}new LinkedHashMap<>(){{/headerParams}}, {{#cookieParams}}{{#-first}}localVarCookieParams{{/-first}}{{/cookieParams}}{{^cookieParams}}new LinkedHashMap<>(){{/cookieParams}}, {{#formParams}}{{#-first}}localVarFormParams{{/-first}}{{/formParams}}{{^formParams}}new LinkedHashMap<>(){{/formParams}}, localVarAccept, localVarContentType,
|
||||||
localVarAuthNames, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}});
|
{{#hasAuthMethods}}localVarAuthNames{{/hasAuthMethods}}{{^hasAuthMethods}}null{{/hasAuthMethods}}, {{#returnType}}localVarReturnType{{/returnType}}{{^returnType}}null{{/returnType}}, {{#bodyParam}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/bodyParam}}{{^bodyParam}}false{{/bodyParam}});
|
||||||
}
|
}
|
||||||
{{#vendorExtensions.x-group-parameters}}
|
{{#vendorExtensions.x-group-parameters}}
|
||||||
|
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public {{classname}}() {
|
public {{classname}}() {
|
||||||
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
|
||||||
@@ -167,7 +167,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants({{classname}}.class, Collections.unmodifiableMap(schemas));
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
@@ -199,7 +199,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
|
|||||||
|
|
||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#oneOf}}
|
{{#oneOf}}
|
||||||
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf({{{.}}}.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<{{classname}}>() {
|
public static final Parcelable.Creator<{{classname}}> CREATOR = new Parcelable.Creator<>() {
|
||||||
public {{classname}} createFromParcel(Parcel in) {
|
public {{classname}} createFromParcel(Parcel in) {
|
||||||
{{#model}}
|
{{#model}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
@@ -408,14 +408,14 @@ public class {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{{#vendorExtens
|
|||||||
};
|
};
|
||||||
{{/parcelableModel}}
|
{{/parcelableModel}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
{{#mappedModels}}
|
{{#mappedModels}}
|
||||||
mappings.put("{{mappingName}}", {{modelName}}.class);
|
mappings.put("{{mappingName}}", {{modelName}}.class);
|
||||||
{{/mappedModels}}
|
{{/mappedModels}}
|
||||||
mappings.put("{{name}}", {{classname}}.class);
|
mappings.put("{{name}}", {{classname}}.class);
|
||||||
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
JSON.registerDiscriminator({{classname}}.class, "{{propertyBaseName}}", mappings);
|
||||||
}
|
}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -43,11 +44,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -70,25 +74,26 @@ import org.openapitools.client.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://petstore.swagger.io:80/v2",
|
"http://petstore.swagger.io:80/v2",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
}};
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -125,7 +130,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("petstore_auth");
|
auth = authMap.get("petstore_auth");
|
||||||
@@ -163,7 +168,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -751,7 +756,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -810,14 +815,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -829,8 +833,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -850,8 +854,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1143,15 +1147,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
null,
|
cookieParams,
|
||||||
method,
|
null,
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1168,7 +1174,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
final int statusCode = response.getStatusInfo().getStatusCode();
|
final int statusCode = response.getStatusInfo().getStatusCode();
|
||||||
|
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1339,10 +1345,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -193,12 +193,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,16 @@ public class AnotherFakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/another-fake/dummy";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.openapitools.client.model.XmlItem;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -81,41 +82,16 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
|
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
|
||||||
Object localVarPostBody = xmlItem;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'xmlItem' is set
|
|
||||||
if (xmlItem == null) {
|
if (xmlItem == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
|
throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/create_xml_item";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.createXmlItem", "/fake/create_xml_item", "POST", new ArrayList<>(), xmlItem,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.createXmlItem", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -146,38 +122,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/boolean";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", "/fake/outer/boolean", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -208,38 +158,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/composite";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", "/fake/outer/composite", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -270,38 +194,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/number";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", "/fake/outer/number", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -332,38 +230,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/string";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", "/fake/outer/string", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -393,41 +265,16 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
|
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-file-schema";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", "/fake/body-with-file-schema", "PUT", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -459,47 +306,24 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
|
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'query' is set
|
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-query-params";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "query", query)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", "/fake/body-with-query-params", "PUT", localVarQueryParams, body,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
@@ -530,43 +354,17 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.testClientModel", "/fake", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@@ -624,83 +422,62 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, LocalDateTime dateTime, String password, String paramCallback) throws ApiException {
|
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, LocalDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'number' is set
|
|
||||||
if (number == null) {
|
if (number == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_double' is set
|
|
||||||
if (_double == null) {
|
if (_double == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'patternWithoutDelimiter' is set
|
|
||||||
if (patternWithoutDelimiter == null) {
|
if (patternWithoutDelimiter == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_byte' is set
|
|
||||||
if (_byte == null) {
|
if (_byte == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (integer != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (integer != null)
|
|
||||||
localVarFormParams.put("integer", integer);
|
localVarFormParams.put("integer", integer);
|
||||||
if (int32 != null)
|
}
|
||||||
|
if (int32 != null) {
|
||||||
localVarFormParams.put("int32", int32);
|
localVarFormParams.put("int32", int32);
|
||||||
if (int64 != null)
|
}
|
||||||
|
if (int64 != null) {
|
||||||
localVarFormParams.put("int64", int64);
|
localVarFormParams.put("int64", int64);
|
||||||
if (number != null)
|
}
|
||||||
localVarFormParams.put("number", number);
|
localVarFormParams.put("number", number);
|
||||||
if (_float != null)
|
if (_float != null) {
|
||||||
localVarFormParams.put("float", _float);
|
localVarFormParams.put("float", _float);
|
||||||
if (_double != null)
|
}
|
||||||
localVarFormParams.put("double", _double);
|
localVarFormParams.put("double", _double);
|
||||||
if (string != null)
|
if (string != null) {
|
||||||
localVarFormParams.put("string", string);
|
localVarFormParams.put("string", string);
|
||||||
if (patternWithoutDelimiter != null)
|
}
|
||||||
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
||||||
if (_byte != null)
|
localVarFormParams.put("byte", _byte);
|
||||||
localVarFormParams.put("byte", _byte);
|
if (binary != null) {
|
||||||
if (binary != null)
|
|
||||||
localVarFormParams.put("binary", binary);
|
localVarFormParams.put("binary", binary);
|
||||||
if (date != null)
|
}
|
||||||
|
if (date != null) {
|
||||||
localVarFormParams.put("date", date);
|
localVarFormParams.put("date", date);
|
||||||
if (dateTime != null)
|
}
|
||||||
|
if (dateTime != null) {
|
||||||
localVarFormParams.put("dateTime", dateTime);
|
localVarFormParams.put("dateTime", dateTime);
|
||||||
if (password != null)
|
}
|
||||||
|
if (password != null) {
|
||||||
localVarFormParams.put("password", password);
|
localVarFormParams.put("password", password);
|
||||||
if (paramCallback != null)
|
}
|
||||||
|
if (paramCallback != null) {
|
||||||
localVarFormParams.put("callback", paramCallback);
|
localVarFormParams.put("callback", paramCallback);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"http_basic_test"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("FakeApi.testEndpointParameters", "/fake", "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -747,104 +524,71 @@ if (paramCallback != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Query parameters
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
// create path and map variables
|
apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)
|
||||||
String localVarPath = "/fake";
|
);
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
||||||
|
|
||||||
if (enumHeaderStringArray != null)
|
// Header parameters
|
||||||
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
|
if (enumHeaderStringArray != null) {
|
||||||
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
||||||
if (enumHeaderString != null)
|
}
|
||||||
|
if (enumHeaderString != null) {
|
||||||
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form parameters
|
||||||
if (enumFormStringArray != null)
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
|
if (enumFormStringArray != null) {
|
||||||
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
||||||
if (enumFormString != null)
|
}
|
||||||
|
if (enumFormString != null) {
|
||||||
localVarFormParams.put("enum_form_string", enumFormString);
|
localVarFormParams.put("enum_form_string", enumFormString);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
return apiClient.invokeAPI("FakeApi.testEnumParameters", "/fake", "GET", localVarQueryParams, null,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
localVarHeaderParams, new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'requiredStringGroup' is set
|
|
||||||
if (requiredStringGroup == null) {
|
if (requiredStringGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredBooleanGroup' is set
|
|
||||||
if (requiredBooleanGroup == null) {
|
if (requiredBooleanGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredInt64Group' is set
|
|
||||||
if (requiredInt64Group == null) {
|
if (requiredInt64Group == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
||||||
|
|
||||||
if (requiredBooleanGroup != null)
|
// Header parameters
|
||||||
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
if (booleanGroup != null)
|
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
||||||
|
if (booleanGroup != null) {
|
||||||
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
return apiClient.invokeAPI("FakeApi.testGroupParameters", "/fake", "DELETE", localVarQueryParams, null,
|
||||||
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
};
|
null, null, false);
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class APItestGroupParametersRequest {
|
public class APItestGroupParametersRequest {
|
||||||
@@ -989,41 +733,16 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
|
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
|
||||||
Object localVarPostBody = param;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'param' is set
|
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/inline-additionalProperties";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", "/fake/inline-additionalProperties", "POST", new ArrayList<>(), param,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
@@ -1055,50 +774,24 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'param' is set
|
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'param2' is set
|
|
||||||
if (param2 == null) {
|
if (param2 == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/jsonFormData";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
localVarFormParams.put("param", param);
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
localVarFormParams.put("param2", param2);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testJsonFormData", "/fake/jsonFormData", "GET", new ArrayList<>(), null,
|
||||||
if (param != null)
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarFormParams.put("param", param);
|
null, null, false);
|
||||||
if (param2 != null)
|
|
||||||
localVarFormParams.put("param2", param2);
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1136,65 +829,36 @@ if (param2 != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pipe' is set
|
|
||||||
if (pipe == null) {
|
if (pipe == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'ioutil' is set
|
|
||||||
if (ioutil == null) {
|
if (ioutil == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'http' is set
|
|
||||||
if (http == null) {
|
if (http == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'url' is set
|
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'context' is set
|
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/test-query-parameters";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "pipe", pipe)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", "/fake/test-query-parameters", "PUT", localVarQueryParams, null,
|
||||||
final String[] localVarAccepts = {
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,17 @@ public class FakeClassnameTags123Api {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake_classname_test";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key_query"};
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", "/fake_classname_test", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -78,40 +79,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.addPet", "/pet", "POST", new ArrayList<>(), body,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -146,43 +123,26 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Header parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (apiKey != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
|
||||||
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
|
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
};
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -216,43 +176,22 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'status' is set
|
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByStatus";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "status", status)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByStatus", "/pet/findByStatus", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -290,43 +229,22 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
|
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'tags' is set
|
|
||||||
if (tags == null) {
|
if (tags == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByTags";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "tags", tags)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<Set<Pet>> localVarReturnType = new GenericType<Set<Pet>>() {};
|
GenericType<Set<Pet>> localVarReturnType = new GenericType<Set<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByTags", "/pet/findByTags", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -362,43 +280,21 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -435,40 +331,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.updatePet", "/pet", "PUT", new ArrayList<>(), body,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -503,45 +375,29 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (name != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
|
||||||
localVarFormParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
}
|
||||||
|
if (status != null) {
|
||||||
localVarFormParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -577,47 +433,30 @@ if (status != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}/uploadImage"
|
String localVarPath = "/pet/{petId}/uploadImage"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (_file != null)
|
}
|
||||||
|
if (_file != null) {
|
||||||
localVarFormParams.put("file", _file);
|
localVarFormParams.put("file", _file);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
"application/json"
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -653,52 +492,31 @@ if (_file != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredFile' is set
|
|
||||||
if (requiredFile == null) {
|
if (requiredFile == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (requiredFile != null)
|
}
|
||||||
localVarFormParams.put("requiredFile", requiredFile);
|
localVarFormParams.put("requiredFile", requiredFile);
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Order;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,42 +76,20 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
@@ -139,37 +118,12 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/store/inventory";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getInventory", "/store/inventory", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -205,44 +159,21 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
@@ -275,42 +206,16 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/store/order";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.placeOrder", "/store/order", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.openapitools.client.model.User;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,41 +75,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUser", "/user", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -138,41 +114,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithArray";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", "/user/createWithArray", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -202,41 +153,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithList";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithListInput", "/user/createWithList", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@@ -268,42 +194,20 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
@@ -338,44 +242,21 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
@@ -410,50 +291,26 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'password' is set
|
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/login";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "username", username)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.loginUser", "/user/login", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@@ -481,36 +338,11 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
return apiClient.invokeAPI("UserApi.logoutUser", "/user/logout", "GET", new ArrayList<>(), null,
|
||||||
String localVarPath = "/user/logout";
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
@@ -544,46 +376,22 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesAnyType {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) {
|
public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesArray {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesArray putAdditionalProperty(String key, List value) {
|
public AdditionalPropertiesArray putAdditionalProperty(String key, List value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, List>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesBoolean {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) {
|
public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Boolean>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesInteger {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) {
|
public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Integer>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesNumber {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) {
|
public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, BigDecimal>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesObject {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) {
|
public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Map>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesString {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesString putAdditionalProperty(String key, String value) {
|
public AdditionalPropertiesString putAdditionalProperty(String key, String value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, String>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -153,14 +153,14 @@ public class Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
mappings.put("Animal", Animal.class);
|
mappings.put("Animal", Animal.class);
|
||||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ public class BigCat extends Cat {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
JSON.registerDiscriminator(BigCat.class, "className", mappings);
|
JSON.registerDiscriminator(BigCat.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,12 +121,12 @@ public class Cat extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ public class Dog extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -43,11 +44,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -70,25 +74,26 @@ import org.openapitools.client.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://petstore.swagger.io:80/v2",
|
"http://petstore.swagger.io:80/v2",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
}};
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -125,7 +130,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("petstore_auth");
|
auth = authMap.get("petstore_auth");
|
||||||
@@ -163,7 +168,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -751,7 +756,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -810,14 +815,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -829,8 +833,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -850,8 +854,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1143,15 +1147,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
null,
|
cookieParams,
|
||||||
method,
|
null,
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1168,7 +1174,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
final int statusCode = response.getStatusInfo().getStatusCode();
|
final int statusCode = response.getStatusInfo().getStatusCode();
|
||||||
|
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1339,10 +1345,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -193,12 +193,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,16 @@ public class AnotherFakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/another-fake/dummy";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.openapitools.client.model.XmlItem;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -81,41 +82,16 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
|
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
|
||||||
Object localVarPostBody = xmlItem;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'xmlItem' is set
|
|
||||||
if (xmlItem == null) {
|
if (xmlItem == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
|
throw new ApiException(400, "Missing the required parameter 'xmlItem' when calling createXmlItem");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/create_xml_item";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.createXmlItem", "/fake/create_xml_item", "POST", new ArrayList<>(), xmlItem,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/xml", "application/xml; charset=utf-8", "application/xml; charset=utf-16", "text/xml", "text/xml; charset=utf-8", "text/xml; charset=utf-16"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.createXmlItem", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -146,38 +122,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/boolean";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", "/fake/outer/boolean", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -208,38 +158,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/composite";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", "/fake/outer/composite", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -270,38 +194,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/number";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", "/fake/outer/number", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -332,38 +230,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/string";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", "/fake/outer/string", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -393,41 +265,16 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
|
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithFileSchema");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-file-schema";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", "/fake/body-with-file-schema", "PUT", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -459,47 +306,24 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
|
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'query' is set
|
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-query-params";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "query", query)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", "/fake/body-with-query-params", "PUT", localVarQueryParams, body,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
@@ -530,43 +354,17 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> testClientModelWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testClientModel");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.testClientModel", "/fake", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@@ -624,83 +422,62 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'number' is set
|
|
||||||
if (number == null) {
|
if (number == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_double' is set
|
|
||||||
if (_double == null) {
|
if (_double == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'patternWithoutDelimiter' is set
|
|
||||||
if (patternWithoutDelimiter == null) {
|
if (patternWithoutDelimiter == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_byte' is set
|
|
||||||
if (_byte == null) {
|
if (_byte == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (integer != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (integer != null)
|
|
||||||
localVarFormParams.put("integer", integer);
|
localVarFormParams.put("integer", integer);
|
||||||
if (int32 != null)
|
}
|
||||||
|
if (int32 != null) {
|
||||||
localVarFormParams.put("int32", int32);
|
localVarFormParams.put("int32", int32);
|
||||||
if (int64 != null)
|
}
|
||||||
|
if (int64 != null) {
|
||||||
localVarFormParams.put("int64", int64);
|
localVarFormParams.put("int64", int64);
|
||||||
if (number != null)
|
}
|
||||||
localVarFormParams.put("number", number);
|
localVarFormParams.put("number", number);
|
||||||
if (_float != null)
|
if (_float != null) {
|
||||||
localVarFormParams.put("float", _float);
|
localVarFormParams.put("float", _float);
|
||||||
if (_double != null)
|
}
|
||||||
localVarFormParams.put("double", _double);
|
localVarFormParams.put("double", _double);
|
||||||
if (string != null)
|
if (string != null) {
|
||||||
localVarFormParams.put("string", string);
|
localVarFormParams.put("string", string);
|
||||||
if (patternWithoutDelimiter != null)
|
}
|
||||||
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
||||||
if (_byte != null)
|
localVarFormParams.put("byte", _byte);
|
||||||
localVarFormParams.put("byte", _byte);
|
if (binary != null) {
|
||||||
if (binary != null)
|
|
||||||
localVarFormParams.put("binary", binary);
|
localVarFormParams.put("binary", binary);
|
||||||
if (date != null)
|
}
|
||||||
|
if (date != null) {
|
||||||
localVarFormParams.put("date", date);
|
localVarFormParams.put("date", date);
|
||||||
if (dateTime != null)
|
}
|
||||||
|
if (dateTime != null) {
|
||||||
localVarFormParams.put("dateTime", dateTime);
|
localVarFormParams.put("dateTime", dateTime);
|
||||||
if (password != null)
|
}
|
||||||
|
if (password != null) {
|
||||||
localVarFormParams.put("password", password);
|
localVarFormParams.put("password", password);
|
||||||
if (paramCallback != null)
|
}
|
||||||
|
if (paramCallback != null) {
|
||||||
localVarFormParams.put("callback", paramCallback);
|
localVarFormParams.put("callback", paramCallback);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"http_basic_test"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("FakeApi.testEndpointParameters", "/fake", "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -747,104 +524,71 @@ if (paramCallback != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Query parameters
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
// create path and map variables
|
apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray)
|
||||||
String localVarPath = "/fake";
|
);
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "enum_query_string_array", enumQueryStringArray));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
||||||
|
|
||||||
if (enumHeaderStringArray != null)
|
// Header parameters
|
||||||
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
|
if (enumHeaderStringArray != null) {
|
||||||
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
||||||
if (enumHeaderString != null)
|
}
|
||||||
|
if (enumHeaderString != null) {
|
||||||
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form parameters
|
||||||
if (enumFormStringArray != null)
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
|
if (enumFormStringArray != null) {
|
||||||
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
||||||
if (enumFormString != null)
|
}
|
||||||
|
if (enumFormString != null) {
|
||||||
localVarFormParams.put("enum_form_string", enumFormString);
|
localVarFormParams.put("enum_form_string", enumFormString);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
return apiClient.invokeAPI("FakeApi.testEnumParameters", "/fake", "GET", localVarQueryParams, null,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
localVarHeaderParams, new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'requiredStringGroup' is set
|
|
||||||
if (requiredStringGroup == null) {
|
if (requiredStringGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredBooleanGroup' is set
|
|
||||||
if (requiredBooleanGroup == null) {
|
if (requiredBooleanGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredInt64Group' is set
|
|
||||||
if (requiredInt64Group == null) {
|
if (requiredInt64Group == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
||||||
|
|
||||||
if (requiredBooleanGroup != null)
|
// Header parameters
|
||||||
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
if (booleanGroup != null)
|
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
||||||
|
if (booleanGroup != null) {
|
||||||
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
return apiClient.invokeAPI("FakeApi.testGroupParameters", "/fake", "DELETE", localVarQueryParams, null,
|
||||||
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
};
|
null, null, false);
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class APItestGroupParametersRequest {
|
public class APItestGroupParametersRequest {
|
||||||
@@ -989,41 +733,16 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
|
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> param) throws ApiException {
|
||||||
Object localVarPostBody = param;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'param' is set
|
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/inline-additionalProperties";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", "/fake/inline-additionalProperties", "POST", new ArrayList<>(), param,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
@@ -1055,50 +774,24 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'param' is set
|
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'param2' is set
|
|
||||||
if (param2 == null) {
|
if (param2 == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/jsonFormData";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
localVarFormParams.put("param", param);
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
localVarFormParams.put("param2", param2);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testJsonFormData", "/fake/jsonFormData", "GET", new ArrayList<>(), null,
|
||||||
if (param != null)
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarFormParams.put("param", param);
|
null, null, false);
|
||||||
if (param2 != null)
|
|
||||||
localVarFormParams.put("param2", param2);
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1136,65 +829,36 @@ if (param2 != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pipe' is set
|
|
||||||
if (pipe == null) {
|
if (pipe == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'ioutil' is set
|
|
||||||
if (ioutil == null) {
|
if (ioutil == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'http' is set
|
|
||||||
if (http == null) {
|
if (http == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'url' is set
|
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'context' is set
|
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/test-query-parameters";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "pipe", pipe)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "pipe", pipe));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", "/fake/test-query-parameters", "PUT", localVarQueryParams, null,
|
||||||
final String[] localVarAccepts = {
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,17 @@ public class FakeClassnameTags123Api {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake_classname_test";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key_query"};
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", "/fake_classname_test", "PATCH", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import java.util.Set;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -78,40 +79,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling addPet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.addPet", "/pet", "POST", new ArrayList<>(), body,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -146,43 +123,26 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Header parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (apiKey != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
|
||||||
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
|
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
};
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -216,43 +176,22 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'status' is set
|
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByStatus";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "status", status)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByStatus", "/pet/findByStatus", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -290,43 +229,22 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
|
public ApiResponse<Set<Pet>> findPetsByTagsWithHttpInfo(Set<String> tags) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'tags' is set
|
|
||||||
if (tags == null) {
|
if (tags == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByTags";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "tags", tags)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<Set<Pet>> localVarReturnType = new GenericType<Set<Pet>>() {};
|
GenericType<Set<Pet>> localVarReturnType = new GenericType<Set<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByTags", "/pet/findByTags", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -362,43 +280,21 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -435,40 +331,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling updatePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.updatePet", "/pet", "PUT", new ArrayList<>(), body,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -503,45 +375,29 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (name != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
|
||||||
localVarFormParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
}
|
||||||
|
if (status != null) {
|
||||||
localVarFormParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -577,47 +433,30 @@ if (status != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}/uploadImage"
|
String localVarPath = "/pet/{petId}/uploadImage"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (_file != null)
|
}
|
||||||
|
if (_file != null) {
|
||||||
localVarFormParams.put("file", _file);
|
localVarFormParams.put("file", _file);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
"application/json"
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -653,52 +492,31 @@ if (_file != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredFile' is set
|
|
||||||
if (requiredFile == null) {
|
if (requiredFile == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (requiredFile != null)
|
}
|
||||||
localVarFormParams.put("requiredFile", requiredFile);
|
localVarFormParams.put("requiredFile", requiredFile);
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Order;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,42 +76,20 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
@@ -139,37 +118,12 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/store/inventory";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getInventory", "/store/inventory", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -205,44 +159,21 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
@@ -275,42 +206,16 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/store/order";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.placeOrder", "/store/order", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.openapitools.client.model.User;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,41 +75,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUser", "/user", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -138,41 +114,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithArray";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", "/user/createWithArray", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -202,41 +153,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithList";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithListInput", "/user/createWithList", "POST", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@@ -268,42 +194,20 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
@@ -338,44 +242,21 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
@@ -410,50 +291,26 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'password' is set
|
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/login";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "username", username)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.loginUser", "/user/login", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@@ -481,36 +338,11 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
return apiClient.invokeAPI("UserApi.logoutUser", "/user/logout", "GET", new ArrayList<>(), null,
|
||||||
String localVarPath = "/user/logout";
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
@@ -544,46 +376,22 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'body' is set
|
|
||||||
if (body == null) {
|
if (body == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", new ArrayList<>(), body,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesAnyType {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) {
|
public AdditionalPropertiesAnyType putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesArray {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesArray putAdditionalProperty(String key, List value) {
|
public AdditionalPropertiesArray putAdditionalProperty(String key, List value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, List>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesBoolean {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) {
|
public AdditionalPropertiesBoolean putAdditionalProperty(String key, Boolean value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Boolean>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesInteger {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) {
|
public AdditionalPropertiesInteger putAdditionalProperty(String key, Integer value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Integer>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesNumber {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) {
|
public AdditionalPropertiesNumber putAdditionalProperty(String key, BigDecimal value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, BigDecimal>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ public class AdditionalPropertiesObject {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) {
|
public AdditionalPropertiesObject putAdditionalProperty(String key, Map value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Map>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class AdditionalPropertiesString {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public AdditionalPropertiesString putAdditionalProperty(String key, String value) {
|
public AdditionalPropertiesString putAdditionalProperty(String key, String value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, String>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -153,14 +153,14 @@ public class Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
mappings.put("Animal", Animal.class);
|
mappings.put("Animal", Animal.class);
|
||||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -156,11 +156,11 @@ public class BigCat extends Cat {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
JSON.registerDiscriminator(BigCat.class, "className", mappings);
|
JSON.registerDiscriminator(BigCat.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -121,12 +121,12 @@ public class Cat extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BigCat", BigCat.class);
|
mappings.put("BigCat", BigCat.class);
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -117,11 +117,11 @@ public class Dog extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -43,11 +44,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -71,94 +75,93 @@ import org.openapitools.client.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://{server}.swagger.io:{port}/v2",
|
"http://{server}.swagger.io:{port}/v2",
|
||||||
"petstore server",
|
"petstore server",
|
||||||
new HashMap<String, ServerVariable>() {{
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
put("server", new ServerVariable(
|
new SimpleEntry<>("server", new ServerVariable(
|
||||||
"No description provided",
|
"No description provided",
|
||||||
"petstore",
|
"petstore",
|
||||||
new HashSet<String>(
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
Arrays.asList(
|
"petstore",
|
||||||
"petstore",
|
"qa-petstore",
|
||||||
"qa-petstore",
|
"dev-petstore"
|
||||||
"dev-petstore"
|
))
|
||||||
)
|
)),
|
||||||
|
new SimpleEntry<>("port", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"80",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"80",
|
||||||
|
"8080"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"https://localhost:8080/{version}",
|
||||||
|
"The local server",
|
||||||
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
|
new SimpleEntry<>("version", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"v2",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"v1",
|
||||||
|
"v2"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"https://127.0.0.1/no_variable",
|
||||||
|
"The local server without variables",
|
||||||
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
|
||||||
put("port", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"80",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"80",
|
|
||||||
"8080"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
),
|
|
||||||
new ServerConfiguration(
|
|
||||||
"https://localhost:8080/{version}",
|
|
||||||
"The local server",
|
|
||||||
new HashMap<String, ServerVariable>() {{
|
|
||||||
put("version", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"v2",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"v1",
|
|
||||||
"v2"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
),
|
|
||||||
new ServerConfiguration(
|
|
||||||
"https://127.0.0.1/no_variable",
|
|
||||||
"The local server without variables",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
)
|
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers;
|
||||||
put("PetApi.addPet", new ArrayList<ServerConfiguration>(Arrays.asList(
|
|
||||||
new ServerConfiguration(
|
|
||||||
"http://petstore.swagger.io/v2",
|
|
||||||
"No description provided",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
),
|
|
||||||
|
|
||||||
new ServerConfiguration(
|
{
|
||||||
"http://path-server-test.petstore.local/v2",
|
Map<String, List<ServerConfiguration>> operationServers = new LinkedHashMap<>();
|
||||||
"No description provided",
|
operationServers.put("PetApi.addPet", new ArrayList<>(Arrays.asList(
|
||||||
new HashMap<String, ServerVariable>()
|
new ServerConfiguration(
|
||||||
)
|
"http://petstore.swagger.io/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"http://path-server-test.petstore.local/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
)
|
||||||
)));
|
)));
|
||||||
put("PetApi.updatePet", new ArrayList<ServerConfiguration>(Arrays.asList(
|
operationServers.put("PetApi.updatePet", new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://petstore.swagger.io/v2",
|
"http://petstore.swagger.io/v2",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
),
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"http://path-server-test.petstore.local/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
)
|
||||||
|
)));
|
||||||
|
this.operationServers = operationServers;
|
||||||
|
}
|
||||||
|
|
||||||
new ServerConfiguration(
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
"http://path-server-test.petstore.local/v2",
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
"No description provided",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
)
|
|
||||||
)));
|
|
||||||
}};
|
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -195,7 +198,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("petstore_auth");
|
auth = authMap.get("petstore_auth");
|
||||||
@@ -247,7 +250,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -835,7 +838,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -894,14 +897,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -913,8 +915,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -934,8 +936,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1227,15 +1229,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
cookieParams,
|
||||||
method,
|
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1252,7 +1256,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
final int statusCode = response.getStatusInfo().getStatusCode();
|
final int statusCode = response.getStatusInfo().getStatusCode();
|
||||||
|
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1423,10 +1427,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -193,12 +193,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,16 @@ public class AnotherFakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
|
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
|
||||||
Object localVarPostBody = client;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'client' is set
|
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags");
|
throw new ApiException(400, "Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/another-fake/dummy";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", "/another-fake/dummy", "PATCH", new ArrayList<>(), client,
|
||||||
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.FooGetDefaultResponse;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -72,37 +73,11 @@ public class DefaultApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<FooGetDefaultResponse> fooGetWithHttpInfo() throws ApiException {
|
public ApiResponse<FooGetDefaultResponse> fooGetWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/foo";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<FooGetDefaultResponse> localVarReturnType = new GenericType<FooGetDefaultResponse>() {};
|
GenericType<FooGetDefaultResponse> localVarReturnType = new GenericType<FooGetDefaultResponse>() {};
|
||||||
|
return apiClient.invokeAPI("DefaultApi.fooGet", "/foo", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.openapitools.client.model.User;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -81,38 +82,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<HealthCheckResult> fakeHealthGetWithHttpInfo() throws ApiException {
|
public ApiResponse<HealthCheckResult> fakeHealthGetWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/health";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<HealthCheckResult> localVarReturnType = new GenericType<HealthCheckResult>() {};
|
GenericType<HealthCheckResult> localVarReturnType = new GenericType<HealthCheckResult>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeHealthGet", "/fake/health", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeHealthGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -143,38 +118,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
public ApiResponse<Boolean> fakeOuterBooleanSerializeWithHttpInfo(Boolean body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/boolean";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
GenericType<Boolean> localVarReturnType = new GenericType<Boolean>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", "/fake/outer/boolean", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterBooleanSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -205,38 +154,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException {
|
public ApiResponse<OuterComposite> fakeOuterCompositeSerializeWithHttpInfo(OuterComposite outerComposite) throws ApiException {
|
||||||
Object localVarPostBody = outerComposite;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/composite";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
GenericType<OuterComposite> localVarReturnType = new GenericType<OuterComposite>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", "/fake/outer/composite", "POST", new ArrayList<>(), outerComposite,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterCompositeSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -267,38 +190,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
public ApiResponse<BigDecimal> fakeOuterNumberSerializeWithHttpInfo(BigDecimal body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/number";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
GenericType<BigDecimal> localVarReturnType = new GenericType<BigDecimal>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", "/fake/outer/number", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterNumberSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -329,38 +226,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
public ApiResponse<String> fakeOuterStringSerializeWithHttpInfo(String body) throws ApiException {
|
||||||
Object localVarPostBody = body;
|
String localVarAccept = apiClient.selectHeaderAccept("*/*");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/outer/string";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"*/*"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", "/fake/outer/string", "POST", new ArrayList<>(), body,
|
||||||
return apiClient.invokeAPI("FakeApi.fakeOuterStringSerialize", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Array of Enums
|
* Array of Enums
|
||||||
@@ -389,38 +260,12 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<List<OuterEnum>> getArrayOfEnumsWithHttpInfo() throws ApiException {
|
public ApiResponse<List<OuterEnum>> getArrayOfEnumsWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/array-of-enums";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<List<OuterEnum>> localVarReturnType = new GenericType<List<OuterEnum>>() {};
|
GenericType<List<OuterEnum>> localVarReturnType = new GenericType<List<OuterEnum>>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.getArrayOfEnums", "/fake/array-of-enums", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("FakeApi.getArrayOfEnums", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -450,41 +295,16 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
|
public ApiResponse<Void> testBodyWithFileSchemaWithHttpInfo(FileSchemaTestClass fileSchemaTestClass) throws ApiException {
|
||||||
Object localVarPostBody = fileSchemaTestClass;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'fileSchemaTestClass' is set
|
|
||||||
if (fileSchemaTestClass == null) {
|
if (fileSchemaTestClass == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
throw new ApiException(400, "Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-file-schema";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", "/fake/body-with-file-schema", "PUT", new ArrayList<>(), fileSchemaTestClass,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithFileSchema", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -516,47 +336,24 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException {
|
public ApiResponse<Void> testBodyWithQueryParamsWithHttpInfo(String query, User user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'query' is set
|
|
||||||
if (query == null) {
|
if (query == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'query' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling testBodyWithQueryParams");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/body-with-query-params";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "query", query)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", "/fake/body-with-query-params", "PUT", localVarQueryParams, user,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testBodyWithQueryParams", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* To test \"client\" model
|
* To test \"client\" model
|
||||||
@@ -587,43 +384,17 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClientModelWithHttpInfo(Client client) throws ApiException {
|
public ApiResponse<Client> testClientModelWithHttpInfo(Client client) throws ApiException {
|
||||||
Object localVarPostBody = client;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'client' is set
|
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel");
|
throw new ApiException(400, "Missing the required parameter 'client' when calling testClientModel");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeApi.testClientModel", "/fake", "PATCH", new ArrayList<>(), client,
|
||||||
return apiClient.invokeAPI("FakeApi.testClientModel", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||||
@@ -681,83 +452,62 @@ public class FakeApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
public ApiResponse<Void> testEndpointParametersWithHttpInfo(BigDecimal number, Double _double, String patternWithoutDelimiter, byte[] _byte, Integer integer, Integer int32, Long int64, Float _float, String string, File binary, LocalDate date, OffsetDateTime dateTime, String password, String paramCallback) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'number' is set
|
|
||||||
if (number == null) {
|
if (number == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'number' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_double' is set
|
|
||||||
if (_double == null) {
|
if (_double == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_double' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'patternWithoutDelimiter' is set
|
|
||||||
if (patternWithoutDelimiter == null) {
|
if (patternWithoutDelimiter == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter 'patternWithoutDelimiter' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter '_byte' is set
|
|
||||||
if (_byte == null) {
|
if (_byte == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
throw new ApiException(400, "Missing the required parameter '_byte' when calling testEndpointParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (integer != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (integer != null)
|
|
||||||
localVarFormParams.put("integer", integer);
|
localVarFormParams.put("integer", integer);
|
||||||
if (int32 != null)
|
}
|
||||||
|
if (int32 != null) {
|
||||||
localVarFormParams.put("int32", int32);
|
localVarFormParams.put("int32", int32);
|
||||||
if (int64 != null)
|
}
|
||||||
|
if (int64 != null) {
|
||||||
localVarFormParams.put("int64", int64);
|
localVarFormParams.put("int64", int64);
|
||||||
if (number != null)
|
}
|
||||||
localVarFormParams.put("number", number);
|
localVarFormParams.put("number", number);
|
||||||
if (_float != null)
|
if (_float != null) {
|
||||||
localVarFormParams.put("float", _float);
|
localVarFormParams.put("float", _float);
|
||||||
if (_double != null)
|
}
|
||||||
localVarFormParams.put("double", _double);
|
localVarFormParams.put("double", _double);
|
||||||
if (string != null)
|
if (string != null) {
|
||||||
localVarFormParams.put("string", string);
|
localVarFormParams.put("string", string);
|
||||||
if (patternWithoutDelimiter != null)
|
}
|
||||||
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
localVarFormParams.put("pattern_without_delimiter", patternWithoutDelimiter);
|
||||||
if (_byte != null)
|
localVarFormParams.put("byte", _byte);
|
||||||
localVarFormParams.put("byte", _byte);
|
if (binary != null) {
|
||||||
if (binary != null)
|
|
||||||
localVarFormParams.put("binary", binary);
|
localVarFormParams.put("binary", binary);
|
||||||
if (date != null)
|
}
|
||||||
|
if (date != null) {
|
||||||
localVarFormParams.put("date", date);
|
localVarFormParams.put("date", date);
|
||||||
if (dateTime != null)
|
}
|
||||||
|
if (dateTime != null) {
|
||||||
localVarFormParams.put("dateTime", dateTime);
|
localVarFormParams.put("dateTime", dateTime);
|
||||||
if (password != null)
|
}
|
||||||
|
if (password != null) {
|
||||||
localVarFormParams.put("password", password);
|
localVarFormParams.put("password", password);
|
||||||
if (paramCallback != null)
|
}
|
||||||
|
if (paramCallback != null) {
|
||||||
localVarFormParams.put("callback", paramCallback);
|
localVarFormParams.put("callback", paramCallback);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"http_basic_test"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("FakeApi.testEndpointParameters", "/fake", "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "http_basic_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEndpointParameters", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -804,103 +554,71 @@ if (paramCallback != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
public ApiResponse<Void> testEnumParametersWithHttpInfo(List<String> enumHeaderStringArray, String enumHeaderString, List<String> enumQueryStringArray, String enumQueryString, Integer enumQueryInteger, Double enumQueryDouble, List<String> enumFormStringArray, String enumFormString) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Query parameters
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
// create path and map variables
|
apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray)
|
||||||
String localVarPath = "/fake";
|
);
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "enum_query_string_array", enumQueryStringArray));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_string", enumQueryString));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_integer", enumQueryInteger));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "enum_query_double", enumQueryDouble));
|
||||||
|
|
||||||
if (enumHeaderStringArray != null)
|
// Header parameters
|
||||||
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
|
if (enumHeaderStringArray != null) {
|
||||||
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
localVarHeaderParams.put("enum_header_string_array", apiClient.parameterToString(enumHeaderStringArray));
|
||||||
if (enumHeaderString != null)
|
}
|
||||||
|
if (enumHeaderString != null) {
|
||||||
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
localVarHeaderParams.put("enum_header_string", apiClient.parameterToString(enumHeaderString));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Form parameters
|
||||||
if (enumFormStringArray != null)
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
|
if (enumFormStringArray != null) {
|
||||||
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
localVarFormParams.put("enum_form_string_array", enumFormStringArray);
|
||||||
if (enumFormString != null)
|
}
|
||||||
|
if (enumFormString != null) {
|
||||||
localVarFormParams.put("enum_form_string", enumFormString);
|
localVarFormParams.put("enum_form_string", enumFormString);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
return apiClient.invokeAPI("FakeApi.testEnumParameters", "/fake", "GET", localVarQueryParams, null,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
localVarHeaderParams, new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testEnumParameters", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
private ApiResponse<Void> testGroupParametersWithHttpInfo(Integer requiredStringGroup, Boolean requiredBooleanGroup, Long requiredInt64Group, Integer stringGroup, Boolean booleanGroup, Long int64Group) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'requiredStringGroup' is set
|
|
||||||
if (requiredStringGroup == null) {
|
if (requiredStringGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredStringGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredBooleanGroup' is set
|
|
||||||
if (requiredBooleanGroup == null) {
|
if (requiredBooleanGroup == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredBooleanGroup' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredInt64Group' is set
|
|
||||||
if (requiredInt64Group == null) {
|
if (requiredInt64Group == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
throw new ApiException(400, "Missing the required parameter 'requiredInt64Group' when calling testGroupParameters");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "required_string_group", requiredStringGroup)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_string_group", requiredStringGroup));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "required_int64_group", requiredInt64Group));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "string_group", stringGroup));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "int64_group", int64Group));
|
||||||
|
|
||||||
if (requiredBooleanGroup != null)
|
// Header parameters
|
||||||
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
if (booleanGroup != null)
|
localVarHeaderParams.put("required_boolean_group", apiClient.parameterToString(requiredBooleanGroup));
|
||||||
|
if (booleanGroup != null) {
|
||||||
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
localVarHeaderParams.put("boolean_group", apiClient.parameterToString(booleanGroup));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
String[] localVarAuthNames = new String[] {"bearer_test"};
|
||||||
|
return apiClient.invokeAPI("FakeApi.testGroupParameters", "/fake", "DELETE", localVarQueryParams, null,
|
||||||
};
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "bearer_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testGroupParameters", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1046,41 +764,16 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> requestBody) throws ApiException {
|
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Map<String, String> requestBody) throws ApiException {
|
||||||
Object localVarPostBody = requestBody;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'requestBody' is set
|
|
||||||
if (requestBody == null) {
|
if (requestBody == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
|
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/inline-additionalProperties";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", "/fake/inline-additionalProperties", "POST", new ArrayList<>(), requestBody,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testInlineAdditionalProperties", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* test json serialization of form data
|
* test json serialization of form data
|
||||||
@@ -1112,50 +805,24 @@ if (booleanGroup != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
public ApiResponse<Void> testJsonFormDataWithHttpInfo(String param, String param2) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'param' is set
|
|
||||||
if (param == null) {
|
if (param == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'param2' is set
|
|
||||||
if (param2 == null) {
|
if (param2 == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
throw new ApiException(400, "Missing the required parameter 'param2' when calling testJsonFormData");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/jsonFormData";
|
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
localVarFormParams.put("param", param);
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
localVarFormParams.put("param2", param2);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
|
return apiClient.invokeAPI("FakeApi.testJsonFormData", "/fake/jsonFormData", "GET", new ArrayList<>(), null,
|
||||||
if (param != null)
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarFormParams.put("param", param);
|
null, null, false);
|
||||||
if (param2 != null)
|
|
||||||
localVarFormParams.put("param2", param2);
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testJsonFormData", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -1193,65 +860,36 @@ if (param2 != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
public ApiResponse<Void> testQueryParameterCollectionFormatWithHttpInfo(List<String> pipe, List<String> ioutil, List<String> http, List<String> url, List<String> context) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pipe' is set
|
|
||||||
if (pipe == null) {
|
if (pipe == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'pipe' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'ioutil' is set
|
|
||||||
if (ioutil == null) {
|
if (ioutil == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'ioutil' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'http' is set
|
|
||||||
if (http == null) {
|
if (http == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'http' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'url' is set
|
|
||||||
if (url == null) {
|
if (url == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'url' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'context' is set
|
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
throw new ApiException(400, "Missing the required parameter 'context' when calling testQueryParameterCollectionFormat");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake/test-query-parameters";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("multi", "pipe", pipe)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "pipe", pipe));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url));
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", "/fake/test-query-parameters", "PUT", localVarQueryParams, null,
|
||||||
final String[] localVarAccepts = {
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("FakeApi.testQueryParameterCollectionFormat", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Client;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,42 +75,17 @@ public class FakeClassnameTags123Api {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client client) throws ApiException {
|
public ApiResponse<Client> testClassnameWithHttpInfo(Client client) throws ApiException {
|
||||||
Object localVarPostBody = client;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'client' is set
|
|
||||||
if (client == null) {
|
if (client == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname");
|
throw new ApiException(400, "Missing the required parameter 'client' when calling testClassname");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/fake_classname_test";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key_query"};
|
||||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||||
|
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", "/fake_classname_test", "PATCH", new ArrayList<>(), client,
|
||||||
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.openapitools.client.model.Pet;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,40 +76,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> addPetWithHttpInfo(Pet pet) throws ApiException {
|
public ApiResponse<Void> addPetWithHttpInfo(Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = pet;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pet' is set
|
|
||||||
if (pet == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth", "http_signature_test"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.addPet", "/pet", "POST", new ArrayList<>(), pet,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth", "http_signature_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -141,43 +118,26 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Header parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (apiKey != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
|
||||||
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
|
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
};
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -211,43 +171,22 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'status' is set
|
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByStatus";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "status", status)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth", "http_signature_test" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth", "http_signature_test"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByStatus", "/pet/findByStatus", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -285,43 +224,22 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'tags' is set
|
|
||||||
if (tags == null) {
|
if (tags == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByTags";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "tags", tags)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth", "http_signature_test" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth", "http_signature_test"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByTags", "/pet/findByTags", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -357,43 +275,21 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -428,40 +324,16 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithHttpInfo(Pet pet) throws ApiException {
|
public ApiResponse<Void> updatePetWithHttpInfo(Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = pet;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pet' is set
|
|
||||||
if (pet == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"petstore_auth", "http_signature_test"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("PetApi.updatePet", "/pet", "PUT", new ArrayList<>(), pet,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth", "http_signature_test" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -496,45 +368,29 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (name != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
|
||||||
localVarFormParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
}
|
||||||
|
if (status != null) {
|
||||||
localVarFormParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -570,47 +426,30 @@ if (status != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}/uploadImage"
|
String localVarPath = "/pet/{petId}/uploadImage"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (_file != null)
|
}
|
||||||
|
if (_file != null) {
|
||||||
localVarFormParams.put("file", _file);
|
localVarFormParams.put("file", _file);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
"application/json"
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -646,52 +485,31 @@ if (_file != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'requiredFile' is set
|
|
||||||
if (requiredFile == null) {
|
if (requiredFile == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
String localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (requiredFile != null)
|
}
|
||||||
localVarFormParams.put("requiredFile", requiredFile);
|
localVarFormParams.put("requiredFile", requiredFile);
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFileWithRequiredFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Order;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,42 +76,20 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
@@ -139,37 +118,12 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/store/inventory";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getInventory", "/store/inventory", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -205,44 +159,21 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{order_id}"
|
String localVarPath = "/store/order/{order_id}"
|
||||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{order_id}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
@@ -275,42 +206,16 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
|
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
|
||||||
Object localVarPostBody = order;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'order' is set
|
|
||||||
if (order == null) {
|
if (order == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
|
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/store/order";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.placeOrder", "/store/order", "POST", new ArrayList<>(), order,
|
||||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.openapitools.client.model.User;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,41 +75,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
|
public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUser", "/user", "POST", new ArrayList<>(), user,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -138,41 +114,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user) throws ApiException {
|
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithArray";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", "/user/createWithArray", "POST", new ArrayList<>(), user,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Creates list of users with given input array
|
* Creates list of users with given input array
|
||||||
@@ -202,41 +153,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user) throws ApiException {
|
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithList";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithListInput", "/user/createWithList", "POST", new ArrayList<>(), user,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Delete user
|
* Delete user
|
||||||
@@ -268,42 +194,20 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Get user by user name
|
* Get user by user name
|
||||||
@@ -338,44 +242,21 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
@@ -410,50 +291,26 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'password' is set
|
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/login";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "username", username)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.loginUser", "/user/login", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@@ -481,36 +338,11 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
return apiClient.invokeAPI("UserApi.logoutUser", "/user/logout", "GET", new ArrayList<>(), null,
|
||||||
String localVarPath = "/user/logout";
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
null, null, false);
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Updated user
|
* Updated user
|
||||||
@@ -544,46 +376,22 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
|
public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", new ArrayList<>(), user,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -151,13 +151,13 @@ public class Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
mappings.put("Animal", Animal.class);
|
mappings.put("Animal", Animal.class);
|
||||||
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
JSON.registerDiscriminator(Animal.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class Cat extends Animal {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Cat putAdditionalProperty(String key, Object value) {
|
public Cat putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -160,11 +160,11 @@ public class Cat extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Cat", Cat.class);
|
mappings.put("Cat", Cat.class);
|
||||||
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
JSON.registerDiscriminator(Cat.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public class ChildCat extends ParentPet {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ChildCat putAdditionalProperty(String key, Object value) {
|
public ChildCat putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -205,11 +205,11 @@ public class ChildCat extends ParentPet {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ChildCat", ChildCat.class);
|
mappings.put("ChildCat", ChildCat.class);
|
||||||
JSON.registerDiscriminator(ChildCat.class, "pet_type", mappings);
|
JSON.registerDiscriminator(ChildCat.class, "pet_type", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class ComplexQuadrilateral {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ComplexQuadrilateral putAdditionalProperty(String key, Object value) {
|
public ComplexQuadrilateral putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class Dog extends Animal {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Dog putAdditionalProperty(String key, Object value) {
|
public Dog putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -160,11 +160,11 @@ public class Dog extends Animal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Dog", Dog.class);
|
mappings.put("Dog", Dog.class);
|
||||||
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
JSON.registerDiscriminator(Dog.class, "className", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ public class Drawing {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Drawing putAdditionalProperty(String key, Fruit value) {
|
public Drawing putAdditionalProperty(String key, Fruit value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Fruit>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class EquilateralTriangle {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public EquilateralTriangle putAdditionalProperty(String key, Object value) {
|
public EquilateralTriangle putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ public class Fruit extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Fruit() {
|
public Fruit() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -201,12 +201,12 @@ public class Fruit extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(Apple.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Apple.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Banana.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Banana.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ public class FruitReq extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public FruitReq() {
|
public FruitReq() {
|
||||||
super("oneOf", Boolean.TRUE);
|
super("oneOf", Boolean.TRUE);
|
||||||
@@ -208,12 +208,12 @@ public class FruitReq extends AbstractOpenApiSchema {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(AppleReq.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(AppleReq.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(BananaReq.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(BananaReq.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ public class GmFruit extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in anyOf
|
// store a list of schema names defined in anyOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public GmFruit() {
|
public GmFruit() {
|
||||||
super("anyOf", Boolean.FALSE);
|
super("anyOf", Boolean.FALSE);
|
||||||
@@ -161,12 +161,12 @@ public class GmFruit extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(Apple.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Apple.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Banana.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Banana.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,13 +120,13 @@ public class GrandparentAnimal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ChildCat", ChildCat.class);
|
mappings.put("ChildCat", ChildCat.class);
|
||||||
mappings.put("ParentPet", ParentPet.class);
|
mappings.put("ParentPet", ParentPet.class);
|
||||||
mappings.put("GrandparentAnimal", GrandparentAnimal.class);
|
mappings.put("GrandparentAnimal", GrandparentAnimal.class);
|
||||||
JSON.registerDiscriminator(GrandparentAnimal.class, "pet_type", mappings);
|
JSON.registerDiscriminator(GrandparentAnimal.class, "pet_type", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public class Mammal extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Mammal() {
|
public Mammal() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -234,7 +234,7 @@ public class Mammal extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Mammal putAdditionalProperty(String key, Object value) {
|
public Mammal putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -294,7 +294,7 @@ public class Mammal extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(Mammal.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(Mammal.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Pig", Pig.class);
|
mappings.put("Pig", Pig.class);
|
||||||
mappings.put("whale", Whale.class);
|
mappings.put("whale", Whale.class);
|
||||||
mappings.put("zebra", Zebra.class);
|
mappings.put("zebra", Zebra.class);
|
||||||
@@ -317,17 +317,17 @@ public class Mammal extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(Pig.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Pig.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Whale.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Whale.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Zebra.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Zebra.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ public class NullableClass {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public NullableClass putAdditionalProperty(String key, Object value) {
|
public NullableClass putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class NullableShape extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public NullableShape() {
|
public NullableShape() {
|
||||||
super("oneOf", Boolean.TRUE);
|
super("oneOf", Boolean.TRUE);
|
||||||
@@ -205,7 +205,7 @@ public class NullableShape extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public NullableShape putAdditionalProperty(String key, Object value) {
|
public NullableShape putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -258,7 +258,7 @@ public class NullableShape extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(NullableShape.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(NullableShape.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Quadrilateral", Quadrilateral.class);
|
mappings.put("Quadrilateral", Quadrilateral.class);
|
||||||
mappings.put("Triangle", Triangle.class);
|
mappings.put("Triangle", Triangle.class);
|
||||||
mappings.put("NullableShape", NullableShape.class);
|
mappings.put("NullableShape", NullableShape.class);
|
||||||
@@ -285,12 +285,12 @@ public class NullableShape extends AbstractOpenApiSchema {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public class ParentPet extends GrandparentAnimal {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ParentPet putAdditionalProperty(String key, Object value) {
|
public ParentPet putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -131,12 +131,12 @@ public class ParentPet extends GrandparentAnimal {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ChildCat", ChildCat.class);
|
mappings.put("ChildCat", ChildCat.class);
|
||||||
mappings.put("ParentPet", ParentPet.class);
|
mappings.put("ParentPet", ParentPet.class);
|
||||||
JSON.registerDiscriminator(ParentPet.class, "pet_type", mappings);
|
JSON.registerDiscriminator(ParentPet.class, "pet_type", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class Pig extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Pig() {
|
public Pig() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -203,7 +203,7 @@ public class Pig extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Pig putAdditionalProperty(String key, Object value) {
|
public Pig putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -256,7 +256,7 @@ public class Pig extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(Pig.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(Pig.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("BasquePig", BasquePig.class);
|
mappings.put("BasquePig", BasquePig.class);
|
||||||
mappings.put("DanishPig", DanishPig.class);
|
mappings.put("DanishPig", DanishPig.class);
|
||||||
mappings.put("Pig", Pig.class);
|
mappings.put("Pig", Pig.class);
|
||||||
@@ -278,12 +278,12 @@ public class Pig extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(BasquePig.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(BasquePig.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(DanishPig.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(DanishPig.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class Quadrilateral extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Quadrilateral() {
|
public Quadrilateral() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -203,7 +203,7 @@ public class Quadrilateral extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Quadrilateral putAdditionalProperty(String key, Object value) {
|
public Quadrilateral putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -256,7 +256,7 @@ public class Quadrilateral extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(Quadrilateral.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(Quadrilateral.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ComplexQuadrilateral", ComplexQuadrilateral.class);
|
mappings.put("ComplexQuadrilateral", ComplexQuadrilateral.class);
|
||||||
mappings.put("SimpleQuadrilateral", SimpleQuadrilateral.class);
|
mappings.put("SimpleQuadrilateral", SimpleQuadrilateral.class);
|
||||||
mappings.put("Quadrilateral", Quadrilateral.class);
|
mappings.put("Quadrilateral", Quadrilateral.class);
|
||||||
@@ -278,12 +278,12 @@ public class Quadrilateral extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(ComplexQuadrilateral.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(ComplexQuadrilateral.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(SimpleQuadrilateral.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(SimpleQuadrilateral.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class ScaleneTriangle {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ScaleneTriangle putAdditionalProperty(String key, Object value) {
|
public ScaleneTriangle putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ public class Shape extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Shape() {
|
public Shape() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -203,7 +203,7 @@ public class Shape extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Shape putAdditionalProperty(String key, Object value) {
|
public Shape putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -256,7 +256,7 @@ public class Shape extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(Shape.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(Shape.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Quadrilateral", Quadrilateral.class);
|
mappings.put("Quadrilateral", Quadrilateral.class);
|
||||||
mappings.put("Triangle", Triangle.class);
|
mappings.put("Triangle", Triangle.class);
|
||||||
mappings.put("Shape", Shape.class);
|
mappings.put("Shape", Shape.class);
|
||||||
@@ -278,12 +278,12 @@ public class Shape extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public ShapeOrNull() {
|
public ShapeOrNull() {
|
||||||
super("oneOf", Boolean.TRUE);
|
super("oneOf", Boolean.TRUE);
|
||||||
@@ -205,7 +205,7 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ShapeOrNull putAdditionalProperty(String key, Object value) {
|
public ShapeOrNull putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -258,7 +258,7 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(ShapeOrNull.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(ShapeOrNull.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("Quadrilateral", Quadrilateral.class);
|
mappings.put("Quadrilateral", Quadrilateral.class);
|
||||||
mappings.put("Triangle", Triangle.class);
|
mappings.put("Triangle", Triangle.class);
|
||||||
mappings.put("ShapeOrNull", ShapeOrNull.class);
|
mappings.put("ShapeOrNull", ShapeOrNull.class);
|
||||||
@@ -285,12 +285,12 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Quadrilateral.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(Triangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ public class SimpleQuadrilateral {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public SimpleQuadrilateral putAdditionalProperty(String key, Object value) {
|
public SimpleQuadrilateral putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ public class Triangle extends AbstractOpenApiSchema {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store a list of schema names defined in oneOf
|
// store a list of schema names defined in oneOf
|
||||||
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
|
public static final Map<String, GenericType> schemas = new HashMap<>();
|
||||||
|
|
||||||
public Triangle() {
|
public Triangle() {
|
||||||
super("oneOf", Boolean.FALSE);
|
super("oneOf", Boolean.FALSE);
|
||||||
@@ -234,7 +234,7 @@ public class Triangle extends AbstractOpenApiSchema {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Triangle putAdditionalProperty(String key, Object value) {
|
public Triangle putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -294,7 +294,7 @@ public class Triangle extends AbstractOpenApiSchema {
|
|||||||
});
|
});
|
||||||
JSON.registerDescendants(Triangle.class, Collections.unmodifiableMap(schemas));
|
JSON.registerDescendants(Triangle.class, Collections.unmodifiableMap(schemas));
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("EquilateralTriangle", EquilateralTriangle.class);
|
mappings.put("EquilateralTriangle", EquilateralTriangle.class);
|
||||||
mappings.put("IsoscelesTriangle", IsoscelesTriangle.class);
|
mappings.put("IsoscelesTriangle", IsoscelesTriangle.class);
|
||||||
mappings.put("ScaleneTriangle", ScaleneTriangle.class);
|
mappings.put("ScaleneTriangle", ScaleneTriangle.class);
|
||||||
@@ -317,17 +317,17 @@ public class Triangle extends AbstractOpenApiSchema {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setActualInstance(Object instance) {
|
public void setActualInstance(Object instance) {
|
||||||
if (JSON.isInstanceOf(EquilateralTriangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(EquilateralTriangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(IsoscelesTriangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(IsoscelesTriangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (JSON.isInstanceOf(ScaleneTriangle.class, instance, new HashSet<Class<?>>())) {
|
if (JSON.isInstanceOf(ScaleneTriangle.class, instance, new HashSet<>())) {
|
||||||
super.setActualInstance(instance);
|
super.setActualInstance(instance);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ public class Zebra {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public Zebra putAdditionalProperty(String key, Object value) {
|
public Zebra putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -42,11 +43,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -68,63 +72,58 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://{server}.swagger.io:{port}/v2",
|
"http://{server}.swagger.io:{port}/v2",
|
||||||
"petstore server",
|
"petstore server",
|
||||||
new HashMap<String, ServerVariable>() {{
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
put("server", new ServerVariable(
|
new SimpleEntry<>("server", new ServerVariable(
|
||||||
"No description provided",
|
"No description provided",
|
||||||
"petstore",
|
"petstore",
|
||||||
new HashSet<String>(
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
Arrays.asList(
|
"petstore",
|
||||||
"petstore",
|
"qa-petstore",
|
||||||
"qa-petstore",
|
"dev-petstore"
|
||||||
"dev-petstore"
|
))
|
||||||
)
|
)),
|
||||||
|
new SimpleEntry<>("port", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"80",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"80",
|
||||||
|
"8080"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"https://localhost:8080/{version}",
|
||||||
|
"The local server",
|
||||||
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
|
new SimpleEntry<>("version", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"v2",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"v1",
|
||||||
|
"v2"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
)
|
)
|
||||||
));
|
|
||||||
put("port", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"80",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"80",
|
|
||||||
"8080"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
),
|
|
||||||
new ServerConfiguration(
|
|
||||||
"https://localhost:8080/{version}",
|
|
||||||
"The local server",
|
|
||||||
new HashMap<String, ServerVariable>() {{
|
|
||||||
put("version", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"v2",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"v1",
|
|
||||||
"v2"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
)
|
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
}};
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -161,7 +160,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("api_key");
|
auth = authMap.get("api_key");
|
||||||
@@ -183,7 +182,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
authenticationLookup.put("api_key_query", "api_key");
|
authenticationLookup.put("api_key_query", "api_key");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -665,7 +664,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -724,14 +723,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -743,8 +741,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -764,8 +762,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1057,15 +1055,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
null,
|
cookieParams,
|
||||||
method,
|
null,
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1237,10 +1237,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -192,12 +192,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import javax.ws.rs.core.GenericType;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -71,37 +72,12 @@ public class UsageApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Object> anyKeyWithHttpInfo() throws ApiException {
|
public ApiResponse<Object> anyKeyWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key", "api_key_query"};
|
||||||
String localVarPath = "/any";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key", "api_key_query" };
|
|
||||||
|
|
||||||
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
||||||
|
return apiClient.invokeAPI("UsageApi.anyKey", "/any", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UsageApi.anyKey", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -131,37 +107,12 @@ public class UsageApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Object> bothKeysWithHttpInfo() throws ApiException {
|
public ApiResponse<Object> bothKeysWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key", "api_key_query"};
|
||||||
String localVarPath = "/both";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key", "api_key_query" };
|
|
||||||
|
|
||||||
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
||||||
|
return apiClient.invokeAPI("UsageApi.bothKeys", "/both", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UsageApi.bothKeys", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -191,37 +142,12 @@ public class UsageApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Object> keyInHeaderWithHttpInfo() throws ApiException {
|
public ApiResponse<Object> keyInHeaderWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/header";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
||||||
|
return apiClient.invokeAPI("UsageApi.keyInHeader", "/header", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UsageApi.keyInHeader", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -251,37 +177,12 @@ public class UsageApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Object> keyInQueryWithHttpInfo() throws ApiException {
|
public ApiResponse<Object> keyInQueryWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key_query"};
|
||||||
String localVarPath = "/query";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
|
||||||
|
|
||||||
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
GenericType<Object> localVarReturnType = new GenericType<Object>() {};
|
||||||
|
return apiClient.invokeAPI("UsageApi.keyInQuery", "/query", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UsageApi.keyInQuery", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -42,11 +43,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -68,25 +72,26 @@ import org.openapitools.client.auth.ApiKeyAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://localhost";
|
protected String basePath = "http://localhost";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"",
|
"",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
}};
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -123,13 +128,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
// Prevent the authentications from being modified.
|
// Prevent the authentications from being modified.
|
||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -610,7 +615,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -669,14 +674,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -688,8 +692,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -709,8 +713,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1002,15 +1006,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
null,
|
cookieParams,
|
||||||
method,
|
null,
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1182,10 +1188,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -193,12 +193,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.MySchemaNameCharacters;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,37 +75,11 @@ public class DefaultApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<MySchemaNameCharacters> testPostWithHttpInfo(MySchemaNameCharacters mySchemaNameCharacters) throws ApiException {
|
public ApiResponse<MySchemaNameCharacters> testPostWithHttpInfo(MySchemaNameCharacters mySchemaNameCharacters) throws ApiException {
|
||||||
Object localVarPostBody = mySchemaNameCharacters;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/test";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<MySchemaNameCharacters> localVarReturnType = new GenericType<MySchemaNameCharacters>() {};
|
GenericType<MySchemaNameCharacters> localVarReturnType = new GenericType<MySchemaNameCharacters>() {};
|
||||||
|
return apiClient.invokeAPI("DefaultApi.testPost", "/test", "POST", new ArrayList<>(), mySchemaNameCharacters,
|
||||||
return apiClient.invokeAPI("DefaultApi.testPost", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class ChildSchema extends Parent {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public ChildSchema putAdditionalProperty(String key, Object value) {
|
public ChildSchema putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -160,11 +160,11 @@ public class ChildSchema extends Parent {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ChildSchema", ChildSchema.class);
|
mappings.put("ChildSchema", ChildSchema.class);
|
||||||
JSON.registerDiscriminator(ChildSchema.class, "objectType", mappings);
|
JSON.registerDiscriminator(ChildSchema.class, "objectType", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class MySchemaNameCharacters extends Parent {
|
|||||||
@JsonAnySetter
|
@JsonAnySetter
|
||||||
public MySchemaNameCharacters putAdditionalProperty(String key, Object value) {
|
public MySchemaNameCharacters putAdditionalProperty(String key, Object value) {
|
||||||
if (this.additionalProperties == null) {
|
if (this.additionalProperties == null) {
|
||||||
this.additionalProperties = new HashMap<String, Object>();
|
this.additionalProperties = new HashMap<>();
|
||||||
}
|
}
|
||||||
this.additionalProperties.put(key, value);
|
this.additionalProperties.put(key, value);
|
||||||
return this;
|
return this;
|
||||||
@@ -161,11 +161,11 @@ public class MySchemaNameCharacters extends Parent {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("MySchemaName._-Characters", MySchemaNameCharacters.class);
|
mappings.put("MySchemaName._-Characters", MySchemaNameCharacters.class);
|
||||||
JSON.registerDiscriminator(MySchemaNameCharacters.class, "objectType", mappings);
|
JSON.registerDiscriminator(MySchemaNameCharacters.class, "objectType", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,13 +120,13 @@ public class Parent {
|
|||||||
return o.toString().replace("\n", "\n ");
|
return o.toString().replace("\n", "\n ");
|
||||||
}
|
}
|
||||||
|
|
||||||
static {
|
static {
|
||||||
// Initialize and register the discriminator mappings.
|
// Initialize and register the discriminator mappings.
|
||||||
Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
|
Map<String, Class<?>> mappings = new HashMap<>();
|
||||||
mappings.put("ChildSchema", ChildSchema.class);
|
mappings.put("ChildSchema", ChildSchema.class);
|
||||||
mappings.put("MySchemaName._-Characters", MySchemaNameCharacters.class);
|
mappings.put("MySchemaName._-Characters", MySchemaNameCharacters.class);
|
||||||
mappings.put("Parent", Parent.class);
|
mappings.put("Parent", Parent.class);
|
||||||
JSON.registerDiscriminator(Parent.class, "objectType", mappings);
|
JSON.registerDiscriminator(Parent.class, "objectType", mappings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -43,11 +44,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -70,25 +74,26 @@ import org.openapitools.client.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io/v2";
|
protected String basePath = "http://petstore.swagger.io/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://petstore.swagger.io/v2",
|
"http://petstore.swagger.io/v2",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
}};
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -125,7 +130,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("petstore_auth");
|
auth = authMap.get("petstore_auth");
|
||||||
@@ -147,7 +152,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -735,7 +740,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -794,14 +799,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -813,8 +817,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -834,8 +838,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1127,15 +1131,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
null,
|
cookieParams,
|
||||||
method,
|
null,
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1152,7 +1158,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
final int statusCode = response.getStatusInfo().getStatusCode();
|
final int statusCode = response.getStatusInfo().getStatusCode();
|
||||||
|
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1323,10 +1329,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
public static Class<?> getClassForElement(JsonNode node, Class<?> modelClass) {
|
||||||
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
ClassDiscriminatorMapping cdm = modelDiscriminators.get(modelClass);
|
||||||
if (cdm != null) {
|
if (cdm != null) {
|
||||||
return cdm.getClassForElement(node, new HashSet<Class<?>>());
|
return cdm.getClassForElement(node, new HashSet<>());
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -84,7 +84,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
ClassDiscriminatorMapping(Class<?> cls, String propertyName, Map<String, Class<?>> mappings) {
|
||||||
modelClass = cls;
|
modelClass = cls;
|
||||||
discriminatorName = propertyName;
|
discriminatorName = propertyName;
|
||||||
discriminatorMappings = new HashMap<String, Class<?>>();
|
discriminatorMappings = new HashMap<>();
|
||||||
if (mappings != null) {
|
if (mappings != null) {
|
||||||
discriminatorMappings.putAll(mappings);
|
discriminatorMappings.putAll(mappings);
|
||||||
}
|
}
|
||||||
@@ -193,12 +193,12 @@ public class JSON implements ContextResolver<ObjectMapper> {
|
|||||||
/**
|
/**
|
||||||
* A map of discriminators for all model classes.
|
* A map of discriminators for all model classes.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<Class<?>, ClassDiscriminatorMapping>();
|
private static Map<Class<?>, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A map of oneOf/anyOf descendants for each model class.
|
* A map of oneOf/anyOf descendants for each model class.
|
||||||
*/
|
*/
|
||||||
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<Class<?>, Map<String, GenericType>>();
|
private static Map<Class<?>, Map<String, GenericType>> modelDescendants = new HashMap<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register a model class discriminator.
|
* Register a model class discriminator.
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.openapitools.client.model.Pet;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -78,42 +79,17 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> addPetWithHttpInfo(Pet pet) throws ApiException {
|
public ApiResponse<Pet> addPetWithHttpInfo(Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = pet;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pet' is set
|
|
||||||
if (pet == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling addPet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.addPet", "/pet", "POST", new ArrayList<>(), pet,
|
||||||
return apiClient.invokeAPI("PetApi.addPet", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -146,43 +122,26 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling deletePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Header parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, String> localVarHeaderParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (apiKey != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
if (apiKey != null)
|
|
||||||
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
localVarHeaderParams.put("api_key", apiClient.parameterToString(apiKey));
|
||||||
|
}
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
final String[] localVarAccepts = {
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
|
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
};
|
localVarHeaderParams, new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.deletePet", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -216,43 +175,22 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'status' is set
|
|
||||||
if (status == null) {
|
if (status == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
throw new ApiException(400, "Missing the required parameter 'status' when calling findPetsByStatus");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByStatus";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "status", status)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByStatus", "/pet/findByStatus", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByStatus", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -290,43 +228,22 @@ public class PetApi {
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'tags' is set
|
|
||||||
if (tags == null) {
|
if (tags == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
throw new ApiException(400, "Missing the required parameter 'tags' when calling findPetsByTags");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet/findByTags";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("csv", "tags", tags)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
GenericType<List<Pet>> localVarReturnType = new GenericType<List<Pet>>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.findPetsByTags", "/pet/findByTags", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("PetApi.findPetsByTags", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -362,43 +279,21 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling getPetById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.getPetById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -440,42 +335,17 @@ public class PetApi {
|
|||||||
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
|
* @see <a href="http://petstore.swagger.io/v2/doc/updatePet">Update an existing pet Documentation</a>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Pet> updatePetWithHttpInfo(Pet pet) throws ApiException {
|
public ApiResponse<Pet> updatePetWithHttpInfo(Pet pet) throws ApiException {
|
||||||
Object localVarPostBody = pet;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'pet' is set
|
|
||||||
if (pet == null) {
|
if (pet == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
|
throw new ApiException(400, "Missing the required parameter 'pet' when calling updatePet");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/pet";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json", "application/xml"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json", "application/xml");
|
||||||
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
GenericType<Pet> localVarReturnType = new GenericType<Pet>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.updatePet", "/pet", "PUT", new ArrayList<>(), pet,
|
||||||
return apiClient.invokeAPI("PetApi.updatePet", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -510,45 +380,29 @@ public class PetApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling updatePetWithForm");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}"
|
String localVarPath = "/pet/{petId}"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (name != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (name != null)
|
|
||||||
localVarFormParams.put("name", name);
|
localVarFormParams.put("name", name);
|
||||||
if (status != null)
|
}
|
||||||
|
if (status != null) {
|
||||||
localVarFormParams.put("status", status);
|
localVarFormParams.put("status", status);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/x-www-form-urlencoded");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/x-www-form-urlencoded"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("PetApi.updatePetWithForm", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -584,47 +438,30 @@ if (status != null)
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File _file) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'petId' is set
|
|
||||||
if (petId == null) {
|
if (petId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFile");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/pet/{petId}/uploadImage"
|
String localVarPath = "/pet/{petId}/uploadImage"
|
||||||
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
|
.replaceAll("\\{petId}", apiClient.escapeString(petId.toString()));
|
||||||
|
|
||||||
// query params
|
// Form parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
Map<String, Object> localVarFormParams = new LinkedHashMap<>();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
if (additionalMetadata != null) {
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (additionalMetadata != null)
|
|
||||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||||
if (_file != null)
|
}
|
||||||
|
if (_file != null) {
|
||||||
localVarFormParams.put("file", _file);
|
localVarFormParams.put("file", _file);
|
||||||
|
}
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
"application/json"
|
String localVarContentType = apiClient.selectHeaderContentType("multipart/form-data");
|
||||||
};
|
String[] localVarAuthNames = new String[] {"petstore_auth"};
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"multipart/form-data"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "petstore_auth" };
|
|
||||||
|
|
||||||
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
|
||||||
|
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("PetApi.uploadFile", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), localVarFormParams, localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import org.openapitools.client.model.Order;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -75,42 +76,20 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling deleteOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{orderId}"
|
String localVarPath = "/store/order/{orderId}"
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{orderId}", apiClient.escapeString(orderId));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
null, null, false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Returns pet inventories by status
|
* Returns pet inventories by status
|
||||||
@@ -139,37 +118,12 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept("application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/store/inventory";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
GenericType<Map<String, Integer>> localVarReturnType = new GenericType<Map<String, Integer>>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getInventory", "/store/inventory", "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getInventory", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, localVarReturnType, false);
|
localVarAuthNames, localVarReturnType, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -205,44 +159,21 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'orderId' is set
|
|
||||||
if (orderId == null) {
|
if (orderId == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
throw new ApiException(400, "Missing the required parameter 'orderId' when calling getOrderById");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/store/order/{orderId}"
|
String localVarPath = "/store/order/{orderId}"
|
||||||
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
|
.replaceAll("\\{orderId}", apiClient.escapeString(orderId.toString()));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Place an order for a pet
|
* Place an order for a pet
|
||||||
@@ -275,42 +206,16 @@ public class StoreApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
|
public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
|
||||||
Object localVarPostBody = order;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'order' is set
|
|
||||||
if (order == null) {
|
if (order == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
|
throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/store/order";
|
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
GenericType<Order> localVarReturnType = new GenericType<Order>() {};
|
||||||
|
return apiClient.invokeAPI("StoreApi.placeOrder", "/store/order", "POST", new ArrayList<>(), order,
|
||||||
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import org.openapitools.client.model.User;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -74,40 +75,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
|
public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUser", "/user", "POST", new ArrayList<>(), user,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -138,40 +115,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user) throws ApiException {
|
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithArray";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", "/user/createWithArray", "POST", new ArrayList<>(), user,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -202,40 +155,16 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user) throws ApiException {
|
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/createWithList";
|
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.createUsersWithListInput", "/user/createWithList", "POST", new ArrayList<>(), user,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -268,41 +197,20 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling deleteUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", new ArrayList<>(), null,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -338,44 +246,21 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling getUserByName");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
GenericType<User> localVarReturnType = new GenericType<User>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", new ArrayList<>(), null,
|
||||||
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs user into the system
|
* Logs user into the system
|
||||||
@@ -410,50 +295,26 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
|
||||||
Object localVarPostBody = null;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'password' is set
|
|
||||||
if (password == null) {
|
if (password == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
throw new ApiException(400, "Missing the required parameter 'password' when calling loginUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
|
||||||
String localVarPath = "/user/login";
|
|
||||||
|
|
||||||
// query params
|
// Query parameters
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
List<Pair> localVarQueryParams = new ArrayList<>(
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
apiClient.parameterToPairs("", "username", username)
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
);
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
|
|
||||||
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
|
||||||
|
|
||||||
|
String localVarAccept = apiClient.selectHeaderAccept("application/xml", "application/json");
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
"application/xml", "application/json"
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { };
|
|
||||||
|
|
||||||
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
GenericType<String> localVarReturnType = new GenericType<String>() {};
|
||||||
|
return apiClient.invokeAPI("UserApi.loginUser", "/user/login", "GET", localVarQueryParams, null,
|
||||||
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
null, localVarReturnType, false);
|
||||||
localVarAuthNames, localVarReturnType, false);
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Logs out current logged in user session
|
* Logs out current logged in user session
|
||||||
@@ -481,35 +342,11 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
|
||||||
Object localVarPostBody = null;
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
|
String localVarContentType = apiClient.selectHeaderContentType();
|
||||||
// create path and map variables
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
String localVarPath = "/user/logout";
|
return apiClient.invokeAPI("UserApi.logoutUser", "/user/logout", "GET", new ArrayList<>(), null,
|
||||||
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
// query params
|
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -544,46 +381,23 @@ public class UserApi {
|
|||||||
</table>
|
</table>
|
||||||
*/
|
*/
|
||||||
public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
|
public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
|
||||||
Object localVarPostBody = user;
|
// Check required parameters
|
||||||
|
|
||||||
// verify the required parameter 'username' is set
|
|
||||||
if (username == null) {
|
if (username == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'username' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// verify the required parameter 'user' is set
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
|
throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
|
||||||
}
|
}
|
||||||
|
|
||||||
// create path and map variables
|
// Path parameters
|
||||||
String localVarPath = "/user/{username}"
|
String localVarPath = "/user/{username}"
|
||||||
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
|
.replaceAll("\\{username}", apiClient.escapeString(username));
|
||||||
|
|
||||||
// query params
|
String localVarAccept = apiClient.selectHeaderAccept();
|
||||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
String[] localVarAuthNames = new String[] {"api_key"};
|
||||||
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", new ArrayList<>(), user,
|
||||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final String[] localVarAccepts = {
|
|
||||||
|
|
||||||
};
|
|
||||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
|
||||||
|
|
||||||
final String[] localVarContentTypes = {
|
|
||||||
"application/json"
|
|
||||||
};
|
|
||||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
|
||||||
|
|
||||||
String[] localVarAuthNames = new String[] { "api_key" };
|
|
||||||
|
|
||||||
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody,
|
|
||||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
|
||||||
localVarAuthNames, null, false);
|
localVarAuthNames, null, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import java.nio.file.Files;
|
|||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.nio.file.StandardCopyOption;
|
import java.nio.file.StandardCopyOption;
|
||||||
import org.glassfish.jersey.logging.LoggingFeature;
|
import org.glassfish.jersey.logging.LoggingFeature;
|
||||||
|
import java.util.AbstractMap.SimpleEntry;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@@ -43,11 +44,14 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
|
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@@ -71,94 +75,93 @@ import org.openapitools.client.auth.OAuth;
|
|||||||
*/
|
*/
|
||||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient extends JavaTimeFormatter {
|
public class ApiClient extends JavaTimeFormatter {
|
||||||
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
|
private static final Pattern JSON_MIME_PATTERN = Pattern.compile("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$");
|
||||||
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
|
|
||||||
|
protected Map<String, String> defaultHeaderMap = new HashMap<>();
|
||||||
|
protected Map<String, String> defaultCookieMap = new HashMap<>();
|
||||||
protected String basePath = "http://petstore.swagger.io:80/v2";
|
protected String basePath = "http://petstore.swagger.io:80/v2";
|
||||||
protected String userAgent;
|
protected String userAgent;
|
||||||
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
|
||||||
|
|
||||||
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
|
protected List<ServerConfiguration> servers = new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://{server}.swagger.io:{port}/v2",
|
"http://{server}.swagger.io:{port}/v2",
|
||||||
"petstore server",
|
"petstore server",
|
||||||
new HashMap<String, ServerVariable>() {{
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
put("server", new ServerVariable(
|
new SimpleEntry<>("server", new ServerVariable(
|
||||||
"No description provided",
|
"No description provided",
|
||||||
"petstore",
|
"petstore",
|
||||||
new HashSet<String>(
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
Arrays.asList(
|
"petstore",
|
||||||
"petstore",
|
"qa-petstore",
|
||||||
"qa-petstore",
|
"dev-petstore"
|
||||||
"dev-petstore"
|
))
|
||||||
)
|
)),
|
||||||
|
new SimpleEntry<>("port", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"80",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"80",
|
||||||
|
"8080"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"https://localhost:8080/{version}",
|
||||||
|
"The local server",
|
||||||
|
Stream.<Entry<String, ServerVariable>>of(
|
||||||
|
new SimpleEntry<>("version", new ServerVariable(
|
||||||
|
"No description provided",
|
||||||
|
"v2",
|
||||||
|
new LinkedHashSet<>(Arrays.asList(
|
||||||
|
"v1",
|
||||||
|
"v2"
|
||||||
|
))
|
||||||
|
))
|
||||||
|
).collect(Collectors.toMap(Entry::getKey, Entry::getValue, (a, b) -> a, LinkedHashMap::new))
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"https://127.0.0.1/no_variable",
|
||||||
|
"The local server without variables",
|
||||||
|
new LinkedHashMap<>()
|
||||||
)
|
)
|
||||||
));
|
|
||||||
put("port", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"80",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"80",
|
|
||||||
"8080"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
),
|
|
||||||
new ServerConfiguration(
|
|
||||||
"https://localhost:8080/{version}",
|
|
||||||
"The local server",
|
|
||||||
new HashMap<String, ServerVariable>() {{
|
|
||||||
put("version", new ServerVariable(
|
|
||||||
"No description provided",
|
|
||||||
"v2",
|
|
||||||
new HashSet<String>(
|
|
||||||
Arrays.asList(
|
|
||||||
"v1",
|
|
||||||
"v2"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
));
|
|
||||||
}}
|
|
||||||
),
|
|
||||||
new ServerConfiguration(
|
|
||||||
"https://127.0.0.1/no_variable",
|
|
||||||
"The local server without variables",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
)
|
|
||||||
));
|
));
|
||||||
protected Integer serverIndex = 0;
|
protected Integer serverIndex = 0;
|
||||||
protected Map<String, String> serverVariables = null;
|
protected Map<String, String> serverVariables = null;
|
||||||
protected Map<String, List<ServerConfiguration>> operationServers = new HashMap<String, List<ServerConfiguration>>() {{
|
protected Map<String, List<ServerConfiguration>> operationServers;
|
||||||
put("PetApi.addPet", new ArrayList<ServerConfiguration>(Arrays.asList(
|
|
||||||
new ServerConfiguration(
|
|
||||||
"http://petstore.swagger.io/v2",
|
|
||||||
"No description provided",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
),
|
|
||||||
|
|
||||||
new ServerConfiguration(
|
{
|
||||||
"http://path-server-test.petstore.local/v2",
|
Map<String, List<ServerConfiguration>> operationServers = new HashMap<>();
|
||||||
"No description provided",
|
operationServers.put("PetApi.addPet", new ArrayList<>(Arrays.asList(
|
||||||
new HashMap<String, ServerVariable>()
|
new ServerConfiguration(
|
||||||
)
|
"http://petstore.swagger.io/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"http://path-server-test.petstore.local/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
)
|
||||||
)));
|
)));
|
||||||
put("PetApi.updatePet", new ArrayList<ServerConfiguration>(Arrays.asList(
|
operationServers.put("PetApi.updatePet", new ArrayList<>(Arrays.asList(
|
||||||
new ServerConfiguration(
|
new ServerConfiguration(
|
||||||
"http://petstore.swagger.io/v2",
|
"http://petstore.swagger.io/v2",
|
||||||
"No description provided",
|
"No description provided",
|
||||||
new HashMap<String, ServerVariable>()
|
new LinkedHashMap<>()
|
||||||
),
|
),
|
||||||
|
new ServerConfiguration(
|
||||||
|
"http://path-server-test.petstore.local/v2",
|
||||||
|
"No description provided",
|
||||||
|
new LinkedHashMap<>()
|
||||||
|
)
|
||||||
|
)));
|
||||||
|
this.operationServers = operationServers;
|
||||||
|
}
|
||||||
|
|
||||||
new ServerConfiguration(
|
protected Map<String, Integer> operationServerIndex = new HashMap<>();
|
||||||
"http://path-server-test.petstore.local/v2",
|
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<>();
|
||||||
"No description provided",
|
|
||||||
new HashMap<String, ServerVariable>()
|
|
||||||
)
|
|
||||||
)));
|
|
||||||
}};
|
|
||||||
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
|
|
||||||
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>();
|
|
||||||
protected boolean debugging = false;
|
protected boolean debugging = false;
|
||||||
protected ClientConfig clientConfig;
|
protected ClientConfig clientConfig;
|
||||||
protected int connectionTimeout = 0;
|
protected int connectionTimeout = 0;
|
||||||
@@ -195,7 +198,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
setUserAgent("OpenAPI-Generator/1.0.0/java");
|
||||||
|
|
||||||
// Setup authentications (key: authentication name, value: authentication).
|
// Setup authentications (key: authentication name, value: authentication).
|
||||||
authentications = new HashMap<String, Authentication>();
|
authentications = new HashMap<>();
|
||||||
Authentication auth = null;
|
Authentication auth = null;
|
||||||
if (authMap != null) {
|
if (authMap != null) {
|
||||||
auth = authMap.get("petstore_auth");
|
auth = authMap.get("petstore_auth");
|
||||||
@@ -247,7 +250,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
|
|
||||||
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
// Setup authentication lookup (key: authentication alias, value: authentication name)
|
||||||
authenticationLookup = new HashMap<String, String>();
|
authenticationLookup = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -835,7 +838,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return List of pairs
|
* @return List of pairs
|
||||||
*/
|
*/
|
||||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
public List<Pair> parameterToPairs(String collectionFormat, String name, Object value){
|
||||||
List<Pair> params = new ArrayList<Pair>();
|
List<Pair> params = new ArrayList<>();
|
||||||
|
|
||||||
// preconditions
|
// preconditions
|
||||||
if (name == null || name.isEmpty() || value == null) return params;
|
if (name == null || name.isEmpty() || value == null) return params;
|
||||||
@@ -894,14 +897,13 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* application/json; charset=UTF8
|
* application/json; charset=UTF8
|
||||||
* APPLICATION/JSON
|
* APPLICATION/JSON
|
||||||
* application/vnd.company+json
|
* application/vnd.company+json
|
||||||
* "* / *" is also default to JSON
|
* "*{@literal /}*" is also considered JSON by this method.
|
||||||
*
|
*
|
||||||
* @param mime MIME
|
* @param mime MIME
|
||||||
* @return True if the MIME type is JSON
|
* @return True if the MIME type is JSON
|
||||||
*/
|
*/
|
||||||
public boolean isJsonMime(String mime) {
|
public boolean isJsonMime(String mime) {
|
||||||
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
|
return mime != null && (mime.equals("*/*") || JSON_MIME_PATTERN.matcher(mime).matches());
|
||||||
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -913,8 +915,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Accept header to use. If the given array is empty,
|
* @return The Accept header to use. If the given array is empty,
|
||||||
* null will be returned (not to set the Accept header explicitly).
|
* null will be returned (not to set the Accept header explicitly).
|
||||||
*/
|
*/
|
||||||
public String selectHeaderAccept(String[] accepts) {
|
public String selectHeaderAccept(String... accepts) {
|
||||||
if (accepts.length == 0) {
|
if (accepts == null || accepts.length == 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
for (String accept : accepts) {
|
for (String accept : accepts) {
|
||||||
@@ -934,8 +936,8 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return The Content-Type header to use. If the given array is empty,
|
* @return The Content-Type header to use. If the given array is empty,
|
||||||
* JSON will be used.
|
* JSON will be used.
|
||||||
*/
|
*/
|
||||||
public String selectHeaderContentType(String[] contentTypes) {
|
public String selectHeaderContentType(String... contentTypes) {
|
||||||
if (contentTypes.length == 0) {
|
if (contentTypes == null || contentTypes.length == 0) {
|
||||||
return "application/json";
|
return "application/json";
|
||||||
}
|
}
|
||||||
for (String contentType : contentTypes) {
|
for (String contentType : contentTypes) {
|
||||||
@@ -1227,15 +1229,17 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
Map<String, String> allHeaderParams = new HashMap<>(defaultHeaderMap);
|
||||||
allHeaderParams.putAll(headerParams);
|
allHeaderParams.putAll(headerParams);
|
||||||
|
|
||||||
// update different parameters (e.g. headers) for authentication
|
if (authNames != null) {
|
||||||
updateParamsForAuth(
|
// update different parameters (e.g. headers) for authentication
|
||||||
authNames,
|
updateParamsForAuth(
|
||||||
queryParams,
|
authNames,
|
||||||
allHeaderParams,
|
queryParams,
|
||||||
cookieParams,
|
allHeaderParams,
|
||||||
serializeToString(body, formParams, contentType, isBodyNullable),
|
cookieParams,
|
||||||
method,
|
serializeToString(body, formParams, contentType, isBodyNullable),
|
||||||
target.getUri());
|
method,
|
||||||
|
target.getUri());
|
||||||
|
}
|
||||||
|
|
||||||
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
for (Entry<String, String> entry : allHeaderParams.entrySet()) {
|
||||||
String value = entry.getValue();
|
String value = entry.getValue();
|
||||||
@@ -1252,7 +1256,7 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
final int statusCode = response.getStatusInfo().getStatusCode();
|
final int statusCode = response.getStatusInfo().getStatusCode();
|
||||||
|
|
||||||
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
// If OAuth is used and a status 401 is received, renew the access token and retry the request
|
||||||
if (statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
if (authNames != null && statusCode == Status.UNAUTHORIZED.getStatusCode()) {
|
||||||
for (String authName : authNames) {
|
for (String authName : authNames) {
|
||||||
Authentication authentication = authentications.get(authName);
|
Authentication authentication = authentications.get(authName);
|
||||||
if (authentication instanceof OAuth) {
|
if (authentication instanceof OAuth) {
|
||||||
@@ -1423,10 +1427,10 @@ public class ApiClient extends JavaTimeFormatter {
|
|||||||
* @return a {@link java.util.Map} of response headers.
|
* @return a {@link java.util.Map} of response headers.
|
||||||
*/
|
*/
|
||||||
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
protected Map<String, List<String>> buildResponseHeaders(Response response) {
|
||||||
Map<String, List<String>> responseHeaders = new HashMap<String, List<String>>();
|
Map<String, List<String>> responseHeaders = new HashMap<>();
|
||||||
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
for (Entry<String, List<Object>> entry: response.getHeaders().entrySet()) {
|
||||||
List<Object> values = entry.getValue();
|
List<Object> values = entry.getValue();
|
||||||
List<String> headers = new ArrayList<String>();
|
List<String> headers = new ArrayList<>();
|
||||||
for (Object o : values) {
|
for (Object o : values) {
|
||||||
headers.add(String.valueOf(o));
|
headers.add(String.valueOf(o));
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user