Add HTTP signature authentication support to Java (jersey2-experimental) (#6058)

* add fmt-maven-plugin to jersey2 exp

* update samples

* add http signature auth template

* minor fix

* fix http beaer auth, update sample

* fix http signature auth

* fix http signature auth

* header support

* add query string to path

* undo changes in default codegen

* ignore fake test

* add serialize to string method

* add serialzie to string method

* add get mapper

* auto format java source code

* remove plugin

* update pom.xml

* change back AbstractOpenApiSchema to T

* skip mvn code formatter in bin script

* undo changes to spec

* update samples

* add back HttpSignatureAuth.java
This commit is contained in:
William Cheng
2020-04-28 00:09:30 +08:00
committed by GitHub
parent 3b0bd368a6
commit 588023686a
196 changed files with 9227 additions and 10030 deletions

View File

@@ -27,13 +27,15 @@ fi
# if you've executed sbt assembly previously it will use that instead. # if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java --additional-properties hideGenerationTimestamp=true $@" ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-experimental.json -o samples/client/petstore/java/jersey2-experimental -t modules/openapi-generator/src/main/resources/Java/libraries/jersey2-experimental --additional-properties hideGenerationTimestamp=true $@"
echo "Removing files and folders under samples/client/petstore/java/jersey2-experimental/src/main" echo "Removing files and folders under samples/client/petstore/java/jersey2-experimental/src/main"
rm -rf samples/client/petstore/java/jersey2-experimental/src/main rm -rf samples/client/petstore/java/jersey2-experimental/src/main
find samples/client/petstore/java/jersey2-experimental -maxdepth 1 -type f ! -name "README.md" -exec rm {} + find samples/client/petstore/java/jersey2-experimental -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
java $JAVA_OPTS -jar $executable $ags java $JAVA_OPTS -jar $executable $ags
#mvn com.coveo:fmt-maven-plugin:format -f samples/client/petstore/java/jersey2-experimental/pom.xml
# copy additional manually written unit-tests # copy additional manually written unit-tests
#mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client #mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client
#mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth #mkdir samples/client/petstore/java/jersey2/src/test/java/org/openapitools/client/auth

View File

@@ -373,6 +373,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java")); supportingFiles.add(new SupportingFile("ApiResponse.mustache", invokerFolder, "ApiResponse.java"));
if (JERSEY2_EXPERIMENTAL.equals(getLibrary())) { if (JERSEY2_EXPERIMENTAL.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("auth/HttpSignatureAuth.mustache", authFolder, "HttpSignatureAuth.java"));
supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java")); supportingFiles.add(new SupportingFile("AbstractOpenApiSchema.mustache", (sourceFolder + File.separator + modelPackage().replace('.', File.separatorChar)).replace('/', File.separatorChar), "AbstractOpenApiSchema.java"));
} }
forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON); forceSerializationLibrary(SERIALIZATION_LIBRARY_JACKSON);

View File

@@ -23,6 +23,7 @@ import org.glassfish.jersey.media.multipart.MultiPartFeature;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.net.URI;
{{^supportJava6}} {{^supportJava6}}
import java.nio.file.Files; import java.nio.file.Files;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
@@ -56,6 +57,7 @@ import java.util.regex.Pattern;
import {{invokerPackage}}.auth.Authentication; import {{invokerPackage}}.auth.Authentication;
import {{invokerPackage}}.auth.HttpBasicAuth; import {{invokerPackage}}.auth.HttpBasicAuth;
import {{invokerPackage}}.auth.HttpBearerAuth; import {{invokerPackage}}.auth.HttpBearerAuth;
import {{invokerPackage}}.auth.HttpSignatureAuth;
import {{invokerPackage}}.auth.ApiKeyAuth; import {{invokerPackage}}.auth.ApiKeyAuth;
import {{invokerPackage}}.model.AbstractOpenApiSchema; import {{invokerPackage}}.model.AbstractOpenApiSchema;
@@ -159,11 +161,26 @@ public class ApiClient {
setUserAgent("{{#httpUserAgent}}{{{.}}}{{/httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{{artifactVersion}}}/java{{/httpUserAgent}}"); setUserAgent("{{#httpUserAgent}}{{{.}}}{{/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>();{{#authMethods}}{{#isBasic}}{{#isBasicBasic}} authentications = new HashMap<String, Authentication>();
authentications.put("{{name}}", new HttpBasicAuth());{{/isBasicBasic}}{{^isBasicBasic}} {{#authMethods}}
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));{{/isBasicBasic}}{{/isBasic}}{{#isApiKey}} {{#isBasic}}
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));{{/isApiKey}}{{#isOAuth}} {{#isBasicBasic}}
authentications.put("{{name}}", new OAuth());{{/isOAuth}}{{/authMethods}} authentications.put("{{name}}", new HttpBasicAuth());
{{/isBasicBasic}}
{{#isBasicBearer}}
authentications.put("{{name}}", new HttpBearerAuth("{{scheme}}"));
{{/isBasicBearer}}
{{#isHttpSignature}}
authentications.put("{{name}}", new HttpSignatureAuth("{{name}}", null, null));
{{/isHttpSignature}}
{{/isBasic}}
{{#isApiKey}}
authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));
{{/isApiKey}}
{{#isOAuth}}
authentications.put("{{name}}", new OAuth());
{{/isOAuth}}
{{/authMethods}}
// Prevent the authentications from being modified. // Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications); authentications = Collections.unmodifiableMap(authentications);
@@ -701,6 +718,38 @@ public class ApiClient {
return entity; return entity;
} }
/**
* Serialize the given Java object into string according the given
* Content-Type (only JSON, HTTP form is supported for now).
* @param obj Object
* @param formParams Form parameters
* @param contentType Context type
* @return String
* @throws ApiException API exception
*/
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType) throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
return json.getMapper().writeValueAsString(obj);
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{ public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{
Object result = null; Object result = null;
@@ -862,7 +911,6 @@ public class ApiClient {
* @throws ApiException API exception * @throws ApiException API exception
*/ */
public <T> ApiResponse<T> invokeAPI(String operation, String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException { public <T> ApiResponse<T> invokeAPI(String operation, String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
// Not using `.target(targetURL).path(path)` below, // Not using `.target(targetURL).path(path)` below,
// to support (constant) query string in `path`, e.g. "/posts?draft=1" // to support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -935,6 +983,14 @@ public class ApiClient {
Entity<?> entity = serialize(body, formParams, contentType); Entity<?> entity = serialize(body, formParams, contentType);
// put all headers in one place
Map<String, String> allHeaderParams = new HashMap<>();
allHeaderParams.putAll(defaultHeaderMap);
allHeaderParams.putAll(headerParams);
// update different parameters (e.g. headers) for authentication
updateParamsForAuth(authNames, queryParams, allHeaderParams, cookieParams, serializeToString(body, formParams, contentType), method, target.getUri());
Response response = null; Response response = null;
try { try {
@@ -1061,12 +1117,17 @@ public class ApiClient {
* @param queryParams List of query parameters * @param queryParams List of query parameters
* @param headerParams Map of header parameters * @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters * @param cookieParams Map of cookie parameters
* @param method HTTP method (e.g. POST)
* @param uri HTTP URI
*/ */
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams,
Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) { for (String authName : authNames) {
Authentication auth = authentications.get(authName); Authentication auth = authentications.get(authName);
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); if (auth == null) {
auth.applyToParams(queryParams, headerParams, cookieParams); throw new RuntimeException("Authentication undefined: " + authName);
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
} }
} }
} }

View File

@@ -62,4 +62,6 @@ public class JSON implements ContextResolver<ObjectMapper> {
public ObjectMapper getContext(Class<?> type) { public ObjectMapper getContext(Class<?> type) {
return mapper; return mapper;
} }
public ObjectMapper getMapper() { return mapper; }
} }

View File

@@ -0,0 +1,68 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
private String apiKey;
private String apiKeyPrefix;
public ApiKeyAuth(String location, String paramName) {
this.location = location;
this.paramName = paramName;
}
public String getLocation() {
return location;
}
public String getParamName() {
return paramName;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public String getApiKeyPrefix() {
return apiKeyPrefix;
}
public void setApiKeyPrefix(String apiKeyPrefix) {
this.apiKeyPrefix = apiKeyPrefix;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (apiKey == null) {
return;
}
String value;
if (apiKeyPrefix != null) {
value = apiKeyPrefix + " " + apiKey;
} else {
value = apiKey;
}
if ("query".equals(location)) {
queryParams.add(new Pair(paramName, value));
} else if ("header".equals(location)) {
headerParams.put(paramName, value);
} else if ("cookie".equals(location)) {
cookieParams.put(paramName, value);
}
}
}

View File

@@ -0,0 +1,22 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
public interface Authentication {
/**
* Apply authentication settings to header and query params.
*
* @param queryParams List of query parameters
* @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters
*/
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException;
}

View File

@@ -0,0 +1,62 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
{{^java8}}
import com.migcomponents.migbase64.Base64;
{{/java8}}
{{#java8}}
import java.util.Base64;
import java.nio.charset.StandardCharsets;
{{/java8}}
import java.net.URI;
import java.util.Map;
import java.util.List;
{{^java8}}
import java.io.UnsupportedEncodingException;
{{/java8}}
{{>generatedAnnotation}}
public class HttpBasicAuth implements Authentication {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (username == null && password == null) {
return;
}
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
{{^java8}}
try {
headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
{{/java8}}
{{#java8}}
headerParams.put("Authorization", "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
{{/java8}}
}
}

View File

@@ -0,0 +1,51 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class HttpBearerAuth implements Authentication {
private final String scheme;
private String bearerToken;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
}
/**
* Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @return The bearer token
*/
public String getBearerToken() {
return bearerToken;
}
/**
* Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @param bearerToken The bearer token to send in the Authorization header
*/
public void setBearerToken(String bearerToken) {
this.bearerToken = bearerToken;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if(bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
}
}

View File

@@ -0,0 +1,115 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.net.URLEncoder;
import java.security.MessageDigest;
import java.security.Key;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
import java.util.List;
import org.tomitribe.auth.signatures.*;
public class HttpSignatureAuth implements Authentication {
private Signer signer;
private String name;
private Algorithm algorithm;
private List<String> headers;
public HttpSignatureAuth(String name, Algorithm algorithm, List<String> headers) {
this.name = name;
this.algorithm = algorithm;
this.headers = headers;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Algorithm getAlgorithm() {
return algorithm;
}
public void setAlgorithm(Algorithm algorithm) {
this.algorithm = algorithm;
}
public List<String> getHeaders() {
return headers;
}
public void setHeaders(List<String> headers) {
this.headers = headers;
}
public Signer getSigner() {
return signer;
}
public void setSigner(Signer signer) {
this.signer = signer;
}
public void setup(Key key) throws ApiException {
if (key == null) {
throw new ApiException("key (java.security.Key) cannot be null");
}
signer = new Signer(key, new Signature(name, algorithm, null, headers));
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams,
String payload, String method, URI uri) throws ApiException {
try {
if (headers.contains("host")) {
headerParams.put("host", uri.getHost());
}
if (headers.contains("date")) {
headerParams.put("date", new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US).format(new Date()));
}
if (headers.contains("digest")) {
headerParams.put("digest", "SHA-256=" + new String(Base64.getEncoder().encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes()))));
}
if (signer == null) {
throw new ApiException("Signer cannot be null. Please run the method `setup` to set it up correctly");
}
// construct the path with the URL query string
String path = uri.getPath();
List<String> urlQueries = new ArrayList<String>();
for (Pair queryParam : queryParams) {
urlQueries.add(queryParam.getName() + "=" + URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20"));
}
if (!urlQueries.isEmpty()) {
path = path + "?" + String.join("&", urlQueries);
}
headerParams.put("Authorization", signer.sign(method, path, headerParams).toString());
} catch (Exception ex) {
throw new ApiException("Failed to create signature in the HTTP request header: " + ex.toString());
}
}
}

View File

@@ -0,0 +1,30 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
import {{invokerPackage}}.Pair;
import {{invokerPackage}}.ApiException;
import java.net.URI;
import java.util.Map;
import java.util.List;
{{>generatedAnnotation}}
public class OAuth implements Authentication {
private String accessToken;
public String getAccessToken() {
return accessToken;
}
public void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken);
}
}
}

View File

@@ -0,0 +1,7 @@
{{>licenseInfo}}
package {{invokerPackage}}.auth;
public enum OAuthFlow {
accessCode, implicit, password, application
}

View File

@@ -63,7 +63,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version> <version>3.0.0-M4</version>
<configuration> <configuration>
<systemProperties> <systemProperties>
<property> <property>
@@ -73,7 +73,7 @@
</systemProperties> </systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine> <argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel> <parallel>methods</parallel>
<forkMode>pertest</forkMode> <threadCount>10</threadCount>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -142,7 +142,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version> <version>3.8.1</version>
<configuration> <configuration>
{{#supportJava6}} {{#supportJava6}}
<source>1.6</source> <source>1.6</source>
@@ -158,6 +158,13 @@
<target>1.7</target> <target>1.7</target>
{{/java8}} {{/java8}}
{{/supportJava6}} {{/supportJava6}}
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-J-Xss4m</arg><!-- Compiling the generated JSON.java file may require larger stack size. -->
</compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -283,64 +290,67 @@
<version>${jackson-databind-nullable-version}</version> <version>${jackson-databind-nullable-version}</version>
</dependency> </dependency>
{{#withXml}} {{#withXml}}
<!-- XML processing: JAXB -->
<!-- XML processing: JAXB --> <dependency>
<dependency> <groupId>org.glassfish.jersey.media</groupId>
<groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-jaxb</artifactId>
<artifactId>jersey-media-jaxb</artifactId> <version>${jersey-version}</version>
<version>${jersey-version}</version> </dependency>
</dependency>
{{/withXml}} {{/withXml}}
{{#joda}} {{#joda}}
<dependency> <dependency>
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId> <artifactId>jackson-datatype-joda</artifactId>
<version>${jackson-version}</version> <version>${jackson-version}</version>
</dependency> </dependency>
{{/joda}} {{/joda}}
{{#java8}} {{#java8}}
<dependency> <dependency>
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId> <artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-version}</version> <version>${jackson-version}</version>
</dependency> </dependency>
{{/java8}} {{/java8}}
{{#threetenbp}} {{#threetenbp}}
<dependency> <dependency>
<groupId>com.github.joschi.jackson</groupId> <groupId>com.github.joschi.jackson</groupId>
<artifactId>jackson-datatype-threetenbp</artifactId> <artifactId>jackson-datatype-threetenbp</artifactId>
<version>${threetenbp-version}</version> <version>${threetenbp-version}</version>
</dependency> </dependency>
{{/threetenbp}} {{/threetenbp}}
{{^java8}} {{^java8}}
<!-- Base64 encoding that works in both JVM and Android --> <!-- Base64 encoding that works in both JVM and Android -->
<dependency> <dependency>
<groupId>com.brsanthu</groupId> <groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId> <artifactId>migbase64</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
{{/java8}} {{/java8}}
{{#supportJava6}} {{#supportJava6}}
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>commons-lang3</artifactId>
<version>${commons_lang3_version}</version> <version>${commons-lang3-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-io</groupId> <groupId>commons-io</groupId>
<artifactId>commons-io</artifactId> <artifactId>commons-io</artifactId>
<version>${commons_io_version}</version> <version>${commons-io-version}</version>
</dependency> </dependency>
{{/supportJava6}} {{/supportJava6}}
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-http-signatures</artifactId>
<version>${http-signature-version}</version>
</dependency>
{{#useBeanValidation}} {{#useBeanValidation}}
<!-- Bean Validation API support --> <!-- Bean Validation API support -->
<dependency> <dependency>
<groupId>javax.validation</groupId> <groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId> <artifactId>validation-api</artifactId>
<version>1.1.0.Final</version> <version>1.1.0.Final</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
{{/useBeanValidation}} {{/useBeanValidation}}
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
@@ -358,8 +368,8 @@
{{/supportJava6}} {{/supportJava6}}
{{#supportJava6}} {{#supportJava6}}
<jersey-version>2.6</jersey-version> <jersey-version>2.6</jersey-version>
<commons_io_version>2.5</commons_io_version> <commons-io-version>2.5</commons-io-version>
<commons_lang3_version>3.6</commons_lang3_version> <commons-lang3-version>3.6</commons-lang3-version>
{{/supportJava6}} {{/supportJava6}}
<jackson-version>2.10.3</jackson-version> <jackson-version>2.10.3</jackson-version>
<jackson-databind-version>2.10.3</jackson-databind-version> <jackson-databind-version>2.10.3</jackson-databind-version>
@@ -368,5 +378,6 @@
<threetenbp-version>2.9.10</threetenbp-version> <threetenbp-version>2.9.10</threetenbp-version>
{{/threetenbp}} {{/threetenbp}}
<junit-version>4.13</junit-version> <junit-version>4.13</junit-version>
<http-signature-version>1.3</http-signature-version>
</properties> </properties>
</project> </project>

View File

@@ -1113,7 +1113,7 @@ paths:
schema: schema:
type: string type: string
security: security:
- http_signature_test - http_signature_test: []
requestBody: requestBody:
$ref: '#/components/requestBodies/Pet' $ref: '#/components/requestBodies/Pet'
responses: responses:

View File

@@ -6,17 +6,8 @@
Name | Type | Description | Notes Name | Type | Description | Notes
------------ | ------------- | ------------- | ------------- ------------ | ------------- | ------------- | -------------
**mapString** | **Map&lt;String, String&gt;** | | [optional] **mapProperty** | **Map&lt;String, String&gt;** | | [optional]
**mapNumber** | [**Map&lt;String, BigDecimal&gt;**](BigDecimal.md) | | [optional] **mapOfMapProperty** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapInteger** | **Map&lt;String, Integer&gt;** | | [optional]
**mapBoolean** | **Map&lt;String, Boolean&gt;** | | [optional]
**mapArrayInteger** | [**Map&lt;String, List&lt;Integer&gt;&gt;**](List.md) | | [optional]
**mapArrayAnytype** | [**Map&lt;String, List&lt;Object&gt;&gt;**](List.md) | | [optional]
**mapMapString** | [**Map&lt;String, Map&lt;String, String&gt;&gt;**](Map.md) | | [optional]
**mapMapAnytype** | [**Map&lt;String, Map&lt;String, Object&gt;&gt;**](Map.md) | | [optional]
**anytype1** | [**Object**](.md) | | [optional]
**anytype2** | [**Object**](.md) | | [optional]
**anytype3** | [**Object**](.md) | | [optional]

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## call123testSpecialTags ## call123testSpecialTags
> Client call123testSpecialTags(body) > Client call123testSpecialTags(client)
To test special tags To test special tags
@@ -32,9 +32,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient); AnotherFakeApi apiInstance = new AnotherFakeApi(defaultClient);
Client body = new Client(); // Client | client model Client client = new Client(); // Client | client model
try { try {
Client result = apiInstance.call123testSpecialTags(body); Client result = apiInstance.call123testSpecialTags(client);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags"); System.err.println("Exception when calling AnotherFakeApi#call123testSpecialTags");
@@ -52,7 +52,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model | **client** | [**Client**](Client.md)| client model |
### Return type ### Return type

View File

@@ -0,0 +1,68 @@
# DefaultApi
All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description
------------- | ------------- | -------------
[**fooGet**](DefaultApi.md#fooGet) | **GET** /foo |
## fooGet
> InlineResponseDefault fooGet()
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.models.*;
import org.openapitools.client.api.DefaultApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
DefaultApi apiInstance = new DefaultApi(defaultClient);
try {
InlineResponseDefault result = apiInstance.fooGet();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#fooGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**InlineResponseDefault**](InlineResponseDefault.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **0** | response | - |

View File

@@ -11,6 +11,9 @@ Name | Type | Description | Notes
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional] **enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional] **enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional] **outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]
**outerEnumInteger** | [**OuterEnumInteger**](OuterEnumInteger.md) | | [optional]
**outerEnumDefaultValue** | [**OuterEnumDefaultValue**](OuterEnumDefaultValue.md) | | [optional]
**outerEnumIntegerDefaultValue** | [**OuterEnumIntegerDefaultValue**](OuterEnumIntegerDefaultValue.md) | | [optional]

View File

@@ -4,7 +4,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Method | HTTP request | Description Method | HTTP request | Description
------------- | ------------- | ------------- ------------- | ------------- | -------------
[**createXmlItem**](FakeApi.md#createXmlItem) | **POST** /fake/create_xml_item | creates an XmlItem [**fakeHealthGet**](FakeApi.md#fakeHealthGet) | **GET** /fake/health | Health check endpoint
[**fakeHttpSignatureTest**](FakeApi.md#fakeHttpSignatureTest) | **GET** /fake/http-signature-test | test http signature authentication
[**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean | [**fakeOuterBooleanSerialize**](FakeApi.md#fakeOuterBooleanSerialize) | **POST** /fake/outer/boolean |
[**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite | [**fakeOuterCompositeSerialize**](FakeApi.md#fakeOuterCompositeSerialize) | **POST** /fake/outer/composite |
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
@@ -12,7 +13,7 @@ Method | HTTP request | Description
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; model [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \&quot;client\&quot; model
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 [**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters [**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
[**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) [**testGroupParameters**](FakeApi.md#testGroupParameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties [**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
@@ -21,13 +22,11 @@ Method | HTTP request | Description
## createXmlItem ## fakeHealthGet
> createXmlItem(xmlItem) > HealthCheckResult fakeHealthGet()
creates an XmlItem Health check endpoint
this route creates an XmlItem
### Example ### Example
@@ -45,11 +44,74 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
XmlItem xmlItem = new XmlItem(); // XmlItem | XmlItem Body
try { try {
apiInstance.createXmlItem(xmlItem); HealthCheckResult result = apiInstance.fakeHealthGet();
System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#createXmlItem"); System.err.println("Exception when calling FakeApi#fakeHealthGet");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**HealthCheckResult**](HealthCheckResult.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | The instance started successfully | - |
## fakeHttpSignatureTest
> fakeHttpSignatureTest(pet, query1, header1)
test http signature authentication
### Example
```java
// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
String query1 = "query1_example"; // String | query parameter
String header1 = "header1_example"; // String | header parameter
try {
apiInstance.fakeHttpSignatureTest(pet, query1, header1);
} catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeHttpSignatureTest");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody()); System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders()); System.err.println("Response headers: " + e.getResponseHeaders());
@@ -64,7 +126,9 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
**query1** | **String**| query parameter | [optional]
**header1** | **String**| header parameter | [optional]
### Return type ### Return type
@@ -72,17 +136,17 @@ null (empty response body)
### Authorization ### Authorization
No authorization required [http_signature_test](../README.md#http_signature_test)
### HTTP request headers ### HTTP request headers
- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 - **Content-Type**: application/json, application/xml
- **Accept**: Not defined - **Accept**: Not defined
### HTTP response details ### HTTP response details
| Status code | Description | Response headers | | Status code | Description | Response headers |
|-------------|-------------|------------------| |-------------|-------------|------------------|
| **200** | successful operation | - | | **200** | The instance started successfully | - |
## fakeOuterBooleanSerialize ## fakeOuterBooleanSerialize
@@ -141,7 +205,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: */* - **Accept**: */*
### HTTP response details ### HTTP response details
@@ -152,7 +216,7 @@ No authorization required
## fakeOuterCompositeSerialize ## fakeOuterCompositeSerialize
> OuterComposite fakeOuterCompositeSerialize(body) > OuterComposite fakeOuterCompositeSerialize(outerComposite)
@@ -174,9 +238,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
OuterComposite body = new OuterComposite(); // OuterComposite | Input composite as post body OuterComposite outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body
try { try {
OuterComposite result = apiInstance.fakeOuterCompositeSerialize(body); OuterComposite result = apiInstance.fakeOuterCompositeSerialize(outerComposite);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize"); System.err.println("Exception when calling FakeApi#fakeOuterCompositeSerialize");
@@ -194,7 +258,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional]
### Return type ### Return type
@@ -206,7 +270,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: */* - **Accept**: */*
### HTTP response details ### HTTP response details
@@ -271,7 +335,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: */* - **Accept**: */*
### HTTP response details ### HTTP response details
@@ -336,7 +400,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: */* - **Accept**: */*
### HTTP response details ### HTTP response details
@@ -347,7 +411,7 @@ No authorization required
## testBodyWithFileSchema ## testBodyWithFileSchema
> testBodyWithFileSchema(body) > testBodyWithFileSchema(fileSchemaTestClass)
@@ -369,9 +433,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
FileSchemaTestClass body = new FileSchemaTestClass(); // FileSchemaTestClass | FileSchemaTestClass fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
try { try {
apiInstance.testBodyWithFileSchema(body); apiInstance.testBodyWithFileSchema(fileSchemaTestClass);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithFileSchema"); System.err.println("Exception when calling FakeApi#testBodyWithFileSchema");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -388,7 +452,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
### Return type ### Return type
@@ -411,7 +475,7 @@ No authorization required
## testBodyWithQueryParams ## testBodyWithQueryParams
> testBodyWithQueryParams(query, body) > testBodyWithQueryParams(query, user)
@@ -432,9 +496,9 @@ public class Example {
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
String query = "query_example"; // String | String query = "query_example"; // String |
User body = new User(); // User | User user = new User(); // User |
try { try {
apiInstance.testBodyWithQueryParams(query, body); apiInstance.testBodyWithQueryParams(query, user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testBodyWithQueryParams"); System.err.println("Exception when calling FakeApi#testBodyWithQueryParams");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -452,7 +516,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**query** | **String**| | **query** | **String**| |
**body** | [**User**](User.md)| | **user** | [**User**](User.md)| |
### Return type ### Return type
@@ -475,7 +539,7 @@ No authorization required
## testClientModel ## testClientModel
> Client testClientModel(body) > Client testClientModel(client)
To test \&quot;client\&quot; model To test \&quot;client\&quot; model
@@ -497,9 +561,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
Client body = new Client(); // Client | client model Client client = new Client(); // Client | client model
try { try {
Client result = apiInstance.testClientModel(body); Client result = apiInstance.testClientModel(client);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testClientModel"); System.err.println("Exception when calling FakeApi#testClientModel");
@@ -517,7 +581,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model | **client** | [**Client**](Client.md)| client model |
### Return type ### Return type
@@ -542,12 +606,13 @@ No authorization required
> testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback) > testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback)
Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
Fake endpoint for testing various parameters Fake endpoint for testing various parameters
假端點 假端點
偽のエンドポイント 偽のエンドポイント
가짜 엔드 포인트 가짜 엔드 포인트
### Example ### Example
@@ -732,6 +797,7 @@ Fake endpoint to test group parameters (optional)
import org.openapitools.client.ApiClient; import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException; import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration; import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*; import org.openapitools.client.models.*;
import org.openapitools.client.api.FakeApi; import org.openapitools.client.api.FakeApi;
@@ -739,6 +805,10 @@ public class Example {
public static void main(String[] args) { public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient(); ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
// Configure HTTP bearer authorization: bearer_test
HttpBearerAuth bearer_test = (HttpBearerAuth) defaultClient.getAuthentication("bearer_test");
bearer_test.setBearerToken("BEARER TOKEN");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
Integer requiredStringGroup = 56; // Integer | Required String in group parameters Integer requiredStringGroup = 56; // Integer | Required String in group parameters
@@ -785,7 +855,7 @@ null (empty response body)
### Authorization ### Authorization
No authorization required [bearer_test](../README.md#bearer_test)
### HTTP request headers ### HTTP request headers
@@ -800,7 +870,7 @@ No authorization required
## testInlineAdditionalProperties ## testInlineAdditionalProperties
> testInlineAdditionalProperties(param) > testInlineAdditionalProperties(requestBody)
test inline additionalProperties test inline additionalProperties
@@ -820,9 +890,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
FakeApi apiInstance = new FakeApi(defaultClient); FakeApi apiInstance = new FakeApi(defaultClient);
Map<String, String> param = new HashMap(); // Map<String, String> | request body Map<String, String> requestBody = new HashMap(); // Map<String, String> | request body
try { try {
apiInstance.testInlineAdditionalProperties(param); apiInstance.testInlineAdditionalProperties(requestBody);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties"); System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -839,7 +909,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**param** | [**Map&lt;String, String&gt;**](String.md)| request body | **requestBody** | [**Map&lt;String, String&gt;**](String.md)| request body |
### Return type ### Return type

View File

@@ -10,7 +10,7 @@ Method | HTTP request | Description
## testClassname ## testClassname
> Client testClassname(body) > Client testClassname(client)
To test class name in snake case To test class name in snake case
@@ -39,9 +39,9 @@ public class Example {
//api_key_query.setApiKeyPrefix("Token"); //api_key_query.setApiKeyPrefix("Token");
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient); FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api(defaultClient);
Client body = new Client(); // Client | client model Client client = new Client(); // Client | client model
try { try {
Client result = apiInstance.testClassname(body); Client result = apiInstance.testClassname(client);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling FakeClassnameTags123Api#testClassname"); System.err.println("Exception when calling FakeClassnameTags123Api#testClassname");
@@ -59,7 +59,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model | **client** | [**Client**](Client.md)| client model |
### Return type ### Return type

View File

@@ -0,0 +1,12 @@
# Foo
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **String** | | [optional]

View File

@@ -19,7 +19,8 @@ Name | Type | Description | Notes
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional] **uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | | **password** | **String** | |
**bigDecimal** | [**BigDecimal**](BigDecimal.md) | | [optional] **patternWithDigits** | **String** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**patternWithDigitsAndDelimiter** | **String** | A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01. | [optional]

View File

@@ -0,0 +1,13 @@
# HealthCheckResult
Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullableMessage** | **String** | | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **String** | Updated name of the pet | [optional]
**status** | **String** | Updated status of the pet | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject1
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**file** | [**File**](File.md) | file to upload | [optional]

View File

@@ -0,0 +1,32 @@
# InlineObject2
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**enumFormStringArray** | [**List&lt;EnumFormStringArrayEnum&gt;**](#List&lt;EnumFormStringArrayEnum&gt;) | Form parameter enum test (string array) | [optional]
**enumFormString** | [**EnumFormStringEnum**](#EnumFormStringEnum) | Form parameter enum test (string) | [optional]
## Enum: List&lt;EnumFormStringArrayEnum&gt;
Name | Value
---- | -----
GREATER_THAN | &quot;&gt;&quot;
DOLLAR | &quot;$&quot;
## Enum: EnumFormStringEnum
Name | Value
---- | -----
_ABC | &quot;_abc&quot;
_EFG | &quot;-efg&quot;
_XYZ_ | &quot;(xyz)&quot;

View File

@@ -0,0 +1,25 @@
# InlineObject3
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integer** | **Integer** | None | [optional]
**int32** | **Integer** | None | [optional]
**int64** | **Long** | None | [optional]
**number** | [**BigDecimal**](BigDecimal.md) | None |
**_float** | **Float** | None | [optional]
**_double** | **Double** | None |
**string** | **String** | None | [optional]
**patternWithoutDelimiter** | **String** | None |
**_byte** | **byte[]** | None |
**binary** | [**File**](File.md) | None | [optional]
**date** | [**LocalDate**](LocalDate.md) | None | [optional]
**dateTime** | [**OffsetDateTime**](OffsetDateTime.md) | None | [optional]
**password** | **String** | None | [optional]
**callback** | **String** | None | [optional]

View File

@@ -0,0 +1,13 @@
# InlineObject4
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**param** | **String** | field1 |
**param2** | **String** | field2 |

View File

@@ -0,0 +1,13 @@
# InlineObject5
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additionalMetadata** | **String** | Additional data to pass to server | [optional]
**requiredFile** | [**File**](File.md) | file to upload |

View File

@@ -0,0 +1,12 @@
# InlineResponseDefault
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string** | [**Foo**](Foo.md) | | [optional]

View File

@@ -0,0 +1,23 @@
# NullableClass
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**integerProp** | **Integer** | | [optional]
**numberProp** | [**BigDecimal**](BigDecimal.md) | | [optional]
**booleanProp** | **Boolean** | | [optional]
**stringProp** | **String** | | [optional]
**dateProp** | [**LocalDate**](LocalDate.md) | | [optional]
**datetimeProp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional]
**arrayNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayAndItemsNullableProp** | **List&lt;Object&gt;** | | [optional]
**arrayItemsNullable** | **List&lt;Object&gt;** | | [optional]
**objectNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectAndItemsNullableProp** | **Map&lt;String, Object&gt;** | | [optional]
**objectItemsNullable** | **Map&lt;String, Object&gt;** | | [optional]

View File

@@ -0,0 +1,15 @@
# OuterEnumDefaultValue
## Enum
* `PLACED` (value: `"placed"`)
* `APPROVED` (value: `"approved"`)
* `DELIVERED` (value: `"delivered"`)

View File

@@ -0,0 +1,15 @@
# OuterEnumInteger
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -0,0 +1,15 @@
# OuterEnumIntegerDefaultValue
## Enum
* `NUMBER_0` (value: `0`)
* `NUMBER_1` (value: `1`)
* `NUMBER_2` (value: `2`)

View File

@@ -18,7 +18,7 @@ Method | HTTP request | Description
## addPet ## addPet
> addPet(body) > addPet(pet)
Add a new pet to the store Add a new pet to the store
@@ -43,9 +43,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient); PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try { try {
apiInstance.addPet(body); apiInstance.addPet(pet);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#addPet"); System.err.println("Exception when calling PetApi#addPet");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -62,7 +62,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
@@ -80,7 +80,6 @@ null (empty response body)
### HTTP response details ### HTTP response details
| Status code | Description | Response headers | | Status code | Description | Response headers |
|-------------|-------------|------------------| |-------------|-------------|------------------|
| **200** | successful operation | - |
| **405** | Invalid input | - | | **405** | Invalid input | - |
@@ -150,7 +149,6 @@ null (empty response body)
### HTTP response details ### HTTP response details
| Status code | Description | Response headers | | Status code | Description | Response headers |
|-------------|-------------|------------------| |-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid pet value | - | | **400** | Invalid pet value | - |
@@ -372,7 +370,7 @@ Name | Type | Description | Notes
## updatePet ## updatePet
> updatePet(body) > updatePet(pet)
Update an existing pet Update an existing pet
@@ -397,9 +395,9 @@ public class Example {
petstore_auth.setAccessToken("YOUR ACCESS TOKEN"); petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
PetApi apiInstance = new PetApi(defaultClient); PetApi apiInstance = new PetApi(defaultClient);
Pet body = new Pet(); // Pet | Pet object that needs to be added to the store Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try { try {
apiInstance.updatePet(body); apiInstance.updatePet(pet);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#updatePet"); System.err.println("Exception when calling PetApi#updatePet");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -416,7 +414,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
### Return type ### Return type
@@ -434,7 +432,6 @@ null (empty response body)
### HTTP response details ### HTTP response details
| Status code | Description | Response headers | | Status code | Description | Response headers |
|-------------|-------------|------------------| |-------------|-------------|------------------|
| **200** | successful operation | - |
| **400** | Invalid ID supplied | - | | **400** | Invalid ID supplied | - |
| **404** | Pet not found | - | | **404** | Pet not found | - |
| **405** | Validation exception | - | | **405** | Validation exception | - |

View File

@@ -213,7 +213,7 @@ No authorization required
## placeOrder ## placeOrder
> Order placeOrder(body) > Order placeOrder(order)
Place an order for a pet Place an order for a pet
@@ -233,9 +233,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
StoreApi apiInstance = new StoreApi(defaultClient); StoreApi apiInstance = new StoreApi(defaultClient);
Order body = new Order(); // Order | order placed for purchasing the pet Order order = new Order(); // Order | order placed for purchasing the pet
try { try {
Order result = apiInstance.placeOrder(body); Order result = apiInstance.placeOrder(order);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling StoreApi#placeOrder"); System.err.println("Exception when calling StoreApi#placeOrder");
@@ -253,7 +253,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**Order**](Order.md)| order placed for purchasing the pet | **order** | [**Order**](Order.md)| order placed for purchasing the pet |
### Return type ### Return type
@@ -265,7 +265,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
### HTTP response details ### HTTP response details

View File

@@ -17,7 +17,7 @@ Method | HTTP request | Description
## createUser ## createUser
> createUser(body) > createUser(user)
Create user Create user
@@ -39,9 +39,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient); UserApi apiInstance = new UserApi(defaultClient);
User body = new User(); // User | Created user object User user = new User(); // User | Created user object
try { try {
apiInstance.createUser(body); apiInstance.createUser(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUser"); System.err.println("Exception when calling UserApi#createUser");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -58,7 +58,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**User**](User.md)| Created user object | **user** | [**User**](User.md)| Created user object |
### Return type ### Return type
@@ -70,7 +70,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: Not defined
### HTTP response details ### HTTP response details
@@ -81,7 +81,7 @@ No authorization required
## createUsersWithArrayInput ## createUsersWithArrayInput
> createUsersWithArrayInput(body) > createUsersWithArrayInput(user)
Creates list of users with given input array Creates list of users with given input array
@@ -101,9 +101,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient); UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object List<User> user = Arrays.asList(); // List<User> | List of user object
try { try {
apiInstance.createUsersWithArrayInput(body); apiInstance.createUsersWithArrayInput(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithArrayInput"); System.err.println("Exception when calling UserApi#createUsersWithArrayInput");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -120,7 +120,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type ### Return type
@@ -132,7 +132,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: Not defined
### HTTP response details ### HTTP response details
@@ -143,7 +143,7 @@ No authorization required
## createUsersWithListInput ## createUsersWithListInput
> createUsersWithListInput(body) > createUsersWithListInput(user)
Creates list of users with given input array Creates list of users with given input array
@@ -163,9 +163,9 @@ public class Example {
defaultClient.setBasePath("http://petstore.swagger.io:80/v2"); defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
UserApi apiInstance = new UserApi(defaultClient); UserApi apiInstance = new UserApi(defaultClient);
List<User> body = Arrays.asList(); // List<User> | List of user object List<User> user = Arrays.asList(); // List<User> | List of user object
try { try {
apiInstance.createUsersWithListInput(body); apiInstance.createUsersWithListInput(user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#createUsersWithListInput"); System.err.println("Exception when calling UserApi#createUsersWithListInput");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -182,7 +182,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**body** | [**List&lt;User&gt;**](User.md)| List of user object | **user** | [**List&lt;User&gt;**](User.md)| List of user object |
### Return type ### Return type
@@ -194,7 +194,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: Not defined
### HTTP response details ### HTTP response details
@@ -459,7 +459,7 @@ No authorization required
## updateUser ## updateUser
> updateUser(username, body) > updateUser(username, user)
Updated user Updated user
@@ -482,9 +482,9 @@ public class Example {
UserApi apiInstance = new UserApi(defaultClient); UserApi apiInstance = new UserApi(defaultClient);
String username = "username_example"; // String | name that need to be deleted String username = "username_example"; // String | name that need to be deleted
User body = new User(); // User | Updated user object User user = new User(); // User | Updated user object
try { try {
apiInstance.updateUser(username, body); apiInstance.updateUser(username, user);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling UserApi#updateUser"); System.err.println("Exception when calling UserApi#updateUser");
System.err.println("Status code: " + e.getCode()); System.err.println("Status code: " + e.getCode());
@@ -502,7 +502,7 @@ public class Example {
Name | Type | Description | Notes Name | Type | Description | Notes
------------- | ------------- | ------------- | ------------- ------------- | ------------- | ------------- | -------------
**username** | **String**| name that need to be deleted | **username** | **String**| name that need to be deleted |
**body** | [**User**](User.md)| Updated user object | **user** | [**User**](User.md)| Updated user object |
### Return type ### Return type
@@ -514,7 +514,7 @@ No authorization required
### HTTP request headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: application/json
- **Accept**: Not defined - **Accept**: Not defined
### HTTP response details ### HTTP response details

View File

@@ -56,7 +56,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version> <version>3.0.0-M4</version>
<configuration> <configuration>
<systemProperties> <systemProperties>
<property> <property>
@@ -66,7 +66,7 @@
</systemProperties> </systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine> <argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel> <parallel>methods</parallel>
<forkMode>pertest</forkMode> <threadCount>10</threadCount>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -135,10 +135,17 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version> <version>3.8.1</version>
<configuration> <configuration>
<source>1.7</source> <source>1.7</source>
<target>1.7</target> <target>1.7</target>
<fork>true</fork>
<meminitial>128m</meminitial>
<maxmem>512m</maxmem>
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-J-Xss4m</arg><!-- Compiling the generated JSON.java file may require larger stack size. -->
</compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
@@ -261,17 +268,22 @@
<artifactId>jackson-databind-nullable</artifactId> <artifactId>jackson-databind-nullable</artifactId>
<version>${jackson-databind-nullable-version}</version> <version>${jackson-databind-nullable-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.joschi.jackson</groupId> <groupId>com.github.joschi.jackson</groupId>
<artifactId>jackson-datatype-threetenbp</artifactId> <artifactId>jackson-datatype-threetenbp</artifactId>
<version>${threetenbp-version}</version> <version>${threetenbp-version}</version>
</dependency> </dependency>
<!-- Base64 encoding that works in both JVM and Android --> <!-- Base64 encoding that works in both JVM and Android -->
<dependency> <dependency>
<groupId>com.brsanthu</groupId> <groupId>com.brsanthu</groupId>
<artifactId>migbase64</artifactId> <artifactId>migbase64</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
<dependency>
<groupId>org.tomitribe</groupId>
<artifactId>tomitribe-http-signatures</artifactId>
<version>${http-signature-version}</version>
</dependency>
<!-- test dependencies --> <!-- test dependencies -->
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
@@ -289,5 +301,6 @@
<jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version> <jackson-databind-nullable-version>0.2.1</jackson-databind-nullable-version>
<threetenbp-version>2.9.10</threetenbp-version> <threetenbp-version>2.9.10</threetenbp-version>
<junit-version>4.13</junit-version> <junit-version>4.13</junit-version>
<http-signature-version>1.3</http-signature-version>
</properties> </properties>
</project> </project>

View File

@@ -1,5 +1,26 @@
package org.openapitools.client; package org.openapitools.client;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.ws.rs.client.Client; import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder; import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity; import javax.ws.rs.client.Entity;
@@ -10,69 +31,97 @@ import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status; import javax.ws.rs.core.Response.Status;
import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties; import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider; import org.glassfish.jersey.client.HttpUrlConnectorProvider;
import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.logging.LoggingFeature;
import org.glassfish.jersey.media.multipart.FormDataBodyPart; import org.glassfish.jersey.media.multipart.FormDataBodyPart;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition; import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.MultiPart; import org.glassfish.jersey.media.multipart.MultiPart;
import org.glassfish.jersey.media.multipart.MultiPartFeature; import org.glassfish.jersey.media.multipart.MultiPartFeature;
import org.openapitools.client.auth.ApiKeyAuth;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import org.glassfish.jersey.logging.LoggingFeature;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Date;
import java.util.TimeZone;
import java.net.URLEncoder;
import java.io.File;
import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.openapitools.client.auth.Authentication; import org.openapitools.client.auth.Authentication;
import org.openapitools.client.auth.HttpBasicAuth; import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth; import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth; import org.openapitools.client.auth.HttpSignatureAuth;
import org.openapitools.client.model.AbstractOpenApiSchema;
import org.openapitools.client.auth.OAuth; import org.openapitools.client.auth.OAuth;
import org.openapitools.client.model.AbstractOpenApiSchema;
public class ApiClient { public class ApiClient {
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>(); protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
protected Map<String, String> defaultCookieMap = new HashMap<String, String>(); protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
protected String basePath = "http://petstore.swagger.io:80/v2"; protected String basePath = "http://petstore.swagger.io:80/v2";
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList( protected List<ServerConfiguration> servers =
new ServerConfiguration( new ArrayList<ServerConfiguration>(
"http://petstore.swagger.io:80/v2", Arrays.asList(
"No description provided", new ServerConfiguration(
new HashMap<String, ServerVariable>() "http://{server}.swagger.io:{port}/v2",
) "petstore server",
)); new HashMap<String, ServerVariable>() {
{
put(
"server",
new ServerVariable(
"No description provided",
"petstore",
new HashSet<String>(
Arrays.asList("petstore", "qa-petstore", "dev-petstore"))));
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<String, List<ServerConfiguration>>() {
{
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",
"No description provided",
new HashMap<String, ServerVariable>()))));
put(
"PetApi.updatePet",
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",
"No description provided",
new HashMap<String, ServerVariable>()))));
}
};
protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>(); protected Map<String, Integer> operationServerIndex = new HashMap<String, Integer>();
protected Map<String, Map<String, String>> operationServerVariables = new HashMap<String, Map<String, String>>(); protected Map<String, Map<String, String>> operationServerVariables =
new HashMap<String, Map<String, String>>();
protected boolean debugging = false; protected boolean debugging = false;
protected int connectionTimeout = 0; protected int connectionTimeout = 0;
private int readTimeout = 0; private int readTimeout = 0;
@@ -99,7 +148,10 @@ public class ApiClient {
authentications = new HashMap<String, Authentication>(); authentications = new HashMap<String, Authentication>();
authentications.put("api_key", new ApiKeyAuth("header", "api_key")); authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query")); authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
authentications.put("bearer_test", new HttpBearerAuth("bearer"));
authentications.put("http_basic_test", new HttpBasicAuth()); authentications.put("http_basic_test", new HttpBasicAuth());
authentications.put(
"http_signature_test", new HttpSignatureAuth("http_signature_test", null, null));
authentications.put("petstore_auth", new OAuth()); authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified. // Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications); authentications = Collections.unmodifiableMap(authentications);
@@ -110,6 +162,7 @@ public class ApiClient {
/** /**
* Gets the JSON instance to do JSON serialization and deserialization. * Gets the JSON instance to do JSON serialization and deserialization.
*
* @return JSON * @return JSON
*/ */
public JSON getJSON() { public JSON getJSON() {
@@ -163,6 +216,7 @@ public class ApiClient {
/** /**
* Get authentications (key: authentication name, value: authentication). * Get authentications (key: authentication name, value: authentication).
*
* @return Map of authentication object * @return Map of authentication object
*/ */
public Map<String, Authentication> getAuthentications() { public Map<String, Authentication> getAuthentications() {
@@ -181,6 +235,7 @@ public class ApiClient {
/** /**
* Helper method to set username for the first HTTP basic authentication. * Helper method to set username for the first HTTP basic authentication.
*
* @param username Username * @param username Username
*/ */
public void setUsername(String username) { public void setUsername(String username) {
@@ -195,6 +250,7 @@ public class ApiClient {
/** /**
* Helper method to set password for the first HTTP basic authentication. * Helper method to set password for the first HTTP basic authentication.
*
* @param password Password * @param password Password
*/ */
public void setPassword(String password) { public void setPassword(String password) {
@@ -209,6 +265,7 @@ public class ApiClient {
/** /**
* Helper method to set API key value for the first API key authentication. * Helper method to set API key value for the first API key authentication.
*
* @param apiKey API key * @param apiKey API key
*/ */
public void setApiKey(String apiKey) { public void setApiKey(String apiKey) {
@@ -242,6 +299,7 @@ public class ApiClient {
/** /**
* Helper method to set API key prefix for the first API key authentication. * Helper method to set API key prefix for the first API key authentication.
*
* @param apiKeyPrefix API key prefix * @param apiKeyPrefix API key prefix
*/ */
public void setApiKeyPrefix(String apiKeyPrefix) { public void setApiKeyPrefix(String apiKeyPrefix) {
@@ -256,6 +314,7 @@ public class ApiClient {
/** /**
* Helper method to set bearer token for the first Bearer authentication. * Helper method to set bearer token for the first Bearer authentication.
*
* @param bearerToken Bearer token * @param bearerToken Bearer token
*/ */
public void setBearerToken(String bearerToken) { public void setBearerToken(String bearerToken) {
@@ -270,6 +329,7 @@ public class ApiClient {
/** /**
* Helper method to set access token for the first OAuth2 authentication. * Helper method to set access token for the first OAuth2 authentication.
*
* @param accessToken Access token * @param accessToken Access token
*/ */
public void setAccessToken(String accessToken) { public void setAccessToken(String accessToken) {
@@ -284,6 +344,7 @@ public class ApiClient {
/** /**
* Set the User-Agent header's value (by adding to the default header map). * Set the User-Agent header's value (by adding to the default header map).
*
* @param userAgent Http user agent * @param userAgent Http user agent
* @return API client * @return API client
*/ */
@@ -318,6 +379,7 @@ public class ApiClient {
/** /**
* Check that whether debugging is enabled for this API client. * Check that whether debugging is enabled for this API client.
*
* @return True if debugging is switched on * @return True if debugging is switched on
*/ */
public boolean isDebugging() { public boolean isDebugging() {
@@ -338,9 +400,8 @@ public class ApiClient {
} }
/** /**
* The path of temporary folder used to store downloaded files from endpoints * The path of temporary folder used to store downloaded files from endpoints with file response.
* with file response. The default value is <code>null</code>, i.e. using * The default value is <code>null</code>, i.e. using the system's default tempopary folder.
* the system's default tempopary folder.
* *
* @return Temp folder path * @return Temp folder path
*/ */
@@ -350,6 +411,7 @@ public class ApiClient {
/** /**
* Set temp folder path * Set temp folder path
*
* @param tempFolderPath Temp folder path * @param tempFolderPath Temp folder path
* @return API client * @return API client
*/ */
@@ -360,6 +422,7 @@ public class ApiClient {
/** /**
* Connect timeout (in milliseconds). * Connect timeout (in milliseconds).
*
* @return Connection timeout * @return Connection timeout
*/ */
public int getConnectTimeout() { public int getConnectTimeout() {
@@ -367,9 +430,9 @@ public class ApiClient {
} }
/** /**
* Set the connect timeout (in milliseconds). * Set the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values must
* A value of 0 means no timeout, otherwise values must be between 1 and * be between 1 and {@link Integer#MAX_VALUE}.
* {@link Integer#MAX_VALUE}. *
* @param connectionTimeout Connection timeout in milliseconds * @param connectionTimeout Connection timeout in milliseconds
* @return API client * @return API client
*/ */
@@ -381,6 +444,7 @@ public class ApiClient {
/** /**
* read timeout (in milliseconds). * read timeout (in milliseconds).
*
* @return Read timeout * @return Read timeout
*/ */
public int getReadTimeout() { public int getReadTimeout() {
@@ -388,9 +452,9 @@ public class ApiClient {
} }
/** /**
* Set the read timeout (in milliseconds). * Set the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must be
* A value of 0 means no timeout, otherwise values must be between 1 and * between 1 and {@link Integer#MAX_VALUE}.
* {@link Integer#MAX_VALUE}. *
* @param readTimeout Read timeout in milliseconds * @param readTimeout Read timeout in milliseconds
* @return API client * @return API client
*/ */
@@ -402,6 +466,7 @@ public class ApiClient {
/** /**
* Get the date format used to parse/format date parameters. * Get the date format used to parse/format date parameters.
*
* @return Date format * @return Date format
*/ */
public DateFormat getDateFormat() { public DateFormat getDateFormat() {
@@ -410,6 +475,7 @@ public class ApiClient {
/** /**
* Set the date format used to parse/format date parameters. * Set the date format used to parse/format date parameters.
*
* @param dateFormat Date format * @param dateFormat Date format
* @return API client * @return API client
*/ */
@@ -422,6 +488,7 @@ public class ApiClient {
/** /**
* Parse the given string into Date object. * Parse the given string into Date object.
*
* @param str String * @param str String
* @return Date * @return Date
*/ */
@@ -435,6 +502,7 @@ public class ApiClient {
/** /**
* Format the given Date object into string. * Format the given Date object into string.
*
* @param date Date * @param date Date
* @return Date in string format * @return Date in string format
*/ */
@@ -444,6 +512,7 @@ public class ApiClient {
/** /**
* Format the given parameter object into string. * Format the given parameter object into string.
*
* @param param Object * @param param Object
* @return Object in string format * @return Object in string format
*/ */
@@ -454,8 +523,8 @@ public class ApiClient {
return formatDate((Date) param); return formatDate((Date) param);
} else if (param instanceof Collection) { } else if (param instanceof Collection) {
StringBuilder b = new StringBuilder(); StringBuilder b = new StringBuilder();
for(Object o : (Collection)param) { for (Object o : (Collection) param) {
if(b.length() > 0) { if (b.length() > 0) {
b.append(','); b.append(',');
} }
b.append(String.valueOf(o)); b.append(String.valueOf(o));
@@ -473,7 +542,7 @@ public class ApiClient {
* @param value Value * @param value Value
* @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<Pair>();
// preconditions // preconditions
@@ -487,12 +556,13 @@ public class ApiClient {
return params; return params;
} }
if (valueCollection.isEmpty()){ if (valueCollection.isEmpty()) {
return params; return params;
} }
// get the collection format (default: csv) // get the collection format (default: csv)
String format = (collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat); String format =
(collectionFormat == null || collectionFormat.isEmpty() ? "csv" : collectionFormat);
// create the params based on the collection format // create the params based on the collection format
if ("multi".equals(format)) { if ("multi".equals(format)) {
@@ -515,7 +585,7 @@ public class ApiClient {
delimiter = "|"; delimiter = "|";
} }
StringBuilder sb = new StringBuilder() ; StringBuilder sb = new StringBuilder();
for (Object item : valueCollection) { for (Object item : valueCollection) {
sb.append(delimiter); sb.append(delimiter);
sb.append(parameterToString(item)); sb.append(parameterToString(item));
@@ -527,13 +597,9 @@ public class ApiClient {
} }
/** /**
* Check if the given MIME is a JSON MIME. * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json application/json;
* JSON MIME examples: * charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also default to JSON
* application/json *
* application/json; charset=UTF8
* APPLICATION/JSON
* application/vnd.company+json
* "* / *" is also default to JSON
* @param mime MIME * @param mime MIME
* @return True if the MIME type is JSON * @return True if the MIME type is JSON
*/ */
@@ -543,13 +609,12 @@ public class ApiClient {
} }
/** /**
* Select the Accept header's value from the given accepts array: * Select the Accept header's value from the given accepts array: if JSON exists in the given
* if JSON exists in the given array, use it; * array, use it; otherwise use all of them (joining into a string)
* otherwise use all of them (joining into a string)
* *
* @param accepts The accepts array to select from * @param accepts The accepts array to select from
* @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
* null will be returned (not to set the Accept header explicitly). * set the Accept header explicitly).
*/ */
public String selectHeaderAccept(String[] accepts) { public String selectHeaderAccept(String[] accepts) {
if (accepts.length == 0) { if (accepts.length == 0) {
@@ -564,13 +629,11 @@ public class ApiClient {
} }
/** /**
* Select the Content-Type header's value from the given array: * Select the Content-Type header's value from the given array: if JSON exists in the given array,
* if JSON exists in the given array, use it; * use it; otherwise use the first one of the array.
* otherwise use the first one of the array.
* *
* @param contentTypes The Content-Type array to select from * @param contentTypes The Content-Type array to select from
* @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.length == 0) {
@@ -586,6 +649,7 @@ public class ApiClient {
/** /**
* Escape the given string to be used as URL query value. * Escape the given string to be used as URL query value.
*
* @param str String * @param str String
* @return Escaped string * @return Escaped string
*/ */
@@ -598,33 +662,41 @@ public class ApiClient {
} }
/** /**
* Serialize the given Java object into string entity according the given * Serialize the given Java object into string entity according the given Content-Type (only JSON
* Content-Type (only JSON is supported for now). * is supported for now).
*
* @param obj Object * @param obj Object
* @param formParams Form parameters * @param formParams Form parameters
* @param contentType Context type * @param contentType Context type
* @return Entity * @return Entity
* @throws ApiException API exception * @throws ApiException API exception
*/ */
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType) throws ApiException { public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType)
throws ApiException {
Entity<?> entity; Entity<?> entity;
if (contentType.startsWith("multipart/form-data")) { if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart(); MultiPart multiPart = new MultiPart();
for (Entry<String, Object> param: formParams.entrySet()) { for (Entry<String, Object> param : formParams.entrySet()) {
if (param.getValue() instanceof File) { if (param.getValue() instanceof File) {
File file = (File) param.getValue(); File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()) FormDataContentDisposition contentDisp =
.fileName(file.getName()).size(file.length()).build(); FormDataContentDisposition.name(param.getKey())
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE)); .fileName(file.getName())
.size(file.length())
.build();
multiPart.bodyPart(
new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
} else { } else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build(); FormDataContentDisposition contentDisp =
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue()))); FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(
new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
} }
} }
entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE); entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE);
} else if (contentType.startsWith("application/x-www-form-urlencoded")) { } else if (contentType.startsWith("application/x-www-form-urlencoded")) {
Form form = new Form(); Form form = new Form();
for (Entry<String, Object> param: formParams.entrySet()) { for (Entry<String, Object> param : formParams.entrySet()) {
form.param(param.getKey(), parameterToString(param.getValue())); form.param(param.getKey(), parameterToString(param.getValue()));
} }
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE); entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
@@ -635,7 +707,47 @@ public class ApiClient {
return entity; return entity;
} }
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema) throws ApiException{ /**
* Serialize the given Java object into string according the given Content-Type (only JSON, HTTP
* form is supported for now).
*
* @param obj Object
* @param formParams Form parameters
* @param contentType Context type
* @return String
* @throws ApiException API exception
*/
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType)
throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException(
"multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString =
param.getKey()
+ "="
+ URLEncoder.encode(parameterToString(param.getValue()), "UTF-8")
+ "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
return json.getMapper().writeValueAsString(obj);
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
public AbstractOpenApiSchema deserializeSchemas(Response response, AbstractOpenApiSchema schema)
throws ApiException {
Object result = null; Object result = null;
int matchCounter = 0; int matchCounter = 0;
@@ -657,35 +769,44 @@ public class ApiClient {
} else if ("oneOf".equals(schema.getSchemaType())) { } else if ("oneOf".equals(schema.getSchemaType())) {
matchSchemas.add(schemaName); matchSchemas.add(schemaName);
} else { } else {
throw new ApiException("Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType()); throw new ApiException(
"Unknowe type found while expecting anyOf/oneOf:" + schema.getSchemaType());
} }
} else { } else {
// failed to deserialize the response in the schema provided, proceed to the next one if any // failed to deserialize the response in the schema provided, proceed to the next one if
// any
} }
} catch (Exception ex) { } catch (Exception ex) {
// failed to deserialize, do nothing and try next one (schema) // failed to deserialize, do nothing and try next one (schema)
} }
} else {// unknown type } else { // unknown type
throw new ApiException(schemaType.getClass() + " is not a GenericType and cannot be handled properly in deserialization."); throw new ApiException(
schemaType.getClass()
+ " is not a GenericType and cannot be handled properly in deserialization.");
} }
} }
if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) {// more than 1 match for oneOf if (matchCounter > 1 && "oneOf".equals(schema.getSchemaType())) { // more than 1 match for oneOf
throw new ApiException("Response body is invalid as it matches more than one schema (" + String.join(", ", matchSchemas) + ") defined in the oneOf model: " + schema.getClass().getName()); throw new ApiException(
"Response body is invalid as it matches more than one schema ("
+ String.join(", ", matchSchemas)
+ ") defined in the oneOf model: "
+ schema.getClass().getName());
} else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas } else if (matchCounter == 0) { // fail to match any in oneOf/anyOf schemas
throw new ApiException("Response body is invalid as it doens't match any schemas (" + String.join(", ", schema.getSchemas().keySet()) + ") defined in the oneOf/anyOf model: " + schema.getClass().getName()); throw new ApiException(
"Response body is invalid as it doens't match any schemas ("
+ String.join(", ", schema.getSchemas().keySet())
+ ") defined in the oneOf/anyOf model: "
+ schema.getClass().getName());
} else { // only one matched } else { // only one matched
schema.setActualInstance(result); schema.setActualInstance(result);
return schema; return schema;
} }
} }
/** /**
* Deserialize response body to Java object according to the Content-Type. * Deserialize response body to Java object according to the Content-Type.
*
* @param <T> Type * @param <T> Type
* @param response Response * @param response Response
* @param returnType Return type * @param returnType Return type
@@ -720,6 +841,7 @@ public class ApiClient {
/** /**
* Download file from the given response. * Download file from the given response.
*
* @param response Response * @param response Response
* @return File * @return File
* @throws ApiException If fail to read file content from response and write to disk * @throws ApiException If fail to read file content from response and write to disk
@@ -727,7 +849,10 @@ public class ApiClient {
public File downloadFileFromResponse(Response response) throws ApiException { public File downloadFileFromResponse(Response response) throws ApiException {
try { try {
File file = prepareDownloadFile(response); File file = prepareDownloadFile(response);
Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); Files.copy(
response.readEntity(InputStream.class),
file.toPath(),
StandardCopyOption.REPLACE_EXISTING);
return file; return file;
} catch (IOException e) { } catch (IOException e) {
throw new ApiException(e); throw new ApiException(e);
@@ -741,8 +866,7 @@ public class ApiClient {
// Get filename from the Content-Disposition header. // Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition); Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find()) if (matcher.find()) filename = matcher.group(1);
filename = matcher.group(1);
} }
String prefix; String prefix;
@@ -759,14 +883,11 @@ public class ApiClient {
suffix = filename.substring(pos); suffix = filename.substring(pos);
} }
// File.createTempFile requires the prefix to be at least three characters long // File.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3) if (prefix.length() < 3) prefix = "download-";
prefix = "download-";
} }
if (tempFolderPath == null) if (tempFolderPath == null) return File.createTempFile(prefix, suffix);
return File.createTempFile(prefix, suffix); else return File.createTempFile(prefix, suffix, new File(tempFolderPath));
else
return File.createTempFile(prefix, suffix, new File(tempFolderPath));
} }
/** /**
@@ -789,8 +910,21 @@ public class ApiClient {
* @return The response body in type of string * @return The response body in type of string
* @throws ApiException API exception * @throws ApiException API exception
*/ */
public <T> ApiResponse<T> invokeAPI(String operation, String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException { public <T> ApiResponse<T> invokeAPI(
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams); String operation,
String path,
String method,
List<Pair> queryParams,
Object body,
Map<String, String> headerParams,
Map<String, String> cookieParams,
Map<String, Object> formParams,
String accept,
String contentType,
String[] authNames,
GenericType<T> returnType,
AbstractOpenApiSchema schema)
throws ApiException {
// Not using `.target(targetURL).path(path)` below, // Not using `.target(targetURL).path(path)` below,
// to support (constant) query string in `path`, e.g. "/posts?draft=1" // to support (constant) query string in `path`, e.g. "/posts?draft=1"
@@ -810,9 +944,10 @@ public class ApiClient {
serverConfigurations = servers; serverConfigurations = servers;
} }
if (index < 0 || index >= serverConfigurations.size()) { if (index < 0 || index >= serverConfigurations.size()) {
throw new ArrayIndexOutOfBoundsException(String.format( throw new ArrayIndexOutOfBoundsException(
"Invalid index %d when selecting the host settings. Must be less than %d", index, serverConfigurations.size() String.format(
)); "Invalid index %d when selecting the host settings. Must be less than %d",
index, serverConfigurations.size()));
} }
targetURL = serverConfigurations.get(index).URL(variables) + path; targetURL = serverConfigurations.get(index).URL(variables) + path;
} else { } else {
@@ -863,6 +998,21 @@ public class ApiClient {
Entity<?> entity = serialize(body, formParams, contentType); Entity<?> entity = serialize(body, formParams, contentType);
// put all headers in one place
Map<String, String> allHeaderParams = new HashMap<>();
allHeaderParams.putAll(defaultHeaderMap);
allHeaderParams.putAll(headerParams);
// update different parameters (e.g. headers) for authentication
updateParamsForAuth(
authNames,
queryParams,
allHeaderParams,
cookieParams,
serializeToString(body, formParams, contentType),
method,
target.getUri());
Response response = null; Response response = null;
try { try {
@@ -892,14 +1042,13 @@ public class ApiClient {
if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) { if (response.getStatus() == Status.NO_CONTENT.getStatusCode()) {
return new ApiResponse<>(statusCode, responseHeaders); return new ApiResponse<>(statusCode, responseHeaders);
} else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) { } else if (response.getStatusInfo().getFamily() == Status.Family.SUCCESSFUL) {
if (returnType == null) if (returnType == null) return new ApiResponse<>(statusCode, responseHeaders);
return new ApiResponse<>(statusCode, responseHeaders); else if (schema == null) {
else return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType));
if (schema == null) { } else { // oneOf/anyOf
return new ApiResponse<>(statusCode, responseHeaders, deserialize(response, returnType)); return new ApiResponse<>(
} else { // oneOf/anyOf statusCode, responseHeaders, (T) deserializeSchemas(response, schema));
return new ApiResponse<>(statusCode, responseHeaders, (T)deserializeSchemas(response, schema)); }
}
} else { } else {
String message = "error"; String message = "error";
String respBody = null; String respBody = null;
@@ -912,30 +1061,53 @@ public class ApiClient {
} }
} }
throw new ApiException( throw new ApiException(
response.getStatus(), response.getStatus(), message, buildResponseHeaders(response), respBody);
message,
buildResponseHeaders(response),
respBody);
} }
} finally { } finally {
try { try {
response.close(); response.close();
} catch (Exception e) { } catch (Exception e) {
// it's not critical, since the response object is local in method invokeAPI; that's fine, just continue // it's not critical, since the response object is local in method invokeAPI; that's fine,
// just continue
} }
} }
} }
/** /** @deprecated Add qualified name of the operation as a first parameter. */
* @deprecated Add qualified name of the operation as a first parameter.
*/
@Deprecated @Deprecated
public <T> ApiResponse<T> invokeAPI(String path, String method, List<Pair> queryParams, Object body, Map<String, String> headerParams, Map<String, String> cookieParams, Map<String, Object> formParams, String accept, String contentType, String[] authNames, GenericType<T> returnType, AbstractOpenApiSchema schema) throws ApiException { public <T> ApiResponse<T> invokeAPI(
return invokeAPI(null, path, method, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames, returnType, schema); String path,
String method,
List<Pair> queryParams,
Object body,
Map<String, String> headerParams,
Map<String, String> cookieParams,
Map<String, Object> formParams,
String accept,
String contentType,
String[] authNames,
GenericType<T> returnType,
AbstractOpenApiSchema schema)
throws ApiException {
return invokeAPI(
null,
path,
method,
queryParams,
body,
headerParams,
cookieParams,
formParams,
accept,
contentType,
authNames,
returnType,
schema);
} }
/** /**
* Build the Client used to make HTTP requests. * Build the Client used to make HTTP requests.
*
* @param debugging Debug setting * @param debugging Debug setting
* @return Client * @return Client
*/ */
@@ -948,13 +1120,21 @@ public class ApiClient {
// turn off compliance validation to be able to send payloads with DELETE calls // turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true); clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
if (debugging) { if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */)); clientConfig.register(
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY); new LoggingFeature(
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME),
java.util.logging.Level.INFO,
LoggingFeature.Verbosity.PAYLOAD_ANY,
1024 * 50 /* Log payloads up to 50K */));
clientConfig.property(
LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL // Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL); java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME)
.setLevel(java.util.logging.Level.ALL);
} else { } else {
// suppress warnings for payloads with DELETE calls: // suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE); java.util.logging.Logger.getLogger("org.glassfish.jersey.client")
.setLevel(java.util.logging.Level.SEVERE);
} }
performAdditionalClientConfiguration(clientConfig); performAdditionalClientConfiguration(clientConfig);
return ClientBuilder.newClient(clientConfig); return ClientBuilder.newClient(clientConfig);
@@ -966,7 +1146,7 @@ public class ApiClient {
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<String, List<String>>();
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<String>();
for (Object o : values) { for (Object o : values) {
@@ -984,12 +1164,24 @@ public class ApiClient {
* @param queryParams List of query parameters * @param queryParams List of query parameters
* @param headerParams Map of header parameters * @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters * @param cookieParams Map of cookie parameters
* @param method HTTP method (e.g. POST)
* @param uri HTTP URI
*/ */
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { protected void updateParamsForAuth(
String[] authNames,
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
for (String authName : authNames) { for (String authName : authNames) {
Authentication auth = authentications.get(authName); Authentication auth = authentications.get(authName);
if (auth == null) throw new RuntimeException("Authentication undefined: " + authName); if (auth == null) {
auth.applyToParams(queryParams, headerParams, cookieParams); throw new RuntimeException("Authentication undefined: " + authName);
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
} }
} }
} }

View File

@@ -3,89 +3,95 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client; package org.openapitools.client;
import java.util.Map;
import java.util.List; import java.util.List;
import java.util.Map;
public class ApiException extends Exception { public class ApiException extends Exception {
private int code = 0; private int code = 0;
private Map<String, List<String>> responseHeaders = null; private Map<String, List<String>> responseHeaders = null;
private String responseBody = null; private String responseBody = null;
public ApiException() {} public ApiException() {}
public ApiException(Throwable throwable) { public ApiException(Throwable throwable) {
super(throwable); super(throwable);
} }
public ApiException(String message) { public ApiException(String message) {
super(message); super(message);
} }
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(
super(message, throwable); String message,
this.code = code; Throwable throwable,
this.responseHeaders = responseHeaders; int code,
this.responseBody = responseBody; Map<String, List<String>> responseHeaders,
} String responseBody) {
super(message, throwable);
this.code = code;
this.responseHeaders = responseHeaders;
this.responseBody = responseBody;
}
public ApiException(String message, int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(
this(message, (Throwable) null, code, responseHeaders, responseBody); String message, int code, Map<String, List<String>> responseHeaders, String responseBody) {
} this(message, (Throwable) null, code, responseHeaders, responseBody);
}
public ApiException(String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) { public ApiException(
this(message, throwable, code, responseHeaders, null); String message, Throwable throwable, int code, Map<String, List<String>> responseHeaders) {
} this(message, throwable, code, responseHeaders, null);
}
public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(int code, Map<String, List<String>> responseHeaders, String responseBody) {
this((String) null, (Throwable) null, code, responseHeaders, responseBody); this((String) null, (Throwable) null, code, responseHeaders, responseBody);
} }
public ApiException(int code, String message) { public ApiException(int code, String message) {
super(message); super(message);
this.code = code; this.code = code;
} }
public ApiException(int code, String message, Map<String, List<String>> responseHeaders, String responseBody) { public ApiException(
this(code, message); int code, String message, Map<String, List<String>> responseHeaders, String responseBody) {
this.responseHeaders = responseHeaders; this(code, message);
this.responseBody = responseBody; this.responseHeaders = responseHeaders;
} this.responseBody = responseBody;
}
/** /**
* Get the HTTP status code. * Get the HTTP status code.
* *
* @return HTTP status code * @return HTTP status code
*/ */
public int getCode() { public int getCode() {
return code; return code;
} }
/** /**
* Get the HTTP response headers. * Get the HTTP response headers.
* *
* @return A map of list of string * @return A map of list of string
*/ */
public Map<String, List<String>> getResponseHeaders() { public Map<String, List<String>> getResponseHeaders() {
return responseHeaders; return responseHeaders;
} }
/** /**
* Get the HTTP response body. * Get the HTTP response body.
* *
* @return Response body in the form of string * @return Response body in the form of string
*/ */
public String getResponseBody() { public String getResponseBody() {
return responseBody; return responseBody;
} }
} }

View File

@@ -3,14 +3,13 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client; package org.openapitools.client;
import java.util.List; import java.util.List;
@@ -22,38 +21,38 @@ import java.util.Map;
* @param <T> The type of data that is deserialized from response body * @param <T> The type of data that is deserialized from response body
*/ */
public class ApiResponse<T> { public class ApiResponse<T> {
private final int statusCode; private final int statusCode;
private final Map<String, List<String>> headers; private final Map<String, List<String>> headers;
private final T data; private final T data;
/** /**
* @param statusCode The status code of HTTP response * @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response * @param headers The headers of HTTP response
*/ */
public ApiResponse(int statusCode, Map<String, List<String>> headers) { public ApiResponse(int statusCode, Map<String, List<String>> headers) {
this(statusCode, headers, null); this(statusCode, headers, null);
} }
/** /**
* @param statusCode The status code of HTTP response * @param statusCode The status code of HTTP response
* @param headers The headers of HTTP response * @param headers The headers of HTTP response
* @param data The object deserialized from response bod * @param data The object deserialized from response bod
*/ */
public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) { public ApiResponse(int statusCode, Map<String, List<String>> headers, T data) {
this.statusCode = statusCode; this.statusCode = statusCode;
this.headers = headers; this.headers = headers;
this.data = data; this.data = data;
} }
public int getStatusCode() { public int getStatusCode() {
return statusCode; return statusCode;
} }
public Map<String, List<String>> getHeaders() { public Map<String, List<String>> getHeaders() {
return headers; return headers;
} }
public T getData() { public T getData() {
return data; return data;
} }
} }

View File

@@ -3,37 +3,35 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client; package org.openapitools.client;
public class Configuration { public class Configuration {
private static ApiClient defaultApiClient = new ApiClient(); private static ApiClient defaultApiClient = new ApiClient();
/** /**
* Get the default API client, which would be used when creating API * Get the default API client, which would be used when creating API instances without providing
* instances without providing an API client. * an API client.
* *
* @return Default API client * @return Default API client
*/ */
public static ApiClient getDefaultApiClient() { public static ApiClient getDefaultApiClient() {
return defaultApiClient; return defaultApiClient;
} }
/** /**
* Set the default API client, which would be used when creating API * Set the default API client, which would be used when creating API instances without providing
* instances without providing an API client. * an API client.
* *
* @param apiClient API client * @param apiClient API client
*/ */
public static void setDefaultApiClient(ApiClient apiClient) { public static void setDefaultApiClient(ApiClient apiClient) {
defaultApiClient = apiClient; defaultApiClient = apiClient;
} }
} }

View File

@@ -9,6 +9,8 @@ import com.fasterxml.jackson.datatype.threetenbp.DecimalUtils;
import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase; import com.fasterxml.jackson.datatype.threetenbp.deser.ThreeTenDateTimeDeserializerBase;
import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction; import com.fasterxml.jackson.datatype.threetenbp.function.BiFunction;
import com.fasterxml.jackson.datatype.threetenbp.function.Function; import com.fasterxml.jackson.datatype.threetenbp.function.Function;
import java.io.IOException;
import java.math.BigDecimal;
import org.threeten.bp.DateTimeException; import org.threeten.bp.DateTimeException;
import org.threeten.bp.DateTimeUtils; import org.threeten.bp.DateTimeUtils;
import org.threeten.bp.Instant; import org.threeten.bp.Instant;
@@ -19,12 +21,10 @@ import org.threeten.bp.format.DateTimeFormatter;
import org.threeten.bp.temporal.Temporal; import org.threeten.bp.temporal.Temporal;
import org.threeten.bp.temporal.TemporalAccessor; import org.threeten.bp.temporal.TemporalAccessor;
import java.io.IOException;
import java.math.BigDecimal;
/** /**
* Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link ZonedDateTime}s. * Deserializer for ThreeTen temporal {@link Instant}s, {@link OffsetDateTime}, and {@link
* Adapted from the jackson threetenbp InstantDeserializer to add support for deserializing rfc822 format. * ZonedDateTime}s. Adapted from the jackson threetenbp InstantDeserializer to add support for
* deserializing rfc822 format.
* *
* @author Nick Williams * @author Nick Williams
*/ */
@@ -32,84 +32,89 @@ public class CustomInstantDeserializer<T extends Temporal>
extends ThreeTenDateTimeDeserializerBase<T> { extends ThreeTenDateTimeDeserializerBase<T> {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public static final CustomInstantDeserializer<Instant> INSTANT = new CustomInstantDeserializer<Instant>( public static final CustomInstantDeserializer<Instant> INSTANT =
Instant.class, DateTimeFormatter.ISO_INSTANT, new CustomInstantDeserializer<Instant>(
new Function<TemporalAccessor, Instant>() { Instant.class,
@Override DateTimeFormatter.ISO_INSTANT,
public Instant apply(TemporalAccessor temporalAccessor) { new Function<TemporalAccessor, Instant>() {
return Instant.from(temporalAccessor); @Override
} public Instant apply(TemporalAccessor temporalAccessor) {
}, return Instant.from(temporalAccessor);
new Function<FromIntegerArguments, Instant>() { }
@Override },
public Instant apply(FromIntegerArguments a) { new Function<FromIntegerArguments, Instant>() {
return Instant.ofEpochMilli(a.value); @Override
} public Instant apply(FromIntegerArguments a) {
}, return Instant.ofEpochMilli(a.value);
new Function<FromDecimalArguments, Instant>() { }
@Override },
public Instant apply(FromDecimalArguments a) { new Function<FromDecimalArguments, Instant>() {
return Instant.ofEpochSecond(a.integer, a.fraction); @Override
} public Instant apply(FromDecimalArguments a) {
}, return Instant.ofEpochSecond(a.integer, a.fraction);
null }
); },
null);
public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new CustomInstantDeserializer<OffsetDateTime>( public static final CustomInstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME =
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME, new CustomInstantDeserializer<OffsetDateTime>(
new Function<TemporalAccessor, OffsetDateTime>() { OffsetDateTime.class,
@Override DateTimeFormatter.ISO_OFFSET_DATE_TIME,
public OffsetDateTime apply(TemporalAccessor temporalAccessor) { new Function<TemporalAccessor, OffsetDateTime>() {
return OffsetDateTime.from(temporalAccessor); @Override
} public OffsetDateTime apply(TemporalAccessor temporalAccessor) {
}, return OffsetDateTime.from(temporalAccessor);
new Function<FromIntegerArguments, OffsetDateTime>() { }
@Override },
public OffsetDateTime apply(FromIntegerArguments a) { new Function<FromIntegerArguments, OffsetDateTime>() {
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); @Override
} public OffsetDateTime apply(FromIntegerArguments a) {
}, return OffsetDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
new Function<FromDecimalArguments, OffsetDateTime>() { }
@Override },
public OffsetDateTime apply(FromDecimalArguments a) { new Function<FromDecimalArguments, OffsetDateTime>() {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); @Override
} public OffsetDateTime apply(FromDecimalArguments a) {
}, return OffsetDateTime.ofInstant(
new BiFunction<OffsetDateTime, ZoneId, OffsetDateTime>() { Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
@Override }
public OffsetDateTime apply(OffsetDateTime d, ZoneId z) { },
return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime())); new BiFunction<OffsetDateTime, ZoneId, OffsetDateTime>() {
} @Override
} public OffsetDateTime apply(OffsetDateTime d, ZoneId z) {
); return d.withOffsetSameInstant(z.getRules().getOffset(d.toLocalDateTime()));
}
});
public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new CustomInstantDeserializer<ZonedDateTime>( public static final CustomInstantDeserializer<ZonedDateTime> ZONED_DATE_TIME =
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME, new CustomInstantDeserializer<ZonedDateTime>(
new Function<TemporalAccessor, ZonedDateTime>() { ZonedDateTime.class,
@Override DateTimeFormatter.ISO_ZONED_DATE_TIME,
public ZonedDateTime apply(TemporalAccessor temporalAccessor) { new Function<TemporalAccessor, ZonedDateTime>() {
return ZonedDateTime.from(temporalAccessor); @Override
} public ZonedDateTime apply(TemporalAccessor temporalAccessor) {
}, return ZonedDateTime.from(temporalAccessor);
new Function<FromIntegerArguments, ZonedDateTime>() { }
@Override },
public ZonedDateTime apply(FromIntegerArguments a) { new Function<FromIntegerArguments, ZonedDateTime>() {
return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId); @Override
} public ZonedDateTime apply(FromIntegerArguments a) {
}, return ZonedDateTime.ofInstant(Instant.ofEpochMilli(a.value), a.zoneId);
new Function<FromDecimalArguments, ZonedDateTime>() { }
@Override },
public ZonedDateTime apply(FromDecimalArguments a) { new Function<FromDecimalArguments, ZonedDateTime>() {
return ZonedDateTime.ofInstant(Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId); @Override
} public ZonedDateTime apply(FromDecimalArguments a) {
}, return ZonedDateTime.ofInstant(
new BiFunction<ZonedDateTime, ZoneId, ZonedDateTime>() { Instant.ofEpochSecond(a.integer, a.fraction), a.zoneId);
@Override }
public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) { },
return zonedDateTime.withZoneSameInstant(zoneId); new BiFunction<ZonedDateTime, ZoneId, ZonedDateTime>() {
} @Override
} public ZonedDateTime apply(ZonedDateTime zonedDateTime, ZoneId zoneId) {
); return zonedDateTime.withZoneSameInstant(zoneId);
}
});
protected final Function<FromIntegerArguments, T> fromMilliseconds; protected final Function<FromIntegerArguments, T> fromMilliseconds;
@@ -119,22 +124,26 @@ public class CustomInstantDeserializer<T extends Temporal>
protected final BiFunction<T, ZoneId, T> adjust; protected final BiFunction<T, ZoneId, T> adjust;
protected CustomInstantDeserializer(Class<T> supportedType, protected CustomInstantDeserializer(
DateTimeFormatter parser, Class<T> supportedType,
Function<TemporalAccessor, T> parsedToValue, DateTimeFormatter parser,
Function<FromIntegerArguments, T> fromMilliseconds, Function<TemporalAccessor, T> parsedToValue,
Function<FromDecimalArguments, T> fromNanoseconds, Function<FromIntegerArguments, T> fromMilliseconds,
BiFunction<T, ZoneId, T> adjust) { Function<FromDecimalArguments, T> fromNanoseconds,
BiFunction<T, ZoneId, T> adjust) {
super(supportedType, parser); super(supportedType, parser);
this.parsedToValue = parsedToValue; this.parsedToValue = parsedToValue;
this.fromMilliseconds = fromMilliseconds; this.fromMilliseconds = fromMilliseconds;
this.fromNanoseconds = fromNanoseconds; this.fromNanoseconds = fromNanoseconds;
this.adjust = adjust == null ? new BiFunction<T, ZoneId, T>() { this.adjust =
@Override adjust == null
public T apply(T t, ZoneId zoneId) { ? new BiFunction<T, ZoneId, T>() {
return t; @Override
} public T apply(T t, ZoneId zoneId) {
} : adjust; return t;
}
}
: adjust;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@@ -156,49 +165,50 @@ public class CustomInstantDeserializer<T extends Temporal>
@Override @Override
public T deserialize(JsonParser parser, DeserializationContext context) throws IOException { public T deserialize(JsonParser parser, DeserializationContext context) throws IOException {
//NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only // NOTE: Timestamps contain no timezone info, and are always in configured TZ. Only
//string values have to be adjusted to the configured TZ. // string values have to be adjusted to the configured TZ.
switch (parser.getCurrentTokenId()) { switch (parser.getCurrentTokenId()) {
case JsonTokenId.ID_NUMBER_FLOAT: { case JsonTokenId.ID_NUMBER_FLOAT:
BigDecimal value = parser.getDecimalValue(); {
long seconds = value.longValue(); BigDecimal value = parser.getDecimalValue();
int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds); long seconds = value.longValue();
return fromNanoseconds.apply(new FromDecimalArguments( int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
seconds, nanoseconds, getZone(context))); return fromNanoseconds.apply(
} new FromDecimalArguments(seconds, nanoseconds, getZone(context)));
}
case JsonTokenId.ID_NUMBER_INT: { case JsonTokenId.ID_NUMBER_INT:
long timestamp = parser.getLongValue(); {
if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) { long timestamp = parser.getLongValue();
return this.fromNanoseconds.apply(new FromDecimalArguments( if (context.isEnabled(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)) {
timestamp, 0, this.getZone(context) return this.fromNanoseconds.apply(
)); new FromDecimalArguments(timestamp, 0, this.getZone(context)));
}
return this.fromMilliseconds.apply(new FromIntegerArguments(
timestamp, this.getZone(context)
));
}
case JsonTokenId.ID_STRING: {
String string = parser.getText().trim();
if (string.length() == 0) {
return null;
}
if (string.endsWith("+0000")) {
string = string.substring(0, string.length() - 5) + "Z";
}
T value;
try {
TemporalAccessor acc = _formatter.parse(string);
value = parsedToValue.apply(acc);
if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
return adjust.apply(value, this.getZone(context));
} }
} catch (DateTimeException e) { return this.fromMilliseconds.apply(
throw _peelDTE(e); new FromIntegerArguments(timestamp, this.getZone(context)));
}
case JsonTokenId.ID_STRING:
{
String string = parser.getText().trim();
if (string.length() == 0) {
return null;
}
if (string.endsWith("+0000")) {
string = string.substring(0, string.length() - 5) + "Z";
}
T value;
try {
TemporalAccessor acc = _formatter.parse(string);
value = parsedToValue.apply(acc);
if (context.isEnabled(DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE)) {
return adjust.apply(value, this.getZone(context));
}
} catch (DateTimeException e) {
throw _peelDTE(e);
}
return value;
} }
return value;
}
} }
throw context.mappingException("Expected type float, integer, or string."); throw context.mappingException("Expected type float, integer, or string.");
} }

View File

@@ -1,15 +1,12 @@
package org.openapitools.client; package org.openapitools.client;
import org.threeten.bp.*;
import com.fasterxml.jackson.annotation.*; import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.*; import com.fasterxml.jackson.databind.*;
import org.openapitools.jackson.nullable.JsonNullableModule;
import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule; import com.fasterxml.jackson.datatype.threetenbp.ThreeTenModule;
import java.text.DateFormat; import java.text.DateFormat;
import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.ContextResolver;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.threeten.bp.*;
public class JSON implements ContextResolver<ObjectMapper> { public class JSON implements ContextResolver<ObjectMapper> {
private ObjectMapper mapper; private ObjectMapper mapper;
@@ -34,6 +31,7 @@ public class JSON implements ContextResolver<ObjectMapper> {
/** /**
* Set the date format for JSON (de)serialization with Date properties. * Set the date format for JSON (de)serialization with Date properties.
*
* @param dateFormat Date format * @param dateFormat Date format
*/ */
public void setDateFormat(DateFormat dateFormat) { public void setDateFormat(DateFormat dateFormat) {
@@ -44,4 +42,8 @@ public class JSON implements ContextResolver<ObjectMapper> {
public ObjectMapper getContext(Class<?> type) { public ObjectMapper getContext(Class<?> type) {
return mapper; return mapper;
} }
public ObjectMapper getMapper() {
return mapper;
}
} }

View File

@@ -3,59 +3,57 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client; package org.openapitools.client;
public class Pair { public class Pair {
private String name = ""; private String name = "";
private String value = ""; private String value = "";
public Pair (String name, String value) { public Pair(String name, String value) {
setName(name); setName(name);
setValue(value); setValue(value);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
} }
private void setName(String name) { this.name = name;
if (!isValidString(name)) { }
return;
}
this.name = name; private void setValue(String value) {
if (!isValidString(value)) {
return;
} }
private void setValue(String value) { this.value = value;
if (!isValidString(value)) { }
return;
}
this.value = value; public String getName() {
return this.name;
}
public String getValue() {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
} }
public String getName() { if (arg.trim().isEmpty()) {
return this.name; return false;
} }
public String getValue() { return true;
return this.value; }
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
if (arg.trim().isEmpty()) {
return false;
}
return true;
}
} }

View File

@@ -3,7 +3,7 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
@@ -14,11 +14,9 @@ package org.openapitools.client;
import com.fasterxml.jackson.databind.util.ISO8601DateFormat; import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
import com.fasterxml.jackson.databind.util.ISO8601Utils; import com.fasterxml.jackson.databind.util.ISO8601Utils;
import java.text.FieldPosition; import java.text.FieldPosition;
import java.util.Date; import java.util.Date;
public class RFC3339DateFormat extends ISO8601DateFormat { public class RFC3339DateFormat extends ISO8601DateFormat {
// Same as ISO8601DateFormat but serializing milliseconds. // Same as ISO8601DateFormat but serializing milliseconds.
@@ -28,5 +26,4 @@ public class RFC3339DateFormat extends ISO8601DateFormat {
toAppendTo.append(value); toAppendTo.append(value);
return toAppendTo; return toAppendTo;
} }
}
}

View File

@@ -2,57 +2,58 @@ package org.openapitools.client;
import java.util.Map; import java.util.Map;
/** /** Representing a Server configuration. */
* Representing a Server configuration.
*/
public class ServerConfiguration { public class ServerConfiguration {
public String URL; public String URL;
public String description; public String description;
public Map<String, ServerVariable> variables; public Map<String, ServerVariable> variables;
/** /**
* @param URL A URL to the target host. * @param URL A URL to the target host.
* @param description A describtion of the host designated by the URL. * @param description A describtion of the host designated by the URL.
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. * @param variables A map between a variable name and its value. The value is used for
*/ * substitution in the server's URL template.
public ServerConfiguration(String URL, String description, Map<String, ServerVariable> variables) { */
this.URL = URL; public ServerConfiguration(
this.description = description; String URL, String description, Map<String, ServerVariable> variables) {
this.variables = variables; this.URL = URL;
} this.description = description;
this.variables = variables;
}
/** /**
* Format URL template using given variables. * Format URL template using given variables.
* *
* @param variables A map between a variable name and its value. * @param variables A map between a variable name and its value.
* @return Formatted URL. * @return Formatted URL.
*/ */
public String URL(Map<String, String> variables) { public String URL(Map<String, String> variables) {
String url = this.URL; String url = this.URL;
// go through variables and replace placeholders // go through variables and replace placeholders
for (Map.Entry<String, ServerVariable> variable: this.variables.entrySet()) { for (Map.Entry<String, ServerVariable> variable : this.variables.entrySet()) {
String name = variable.getKey(); String name = variable.getKey();
ServerVariable serverVariable = variable.getValue(); ServerVariable serverVariable = variable.getValue();
String value = serverVariable.defaultValue; String value = serverVariable.defaultValue;
if (variables != null && variables.containsKey(name)) { if (variables != null && variables.containsKey(name)) {
value = variables.get(name); value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
throw new RuntimeException("The variable " + name + " in the server URL has invalid value " + value + "."); throw new RuntimeException(
} "The variable " + name + " in the server URL has invalid value " + value + ".");
}
url = url.replaceAll("\\{" + name + "\\}", value);
} }
return url; }
url = url.replaceAll("\\{" + name + "\\}", value);
} }
return url;
}
/** /**
* Format URL template using default server variables. * Format URL template using default server variables.
* *
* @return Formatted URL. * @return Formatted URL.
*/ */
public String URL() { public String URL() {
return URL(null); return URL(null);
} }
} }

View File

@@ -2,22 +2,21 @@ package org.openapitools.client;
import java.util.HashSet; import java.util.HashSet;
/** /** Representing a Server Variable for server URL template substitution. */
* Representing a Server Variable for server URL template substitution.
*/
public class ServerVariable { public class ServerVariable {
public String description; public String description;
public String defaultValue; public String defaultValue;
public HashSet<String> enumValues = null; public HashSet<String> enumValues = null;
/** /**
* @param description A description for the server variable. * @param description A description for the server variable.
* @param defaultValue The default value to use for substitution. * @param defaultValue The default value to use for substitution.
* @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. * @param enumValues An enumeration of string values to be used if the substitution options are
*/ * from a limited set.
public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) { */
this.description = description; public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) {
this.defaultValue = defaultValue; this.description = description;
this.enumValues = enumValues; this.defaultValue = defaultValue;
} this.enumValues = enumValues;
}
} }

View File

@@ -3,17 +3,15 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client; package org.openapitools.client;
public class StringUtil { public class StringUtil {
/** /**
* Check if the given array contains the given value (with case-insensitive comparison). * Check if the given array contains the given value (with case-insensitive comparison).
@@ -36,12 +34,11 @@ public class StringUtil {
/** /**
* Join an array of strings with the given separator. * Join an array of strings with the given separator.
* <p>
* Note: This might be replaced by utility method from commons-lang or guava someday
* if one of those libraries is added as dependency.
* </p>
* *
* @param array The array of strings * <p>Note: This might be replaced by utility method from commons-lang or guava someday if one of
* those libraries is added as dependency.
*
* @param array The array of strings
* @param separator The separator * @param separator The separator
* @return the resulting string * @return the resulting string
*/ */

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api; package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
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.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Client;
public class AnotherFakeApi { public class AnotherFakeApi {
private ApiClient apiClient; private ApiClient apiClient;
@@ -35,41 +31,42 @@ public class AnotherFakeApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* To test special tags * To test special tags To test special tags and operation ID starting with number
* To test special tags and operation ID starting with number *
* @param body client model (required) * @param client client model (required)
* @return Client * @return Client
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public Client call123testSpecialTags(Client body) throws ApiException { public Client call123testSpecialTags(Client client) throws ApiException {
return call123testSpecialTagsWithHttpInfo(body).getData(); return call123testSpecialTagsWithHttpInfo(client).getData();
} }
/** /**
* To test special tags * To test special tags To test special tags and operation ID starting with number
* To test special tags and operation ID starting with number *
* @param body client model (required) * @param client client model (required)
* @return ApiResponse&lt;Client&gt; * @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = client;
// verify the required parameter 'body' is set // verify the required parameter 'client' is set
if (body == null) { if (client == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling call123testSpecialTags"); throw new ApiException(
400, "Missing the required parameter 'client' when calling call123testSpecialTags");
} }
// create path and map variables // create path and map variables
String localVarPath = "/another-fake/dummy"; String localVarPath = "/another-fake/dummy";
@@ -79,26 +76,29 @@ public class AnotherFakeApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/json"};
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
GenericType<Client> localVarReturnType = new GenericType<Client>() {}; GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI("AnotherFakeApi.call123testSpecialTags", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "AnotherFakeApi.call123testSpecialTags",
localVarAuthNames, localVarReturnType, null); localVarPath,
"PATCH",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
} }

View File

@@ -0,0 +1,94 @@
package org.openapitools.client.api;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.InlineResponseDefault;
public class DefaultApi {
private ApiClient apiClient;
public DefaultApi() {
this(Configuration.getDefaultApiClient());
}
public DefaultApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* @return InlineResponseDefault
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> response </td><td> - </td></tr>
* </table>
*/
public InlineResponseDefault fooGet() throws ApiException {
return fooGetWithHttpInfo().getData();
}
/**
* @return ApiResponse&lt;InlineResponseDefault&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table summary="Response Details" border="1">
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 0 </td><td> response </td><td> - </td></tr>
* </table>
*/
public ApiResponse<InlineResponseDefault> fooGetWithHttpInfo() throws ApiException {
Object localVarPostBody = null;
// 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<InlineResponseDefault> localVarReturnType =
new GenericType<InlineResponseDefault>() {};
return apiClient.invokeAPI(
"DefaultApi.fooGet",
localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
}
}

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api; package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
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.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Client;
public class FakeClassnameTags123Api { public class FakeClassnameTags123Api {
private ApiClient apiClient; private ApiClient apiClient;
@@ -35,41 +31,42 @@ public class FakeClassnameTags123Api {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* To test class name in snake case * To test class name in snake case To test class name in snake case
* To test class name in snake case *
* @param body client model (required) * @param client client model (required)
* @return Client * @return Client
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public Client testClassname(Client body) throws ApiException { public Client testClassname(Client client) throws ApiException {
return testClassnameWithHttpInfo(body).getData(); return testClassnameWithHttpInfo(client).getData();
} }
/** /**
* To test class name in snake case * To test class name in snake case To test class name in snake case
* To test class name in snake case *
* @param body client model (required) * @param client client model (required)
* @return ApiResponse&lt;Client&gt; * @return ApiResponse&lt;Client&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException { public ApiResponse<Client> testClassnameWithHttpInfo(Client client) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = client;
// verify the required parameter 'body' is set // verify the required parameter 'client' is set
if (body == null) { if (client == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling testClassname"); throw new ApiException(
400, "Missing the required parameter 'client' when calling testClassname");
} }
// create path and map variables // create path and map variables
String localVarPath = "/fake_classname_test"; String localVarPath = "/fake_classname_test";
@@ -79,26 +76,29 @@ public class FakeClassnameTags123Api {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/json"};
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
"application/json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key_query" }; String[] localVarAuthNames = new String[] {"api_key_query"};
GenericType<Client> localVarReturnType = new GenericType<Client>() {}; GenericType<Client> localVarReturnType = new GenericType<Client>() {};
return apiClient.invokeAPI("FakeClassnameTags123Api.testClassname", localVarPath, "PATCH", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "FakeClassnameTags123Api.testClassname",
localVarAuthNames, localVarReturnType, null); localVarPath,
"PATCH",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
} }

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api; package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
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.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.Order;
public class StoreApi { public class StoreApi {
private ApiClient apiClient; private ApiClient apiClient;
@@ -35,45 +31,49 @@ public class StoreApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* Delete purchase order by ID * Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * above 1000 or nonintegers will generate API errors
*
* @param orderId ID of the order that needs to be deleted (required) * @param orderId ID of the order that needs to be deleted (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr> * <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table> * </table>
*/ */
public void deleteOrder(String orderId) throws ApiException { public void deleteOrder(String orderId) throws ApiException {
deleteOrderWithHttpInfo(orderId); deleteOrderWithHttpInfo(orderId);
} }
/** /**
* Delete purchase order by ID * Delete purchase order by ID For valid response try integer IDs with value &lt; 1000. Anything
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors * above 1000 or nonintegers will generate API errors
*
* @param orderId ID of the order that needs to be deleted (required) * @param orderId ID of the order that needs to be deleted (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr> * <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException { public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'orderId' is set // 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 // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath =
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@@ -81,55 +81,60 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("StoreApi.deleteOrder", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "StoreApi.deleteOrder",
localVarAuthNames, null, null); localVarPath,
"DELETE",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Returns pet inventories by status * Returns pet inventories by status Returns a map of status codes to quantities
* Returns a map of status codes to quantities *
* @return Map&lt;String, Integer&gt; * @return Map&lt;String, Integer&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public Map<String, Integer> getInventory() throws ApiException { public Map<String, Integer> getInventory() throws ApiException {
return getInventoryWithHttpInfo().getData(); return getInventoryWithHttpInfo().getData();
} }
/** /**
* Returns pet inventories by status * Returns pet inventories by status Returns a map of status codes to quantities
* Returns a map of status codes to quantities *
* @return ApiResponse&lt;Map&lt;String, Integer&gt;&gt; * @return ApiResponse&lt;Map&lt;String, Integer&gt;&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException { public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
String localVarPath = "/store/inventory"; String localVarPath = "/store/inventory";
@@ -139,71 +144,80 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/json"};
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" }; 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", localVarPath, "GET", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "StoreApi.getInventory",
localVarAuthNames, localVarReturnType, null); localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
/** /**
* Find purchase order by ID * Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt;
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * 10. Other values will generated exceptions
*
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @return Order * @return Order
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr> * <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table> * </table>
*/ */
public Order getOrderById(Long orderId) throws ApiException { public Order getOrderById(Long orderId) throws ApiException {
return getOrderByIdWithHttpInfo(orderId).getData(); return getOrderByIdWithHttpInfo(orderId).getData();
} }
/** /**
* Find purchase order by ID * Find purchase order by ID For valid response try integer IDs with value &lt;&#x3D; 5 or &gt;
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions * 10. Other values will generated exceptions
*
* @param orderId ID of pet that needs to be fetched (required) * @param orderId ID of pet that needs to be fetched (required)
* @return ApiResponse&lt;Order&gt; * @return ApiResponse&lt;Order&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid ID supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> Order not found </td><td> - </td></tr> * <tr><td> 404 </td><td> Order not found </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException { public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'orderId' is set // 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 // create path and map variables
String localVarPath = "/store/order/{order_id}" String localVarPath =
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString())); "/store/order/{order_id}"
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@@ -211,66 +225,70 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/xml", "application/json"};
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
GenericType<Order> localVarReturnType = new GenericType<Order>() {}; GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI("StoreApi.getOrderById", localVarPath, "GET", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "StoreApi.getOrderById",
localVarAuthNames, localVarReturnType, null); localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
/** /**
* Place an order for a pet * Place an order for a pet
* *
* @param body order placed for purchasing the pet (required) * @param order order placed for purchasing the pet (required)
* @return Order * @return Order
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table> * </table>
*/ */
public Order placeOrder(Order body) throws ApiException { public Order placeOrder(Order order) throws ApiException {
return placeOrderWithHttpInfo(body).getData(); return placeOrderWithHttpInfo(order).getData();
} }
/** /**
* Place an order for a pet * Place an order for a pet
* *
* @param body order placed for purchasing the pet (required) * @param order order placed for purchasing the pet (required)
* @return ApiResponse&lt;Order&gt; * @return ApiResponse&lt;Order&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid Order </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException { public ApiResponse<Order> placeOrderWithHttpInfo(Order order) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = order;
// verify the required parameter 'body' is set // verify the required parameter 'order' is set
if (body == null) { if (order == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling placeOrder"); throw new ApiException(400, "Missing the required parameter 'order' when calling placeOrder");
} }
// create path and map variables // create path and map variables
String localVarPath = "/store/order"; String localVarPath = "/store/order";
@@ -280,26 +298,29 @@ public class StoreApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/xml", "application/json"};
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
GenericType<Order> localVarReturnType = new GenericType<Order>() {}; GenericType<Order> localVarReturnType = new GenericType<Order>() {};
return apiClient.invokeAPI("StoreApi.placeOrder", localVarPath, "POST", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "StoreApi.placeOrder",
localVarAuthNames, localVarReturnType, null); localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
} }

View File

@@ -1,20 +1,16 @@
package org.openapitools.client.api; package org.openapitools.client.api;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import javax.ws.rs.core.GenericType;
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.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.GenericType;
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.ApiResponse;
import org.openapitools.client.Configuration;
import org.openapitools.client.Pair;
import org.openapitools.client.model.User;
public class UserApi { public class UserApi {
private ApiClient apiClient; private ApiClient apiClient;
@@ -35,40 +31,40 @@ public class UserApi {
this.apiClient = apiClient; this.apiClient = apiClient;
} }
/** /**
* Create user * Create user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param body Created user object (required) * @param user Created user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public void createUser(User body) throws ApiException { public void createUser(User user) throws ApiException {
createUserWithHttpInfo(body); createUserWithHttpInfo(user);
} }
/** /**
* Create user * Create user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param body Created user object (required) * @param user Created user object (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException { public ApiResponse<Void> createUserWithHttpInfo(User user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'body' is set // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling createUser"); throw new ApiException(400, "Missing the required parameter 'user' when calling createUser");
} }
// create path and map variables // create path and map variables
String localVarPath = "/user"; String localVarPath = "/user";
@@ -78,61 +74,67 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUser", localVarPath, "POST", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.createUser",
localVarAuthNames, null, null); localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public void createUsersWithArrayInput(List<User> body) throws ApiException { public void createUsersWithArrayInput(List<User> user) throws ApiException {
createUsersWithArrayInputWithHttpInfo(body); createUsersWithArrayInputWithHttpInfo(user);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException { public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> user)
Object localVarPostBody = body; throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'body' is set
if (body == null) { // verify the required parameter 'user' is set
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithArrayInput"); if (user == null) {
throw new ApiException(
400, "Missing the required parameter 'user' when calling createUsersWithArrayInput");
} }
// create path and map variables // create path and map variables
String localVarPath = "/user/createWithArray"; String localVarPath = "/user/createWithArray";
@@ -142,61 +144,67 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUsersWithArrayInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.createUsersWithArrayInput",
localVarAuthNames, null, null); localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public void createUsersWithListInput(List<User> body) throws ApiException { public void createUsersWithListInput(List<User> user) throws ApiException {
createUsersWithListInputWithHttpInfo(body); createUsersWithListInputWithHttpInfo(user);
} }
/** /**
* Creates list of users with given input array * Creates list of users with given input array
* *
* @param body List of user object (required) * @param user List of user object (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException { public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> user)
Object localVarPostBody = body; throws ApiException {
Object localVarPostBody = user;
// verify the required parameter 'body' is set
if (body == null) { // verify the required parameter 'user' is set
throw new ApiException(400, "Missing the required parameter 'body' when calling createUsersWithListInput"); if (user == null) {
throw new ApiException(
400, "Missing the required parameter 'user' when calling createUsersWithListInput");
} }
// create path and map variables // create path and map variables
String localVarPath = "/user/createWithList"; String localVarPath = "/user/createWithList";
@@ -206,66 +214,72 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.createUsersWithListInput", localVarPath, "POST", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.createUsersWithListInput",
localVarAuthNames, null, null); localVarPath,
"POST",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Delete user * Delete user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param username The name that needs to be deleted (required) * @param username The name that needs to be deleted (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public void deleteUser(String username) throws ApiException { public void deleteUser(String username) throws ApiException {
deleteUserWithHttpInfo(username); deleteUserWithHttpInfo(username);
} }
/** /**
* Delete user * Delete user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param username The name that needs to be deleted (required) * @param username The name that needs to be deleted (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException { public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'username' is set // 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 // create path and map variables
String localVarPath = "/user/{username}" String localVarPath =
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); "/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@@ -273,39 +287,44 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.deleteUser", localVarPath, "DELETE", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.deleteUser",
localVarAuthNames, null, null); localVarPath,
"DELETE",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Get user by user name * Get user by user name
* *
* @param username The name that needs to be fetched. Use user1 for testing. (required) * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User * @return User
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public User getUserByName(String username) throws ApiException { public User getUserByName(String username) throws ApiException {
return getUserByNameWithHttpInfo(username).getData(); return getUserByNameWithHttpInfo(username).getData();
@@ -313,29 +332,31 @@ public class UserApi {
/** /**
* Get user by user name * Get user by user name
* *
* @param username The name that needs to be fetched. Use user1 for testing. (required) * @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return ApiResponse&lt;User&gt; * @return ApiResponse&lt;User&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> - </td></tr>
<tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException { public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'username' is set // 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 // create path and map variables
String localVarPath = "/user/{username}" String localVarPath =
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); "/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@@ -343,41 +364,45 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {"application/xml", "application/json"};
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
GenericType<User> localVarReturnType = new GenericType<User>() {}; GenericType<User> localVarReturnType = new GenericType<User>() {};
return apiClient.invokeAPI("UserApi.getUserByName", localVarPath, "GET", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.getUserByName",
localVarAuthNames, localVarReturnType, null); localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
/** /**
* Logs user into the system * Logs user into the system
* *
* @param username The user name for login (required) * @param username The user name for login (required)
* @param password The password for login in clear text (required) * @param password The password for login in clear text (required)
* @return String * @return String
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</table> * </table>
*/ */
public String loginUser(String username, String password) throws ApiException { public String loginUser(String username, String password) throws ApiException {
return loginUserWithHttpInfo(username, password).getData(); return loginUserWithHttpInfo(username, password).getData();
@@ -385,31 +410,34 @@ public class UserApi {
/** /**
* Logs user into the system * Logs user into the system
* *
* @param username The user name for login (required) * @param username The user name for login (required)
* @param password The password for login in clear text (required) * @param password The password for login in clear text (required)
* @return ApiResponse&lt;String&gt; * @return ApiResponse&lt;String&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr> * <tr><td> 200 </td><td> successful operation </td><td> * X-Rate-Limit - calls per hour allowed by the user <br> * X-Expires-After - date in UTC when token expires <br> </td></tr>
<tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid username/password supplied </td><td> - </td></tr>
</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; Object localVarPostBody = null;
// verify the required parameter 'username' is set // 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 // 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 // create path and map variables
String localVarPath = "/user/login"; String localVarPath = "/user/login";
@@ -422,36 +450,41 @@ public class UserApi {
localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "username", username));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password)); localVarQueryParams.addAll(apiClient.parameterToPairs("", "password", password));
final String[] localVarAccepts = {"application/xml", "application/json"};
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
GenericType<String> localVarReturnType = new GenericType<String>() {}; GenericType<String> localVarReturnType = new GenericType<String>() {};
return apiClient.invokeAPI("UserApi.loginUser", localVarPath, "GET", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.loginUser",
localVarAuthNames, localVarReturnType, null); localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType,
null);
} }
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public void logoutUser() throws ApiException { public void logoutUser() throws ApiException {
logoutUserWithHttpInfo(); logoutUserWithHttpInfo();
@@ -459,18 +492,18 @@ public class UserApi {
/** /**
* Logs out current logged in user session * Logs out current logged in user session
* *
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 0 </td><td> successful operation </td><td> - </td></tr> * <tr><td> 0 </td><td> successful operation </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException { public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// create path and map variables // create path and map variables
String localVarPath = "/user/logout"; String localVarPath = "/user/logout";
@@ -480,73 +513,80 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.logoutUser", localVarPath, "GET", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.logoutUser",
localVarAuthNames, null, null); localVarPath,
"GET",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
/** /**
* Updated user * Updated user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param username name that need to be deleted (required) * @param username name that need to be deleted (required)
* @param body Updated user object (required) * @param user Updated user object (required)
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public void updateUser(String username, User body) throws ApiException { public void updateUser(String username, User user) throws ApiException {
updateUserWithHttpInfo(username, body); updateUserWithHttpInfo(username, user);
} }
/** /**
* Updated user * Updated user This can only be done by the logged in user.
* This can only be done by the logged in user. *
* @param username name that need to be deleted (required) * @param username name that need to be deleted (required)
* @param body Updated user object (required) * @param user Updated user object (required)
* @return ApiResponse&lt;Void&gt; * @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
* @http.response.details * @http.response.details
<table summary="Response Details" border="1"> * <table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr> * <tr><td> 400 </td><td> Invalid user supplied </td><td> - </td></tr>
<tr><td> 404 </td><td> User not found </td><td> - </td></tr> * <tr><td> 404 </td><td> User not found </td><td> - </td></tr>
</table> * </table>
*/ */
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException { public ApiResponse<Void> updateUserWithHttpInfo(String username, User user) throws ApiException {
Object localVarPostBody = body; Object localVarPostBody = user;
// verify the required parameter 'username' is set // 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 // verify the required parameter 'user' is set
if (body == null) { if (user == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling updateUser"); throw new ApiException(400, "Missing the required parameter 'user' when calling updateUser");
} }
// create path and map variables // create path and map variables
String localVarPath = "/user/{username}" String localVarPath =
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); "/user/{username}"
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
// query params // query params
List<Pair> localVarQueryParams = new ArrayList<Pair>(); List<Pair> localVarQueryParams = new ArrayList<Pair>();
@@ -554,24 +594,28 @@ public class UserApi {
Map<String, String> localVarCookieParams = new HashMap<String, String>(); Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>(); Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {};
final String[] localVarAccepts = {
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { final String[] localVarContentTypes = {"application/json"};
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] {};
return apiClient.invokeAPI("UserApi.updateUser", localVarPath, "PUT", localVarQueryParams, localVarPostBody, return apiClient.invokeAPI(
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, "UserApi.updateUser",
localVarAuthNames, null, null); localVarPath,
"PUT",
localVarQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
null,
null);
} }
} }

View File

@@ -3,21 +3,20 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
import org.openapitools.client.Pair; import java.net.URI;
import java.util.Map;
import java.util.List; import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class ApiKeyAuth implements Authentication { public class ApiKeyAuth implements Authentication {
private final String location; private final String location;
@@ -56,7 +55,14 @@ public class ApiKeyAuth implements Authentication {
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (apiKey == null) { if (apiKey == null) {
return; return;
} }

View File

@@ -3,28 +3,35 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair; import org.openapitools.client.Pair;
import java.util.Map;
import java.util.List;
public interface Authentication { public interface Authentication {
/** /**
* Apply authentication settings to header and query params. * Apply authentication settings to header and query params.
* *
* @param queryParams List of query parameters * @param queryParams List of query parameters
* @param headerParams Map of header parameters * @param headerParams Map of header parameters
* @param cookieParams Map of cookie parameters * @param cookieParams Map of cookie parameters
*/ */
void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams); void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException;
} }

View File

@@ -3,25 +3,22 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
import org.openapitools.client.Pair;
import com.migcomponents.migbase64.Base64; import com.migcomponents.migbase64.Base64;
import java.util.Map;
import java.util.List;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class HttpBasicAuth implements Authentication { public class HttpBasicAuth implements Authentication {
private String username; private String username;
@@ -44,13 +41,21 @@ public class HttpBasicAuth implements Authentication {
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (username == null && password == null) { if (username == null && password == null) {
return; return;
} }
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password); String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
try { try {
headerParams.put("Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false)); headerParams.put(
"Authorization", "Basic " + Base64.encodeToString(str.getBytes("UTF-8"), false));
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }

View File

@@ -3,21 +3,20 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
import org.openapitools.client.Pair; import java.net.URI;
import java.util.Map;
import java.util.List; import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class HttpBearerAuth implements Authentication { public class HttpBearerAuth implements Authentication {
private final String scheme; private final String scheme;
@@ -28,7 +27,8 @@ public class HttpBearerAuth implements Authentication {
} }
/** /**
* Gets the token, which together with the scheme, will be sent as the value of the Authorization header. * Gets the token, which together with the scheme, will be sent as the value of the Authorization
* header.
* *
* @return The bearer token * @return The bearer token
*/ */
@@ -37,7 +37,8 @@ public class HttpBearerAuth implements Authentication {
} }
/** /**
* Sets the token, which together with the scheme, will be sent as the value of the Authorization header. * Sets the token, which together with the scheme, will be sent as the value of the Authorization
* header.
* *
* @param bearerToken The bearer token to send in the Authorization header * @param bearerToken The bearer token to send in the Authorization header
*/ */
@@ -46,12 +47,20 @@ public class HttpBearerAuth implements Authentication {
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { public void applyToParams(
if(bearerToken == null) { List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (bearerToken == null) {
return; return;
} }
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); headerParams.put(
"Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
} }
private static String upperCaseBearer(String scheme) { private static String upperCaseBearer(String scheme) {

View File

@@ -0,0 +1,141 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.auth;
import java.net.URI;
import java.net.URLEncoder;
import java.security.Key;
import java.security.MessageDigest;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Base64;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
import org.tomitribe.auth.signatures.*;
public class HttpSignatureAuth implements Authentication {
private Signer signer;
private String name;
private Algorithm algorithm;
private List<String> headers;
public HttpSignatureAuth(String name, Algorithm algorithm, List<String> headers) {
this.name = name;
this.algorithm = algorithm;
this.headers = headers;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Algorithm getAlgorithm() {
return algorithm;
}
public void setAlgorithm(Algorithm algorithm) {
this.algorithm = algorithm;
}
public List<String> getHeaders() {
return headers;
}
public void setHeaders(List<String> headers) {
this.headers = headers;
}
public Signer getSigner() {
return signer;
}
public void setSigner(Signer signer) {
this.signer = signer;
}
public void setup(Key key) throws ApiException {
if (key == null) {
throw new ApiException("key (java.security.Key) cannot be null");
}
signer = new Signer(key, new Signature(name, algorithm, null, headers));
}
@Override
public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
try {
if (headers.contains("host")) {
headerParams.put("host", uri.getHost());
}
if (headers.contains("date")) {
headerParams.put(
"date",
new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz", Locale.US).format(new Date()));
}
if (headers.contains("digest")) {
headerParams.put(
"digest",
"SHA-256="
+ new String(
Base64.getEncoder()
.encode(MessageDigest.getInstance("SHA-256").digest(payload.getBytes()))));
}
if (signer == null) {
throw new ApiException(
"Signer cannot be null. Please run the method `setup` to set it up correctly");
}
// construct the path with the URL query string
String path = uri.getPath();
List<String> urlQueries = new ArrayList<String>();
for (Pair queryParam : queryParams) {
urlQueries.add(
queryParam.getName()
+ "="
+ URLEncoder.encode(queryParam.getValue(), "utf8").replaceAll("\\+", "%20"));
}
if (!urlQueries.isEmpty()) {
path = path + "?" + String.join("&", urlQueries);
}
headerParams.put("Authorization", signer.sign(method, path, headerParams).toString());
} catch (Exception ex) {
throw new ApiException(
"Failed to create signature in the HTTP request header: " + ex.toString());
}
}
}

View File

@@ -3,21 +3,20 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
import org.openapitools.client.Pair; import java.net.URI;
import java.util.Map;
import java.util.List; import java.util.List;
import java.util.Map;
import org.openapitools.client.ApiException;
import org.openapitools.client.Pair;
public class OAuth implements Authentication { public class OAuth implements Authentication {
private String accessToken; private String accessToken;
@@ -31,7 +30,14 @@ public class OAuth implements Authentication {
} }
@Override @Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) { public void applyToParams(
List<Pair> queryParams,
Map<String, String> headerParams,
Map<String, String> cookieParams,
String payload,
String method,
URI uri)
throws ApiException {
if (accessToken != null) { if (accessToken != null) {
headerParams.put("Authorization", "Bearer " + accessToken); headerParams.put("Authorization", "Bearer " + accessToken);
} }

View File

@@ -3,16 +3,18 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.auth; package org.openapitools.client.auth;
public enum OAuthFlow { public enum OAuthFlow {
accessCode, implicit, password, application accessCode,
implicit,
password,
application
} }

View File

@@ -3,39 +3,39 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import org.openapitools.client.ApiException;
import java.lang.reflect.Type;
import java.util.Map; import java.util.Map;
import javax.ws.rs.core.GenericType; import javax.ws.rs.core.GenericType;
public abstract class AbstractOpenApiSchema { public abstract class AbstractOpenApiSchema {
private Object instance; private Object instance;
public final String schemaType; public final String schemaType;
public AbstractOpenApiSchema(String schemaType) { public AbstractOpenApiSchema(String schemaType) {
this.schemaType = schemaType; this.schemaType = schemaType;
} }
public abstract Map<String, GenericType> getSchemas(); public abstract Map<String, GenericType> getSchemas();
public Object getActualInstance() {return instance;} public Object getActualInstance() {
return instance;
}
public void setActualInstance(Object instance) {this.instance = instance;} public void setActualInstance(Object instance) {
this.instance = instance;
}
public String getSchemaType() { public String getSchemaType() {
return schemaType; return schemaType;
} }
} }

View File

@@ -1,107 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesArray
*/
@JsonPropertyOrder({
AdditionalPropertiesArray.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesArray extends HashMap<String, List> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesArray name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesArray additionalPropertiesArray = (AdditionalPropertiesArray) o;
return Objects.equals(this.name, additionalPropertiesArray.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesArray {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,106 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesBoolean
*/
@JsonPropertyOrder({
AdditionalPropertiesBoolean.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesBoolean name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesBoolean additionalPropertiesBoolean = (AdditionalPropertiesBoolean) o;
return Objects.equals(this.name, additionalPropertiesBoolean.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesBoolean {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -3,421 +3,99 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/** /** AdditionalPropertiesClass */
* AdditionalPropertiesClass
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
AdditionalPropertiesClass.JSON_PROPERTY_MAP_STRING, AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_NUMBER, AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
AdditionalPropertiesClass.JSON_PROPERTY_MAP_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_BOOLEAN,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_INTEGER,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_ARRAY_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_STRING,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_MAP_ANYTYPE,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE1,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE2,
AdditionalPropertiesClass.JSON_PROPERTY_ANYTYPE3
}) })
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_STRING = "map_string"; public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
private Map<String, String> mapString = null; private Map<String, String> mapProperty = null;
public static final String JSON_PROPERTY_MAP_NUMBER = "map_number"; public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
private Map<String, BigDecimal> mapNumber = null; private Map<String, Map<String, String>> mapOfMapProperty = null;
public static final String JSON_PROPERTY_MAP_INTEGER = "map_integer"; public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
private Map<String, Integer> mapInteger = null;
public static final String JSON_PROPERTY_MAP_BOOLEAN = "map_boolean"; this.mapProperty = mapProperty;
private Map<String, Boolean> mapBoolean = null;
public static final String JSON_PROPERTY_MAP_ARRAY_INTEGER = "map_array_integer";
private Map<String, List<Integer>> mapArrayInteger = null;
public static final String JSON_PROPERTY_MAP_ARRAY_ANYTYPE = "map_array_anytype";
private Map<String, List<Object>> mapArrayAnytype = null;
public static final String JSON_PROPERTY_MAP_MAP_STRING = "map_map_string";
private Map<String, Map<String, String>> mapMapString = null;
public static final String JSON_PROPERTY_MAP_MAP_ANYTYPE = "map_map_anytype";
private Map<String, Map<String, Object>> mapMapAnytype = null;
public static final String JSON_PROPERTY_ANYTYPE1 = "anytype_1";
private Object anytype1;
public static final String JSON_PROPERTY_ANYTYPE2 = "anytype_2";
private Object anytype2;
public static final String JSON_PROPERTY_ANYTYPE3 = "anytype_3";
private Object anytype3;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
this.mapString = mapString;
return this; return this;
} }
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) { public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapString == null) { if (this.mapProperty == null) {
this.mapString = new HashMap<String, String>(); this.mapProperty = new HashMap<String, String>();
} }
this.mapString.put(key, mapStringItem); this.mapProperty.put(key, mapPropertyItem);
return this; return this;
} }
/** /**
* Get mapString * Get mapProperty
* @return mapString *
**/ * @return mapProperty
*/
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_STRING) @JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getMapProperty() {
public Map<String, String> getMapString() { return mapProperty;
return mapString;
} }
public void setMapProperty(Map<String, String> mapProperty) {
public void setMapString(Map<String, String> mapString) { this.mapProperty = mapProperty;
this.mapString = mapString;
} }
public AdditionalPropertiesClass mapOfMapProperty(
Map<String, Map<String, String>> mapOfMapProperty) {
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) { this.mapOfMapProperty = mapOfMapProperty;
this.mapNumber = mapNumber;
return this; return this;
} }
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) { public AdditionalPropertiesClass putMapOfMapPropertyItem(
if (this.mapNumber == null) { String key, Map<String, String> mapOfMapPropertyItem) {
this.mapNumber = new HashMap<String, BigDecimal>(); if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
} }
this.mapNumber.put(key, mapNumberItem); this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this; return this;
} }
/** /**
* Get mapNumber * Get mapOfMapProperty
* @return mapNumber *
**/ * @return mapOfMapProperty
*/
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_NUMBER) @JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapOfMapProperty() {
public Map<String, BigDecimal> getMapNumber() { return mapOfMapProperty;
return mapNumber;
} }
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
public void setMapNumber(Map<String, BigDecimal> mapNumber) { this.mapOfMapProperty = mapOfMapProperty;
this.mapNumber = mapNumber;
} }
public AdditionalPropertiesClass mapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
return this;
}
public AdditionalPropertiesClass putMapIntegerItem(String key, Integer mapIntegerItem) {
if (this.mapInteger == null) {
this.mapInteger = new HashMap<String, Integer>();
}
this.mapInteger.put(key, mapIntegerItem);
return this;
}
/**
* Get mapInteger
* @return mapInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Integer> getMapInteger() {
return mapInteger;
}
public void setMapInteger(Map<String, Integer> mapInteger) {
this.mapInteger = mapInteger;
}
public AdditionalPropertiesClass mapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
return this;
}
public AdditionalPropertiesClass putMapBooleanItem(String key, Boolean mapBooleanItem) {
if (this.mapBoolean == null) {
this.mapBoolean = new HashMap<String, Boolean>();
}
this.mapBoolean.put(key, mapBooleanItem);
return this;
}
/**
* Get mapBoolean
* @return mapBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getMapBoolean() {
return mapBoolean;
}
public void setMapBoolean(Map<String, Boolean> mapBoolean) {
this.mapBoolean = mapBoolean;
}
public AdditionalPropertiesClass mapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
return this;
}
public AdditionalPropertiesClass putMapArrayIntegerItem(String key, List<Integer> mapArrayIntegerItem) {
if (this.mapArrayInteger == null) {
this.mapArrayInteger = new HashMap<String, List<Integer>>();
}
this.mapArrayInteger.put(key, mapArrayIntegerItem);
return this;
}
/**
* Get mapArrayInteger
* @return mapArrayInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger;
}
public void setMapArrayInteger(Map<String, List<Integer>> mapArrayInteger) {
this.mapArrayInteger = mapArrayInteger;
}
public AdditionalPropertiesClass mapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
return this;
}
public AdditionalPropertiesClass putMapArrayAnytypeItem(String key, List<Object> mapArrayAnytypeItem) {
if (this.mapArrayAnytype == null) {
this.mapArrayAnytype = new HashMap<String, List<Object>>();
}
this.mapArrayAnytype.put(key, mapArrayAnytypeItem);
return this;
}
/**
* Get mapArrayAnytype
* @return mapArrayAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_ARRAY_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype;
}
public void setMapArrayAnytype(Map<String, List<Object>> mapArrayAnytype) {
this.mapArrayAnytype = mapArrayAnytype;
}
public AdditionalPropertiesClass mapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
return this;
}
public AdditionalPropertiesClass putMapMapStringItem(String key, Map<String, String> mapMapStringItem) {
if (this.mapMapString == null) {
this.mapMapString = new HashMap<String, Map<String, String>>();
}
this.mapMapString.put(key, mapMapStringItem);
return this;
}
/**
* Get mapMapString
* @return mapMapString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapString() {
return mapMapString;
}
public void setMapMapString(Map<String, Map<String, String>> mapMapString) {
this.mapMapString = mapMapString;
}
public AdditionalPropertiesClass mapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
return this;
}
public AdditionalPropertiesClass putMapMapAnytypeItem(String key, Map<String, Object> mapMapAnytypeItem) {
if (this.mapMapAnytype == null) {
this.mapMapAnytype = new HashMap<String, Map<String, Object>>();
}
this.mapMapAnytype.put(key, mapMapAnytypeItem);
return this;
}
/**
* Get mapMapAnytype
* @return mapMapAnytype
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype;
}
public void setMapMapAnytype(Map<String, Map<String, Object>> mapMapAnytype) {
this.mapMapAnytype = mapMapAnytype;
}
public AdditionalPropertiesClass anytype1(Object anytype1) {
this.anytype1 = anytype1;
return this;
}
/**
* Get anytype1
* @return anytype1
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE1)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype1() {
return anytype1;
}
public void setAnytype1(Object anytype1) {
this.anytype1 = anytype1;
}
public AdditionalPropertiesClass anytype2(Object anytype2) {
this.anytype2 = anytype2;
return this;
}
/**
* Get anytype2
* @return anytype2
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE2)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype2() {
return anytype2;
}
public void setAnytype2(Object anytype2) {
this.anytype2 = anytype2;
}
public AdditionalPropertiesClass anytype3(Object anytype3) {
this.anytype3 = anytype3;
return this;
}
/**
* Get anytype3
* @return anytype3
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ANYTYPE3)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Object getAnytype3() {
return anytype3;
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -427,47 +105,27 @@ public class AdditionalPropertiesClass {
return false; return false;
} }
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o; AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) && return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty)
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) && && Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
Objects.equals(this.mapInteger, additionalPropertiesClass.mapInteger) &&
Objects.equals(this.mapBoolean, additionalPropertiesClass.mapBoolean) &&
Objects.equals(this.mapArrayInteger, additionalPropertiesClass.mapArrayInteger) &&
Objects.equals(this.mapArrayAnytype, additionalPropertiesClass.mapArrayAnytype) &&
Objects.equals(this.mapMapString, additionalPropertiesClass.mapMapString) &&
Objects.equals(this.mapMapAnytype, additionalPropertiesClass.mapMapAnytype) &&
Objects.equals(this.anytype1, additionalPropertiesClass.anytype1) &&
Objects.equals(this.anytype2, additionalPropertiesClass.anytype2) &&
Objects.equals(this.anytype3, additionalPropertiesClass.anytype3);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3); return Objects.hash(mapProperty, mapOfMapProperty);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n"); sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n"); sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).append("\n"); sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).append("\n");
sb.append(" mapInteger: ").append(toIndentedString(mapInteger)).append("\n");
sb.append(" mapBoolean: ").append(toIndentedString(mapBoolean)).append("\n");
sb.append(" mapArrayInteger: ").append(toIndentedString(mapArrayInteger)).append("\n");
sb.append(" mapArrayAnytype: ").append(toIndentedString(mapArrayAnytype)).append("\n");
sb.append(" mapMapString: ").append(toIndentedString(mapMapString)).append("\n");
sb.append(" mapMapAnytype: ").append(toIndentedString(mapMapAnytype)).append("\n");
sb.append(" anytype1: ").append(toIndentedString(anytype1)).append("\n");
sb.append(" anytype2: ").append(toIndentedString(anytype2)).append("\n");
sb.append(" anytype3: ").append(toIndentedString(anytype3)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -475,6 +133,4 @@ public class AdditionalPropertiesClass {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -1,106 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesInteger
*/
@JsonPropertyOrder({
AdditionalPropertiesInteger.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesInteger name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesInteger additionalPropertiesInteger = (AdditionalPropertiesInteger) o;
return Objects.equals(this.name, additionalPropertiesInteger.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesInteger {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,107 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* AdditionalPropertiesNumber
*/
@JsonPropertyOrder({
AdditionalPropertiesNumber.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public AdditionalPropertiesNumber name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesNumber additionalPropertiesNumber = (AdditionalPropertiesNumber) o;
return Objects.equals(this.name, additionalPropertiesNumber.name) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(name, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesNumber {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -3,43 +3,34 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo; import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/** /** Animal */
* Animal @JsonPropertyOrder({Animal.JSON_PROPERTY_CLASS_NAME, Animal.JSON_PROPERTY_COLOR})
*/ @JsonTypeInfo(
@JsonPropertyOrder({ use = JsonTypeInfo.Id.NAME,
Animal.JSON_PROPERTY_CLASS_NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY,
Animal.JSON_PROPERTY_COLOR property = "className",
}) visible = true)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "className", visible = true)
@JsonSubTypes({ @JsonSubTypes({
@JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Dog.class, name = "Dog"),
@JsonSubTypes.Type(value = Cat.class, name = "Cat"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"),
@JsonSubTypes.Type(value = BigCat.class, name = "BigCat"),
}) })
public class Animal { public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className"; public static final String JSON_PROPERTY_CLASS_NAME = "className";
private String className; private String className;
@@ -47,56 +38,51 @@ public class Animal {
public static final String JSON_PROPERTY_COLOR = "color"; public static final String JSON_PROPERTY_COLOR = "color";
private String color = "red"; private String color = "red";
public Animal className(String className) { public Animal className(String className) {
this.className = className; this.className = className;
return this; return this;
} }
/** /**
* Get className * Get className
*
* @return className * @return className
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_CLASS_NAME) @JsonProperty(JSON_PROPERTY_CLASS_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getClassName() { public String getClassName() {
return className; return className;
} }
public void setClassName(String className) { public void setClassName(String className) {
this.className = className; this.className = className;
} }
public Animal color(String color) { public Animal color(String color) {
this.color = color; this.color = color;
return this; return this;
} }
/** /**
* Get color * Get color
*
* @return color * @return color
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_COLOR) @JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() { public String getColor() {
return color; return color;
} }
public void setColor(String color) { public void setColor(String color) {
this.color = color; this.color = color;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -106,8 +92,8 @@ public class Animal {
return false; return false;
} }
Animal animal = (Animal) o; Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) && return Objects.equals(this.className, animal.className)
Objects.equals(this.color, animal.color); && Objects.equals(this.color, animal.color);
} }
@Override @Override
@@ -115,7 +101,6 @@ public class Animal {
return Objects.hash(className, color); return Objects.hash(className, color);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -127,8 +112,7 @@ public class Animal {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -136,6 +120,4 @@ public class Animal {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,43 +3,32 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/**
* ArrayOfArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER
})
/** ArrayOfArrayOfNumberOnly */
@JsonPropertyOrder({ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER})
public class ArrayOfArrayOfNumberOnly { public class ArrayOfArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber"; public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
private List<List<BigDecimal>> arrayArrayNumber = null; private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) { public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber; this.arrayArrayNumber = arrayArrayNumber;
return this; return this;
} }
@@ -52,25 +41,23 @@ public class ArrayOfArrayOfNumberOnly {
return this; return this;
} }
/** /**
* Get arrayArrayNumber * Get arrayArrayNumber
*
* @return arrayArrayNumber * @return arrayArrayNumber
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER) @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<BigDecimal>> getArrayArrayNumber() { public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber; return arrayArrayNumber;
} }
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) { public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber; this.arrayArrayNumber = arrayArrayNumber;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -88,7 +75,6 @@ public class ArrayOfArrayOfNumberOnly {
return Objects.hash(arrayArrayNumber); return Objects.hash(arrayArrayNumber);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -99,8 +85,7 @@ public class ArrayOfArrayOfNumberOnly {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -108,6 +93,4 @@ public class ArrayOfArrayOfNumberOnly {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,43 +3,32 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/**
* ArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER
})
/** ArrayOfNumberOnly */
@JsonPropertyOrder({ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER})
public class ArrayOfNumberOnly { public class ArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber"; public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
private List<BigDecimal> arrayNumber = null; private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) { public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber; this.arrayNumber = arrayNumber;
return this; return this;
} }
@@ -52,25 +41,23 @@ public class ArrayOfNumberOnly {
return this; return this;
} }
/** /**
* Get arrayNumber * Get arrayNumber
*
* @return arrayNumber * @return arrayNumber
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_NUMBER) @JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<BigDecimal> getArrayNumber() { public List<BigDecimal> getArrayNumber() {
return arrayNumber; return arrayNumber;
} }
public void setArrayNumber(List<BigDecimal> arrayNumber) { public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber; this.arrayNumber = arrayNumber;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -88,7 +75,6 @@ public class ArrayOfNumberOnly {
return Objects.hash(arrayNumber); return Objects.hash(arrayNumber);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -99,8 +85,7 @@ public class ArrayOfNumberOnly {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -108,6 +93,4 @@ public class ArrayOfNumberOnly {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,38 +3,29 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import org.openapitools.client.model.ReadOnlyFirst; import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/** /** ArrayTest */
* ArrayTest
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING, ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER, ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL
}) })
public class ArrayTest { public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string"; public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string";
private List<String> arrayOfString = null; private List<String> arrayOfString = null;
@@ -45,9 +36,8 @@ public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model"; public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null; private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) { public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString; this.arrayOfString = arrayOfString;
return this; return this;
} }
@@ -60,27 +50,25 @@ public class ArrayTest {
return this; return this;
} }
/** /**
* Get arrayOfString * Get arrayOfString
*
* @return arrayOfString * @return arrayOfString
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING) @JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
return arrayOfString; return arrayOfString;
} }
public void setArrayOfString(List<String> arrayOfString) { public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString; this.arrayOfString = arrayOfString;
} }
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) { public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger; this.arrayArrayOfInteger = arrayArrayOfInteger;
return this; return this;
} }
@@ -93,27 +81,25 @@ public class ArrayTest {
return this; return this;
} }
/** /**
* Get arrayArrayOfInteger * Get arrayArrayOfInteger
*
* @return arrayArrayOfInteger * @return arrayArrayOfInteger
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER) @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) { public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger; this.arrayArrayOfInteger = arrayArrayOfInteger;
} }
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) { public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
return this; return this;
} }
@@ -126,25 +112,23 @@ public class ArrayTest {
return this; return this;
} }
/** /**
* Get arrayArrayOfModel * Get arrayArrayOfModel
*
* @return arrayArrayOfModel * @return arrayArrayOfModel
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL) @JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) { public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel; this.arrayArrayOfModel = arrayArrayOfModel;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -154,9 +138,9 @@ public class ArrayTest {
return false; return false;
} }
ArrayTest arrayTest = (ArrayTest) o; ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) && return Objects.equals(this.arrayOfString, arrayTest.arrayOfString)
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) && && Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger)
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel); && Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
} }
@Override @Override
@@ -164,21 +148,21 @@ public class ArrayTest {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel); return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n"); sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n"); sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n"); sb.append(" arrayArrayOfInteger: ")
.append(toIndentedString(arrayArrayOfInteger))
.append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n"); sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -186,6 +170,4 @@ public class ArrayTest {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -1,145 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.BigCatAllOf;
import org.openapitools.client.model.Cat;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* BigCat
*/
@JsonPropertyOrder({
BigCat.JSON_PROPERTY_KIND
})
public class BigCat extends Cat {
/**
* Gets or Sets kind
*/
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_KIND = "kind";
private KindEnum kind;
public BigCat kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public KindEnum getKind() {
return kind;
}
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCat bigCat = (BigCat) o;
return Objects.equals(this.kind, bigCat.kind) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(kind, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,141 +0,0 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* BigCatAllOf
*/
@JsonPropertyOrder({
BigCatAllOf.JSON_PROPERTY_KIND
})
public class BigCatAllOf {
/**
* Gets or Sets kind
*/
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static KindEnum fromValue(String value) {
for (KindEnum b : KindEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_KIND = "kind";
private KindEnum kind;
public BigCatAllOf kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_KIND)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public KindEnum getKind() {
return kind;
}
public void setKind(KindEnum kind) {
this.kind = kind;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BigCatAllOf bigCatAllOf = (BigCatAllOf) o;
return Objects.equals(this.kind, bigCatAllOf.kind);
}
@Override
public int hashCode() {
return Objects.hash(kind);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class BigCatAllOf {\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -3,29 +3,22 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Capitalization */
* Capitalization
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
Capitalization.JSON_PROPERTY_SMALL_CAMEL, Capitalization.JSON_PROPERTY_SMALL_CAMEL,
Capitalization.JSON_PROPERTY_CAPITAL_CAMEL, Capitalization.JSON_PROPERTY_CAPITAL_CAMEL,
@@ -34,7 +27,6 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS, Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS,
Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E
}) })
public class Capitalization { public class Capitalization {
public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel"; public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel";
private String smallCamel; private String smallCamel;
@@ -54,157 +46,144 @@ public class Capitalization {
public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME"; public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
private String ATT_NAME; private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) { public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel; this.smallCamel = smallCamel;
return this; return this;
} }
/** /**
* Get smallCamel * Get smallCamel
*
* @return smallCamel * @return smallCamel
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SMALL_CAMEL) @JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallCamel() { public String getSmallCamel() {
return smallCamel; return smallCamel;
} }
public void setSmallCamel(String smallCamel) { public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel; this.smallCamel = smallCamel;
} }
public Capitalization capitalCamel(String capitalCamel) { public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel; this.capitalCamel = capitalCamel;
return this; return this;
} }
/** /**
* Get capitalCamel * Get capitalCamel
*
* @return capitalCamel * @return capitalCamel
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL) @JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalCamel() { public String getCapitalCamel() {
return capitalCamel; return capitalCamel;
} }
public void setCapitalCamel(String capitalCamel) { public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel; this.capitalCamel = capitalCamel;
} }
public Capitalization smallSnake(String smallSnake) { public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake; this.smallSnake = smallSnake;
return this; return this;
} }
/** /**
* Get smallSnake * Get smallSnake
*
* @return smallSnake * @return smallSnake
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SMALL_SNAKE) @JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallSnake() { public String getSmallSnake() {
return smallSnake; return smallSnake;
} }
public void setSmallSnake(String smallSnake) { public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake; this.smallSnake = smallSnake;
} }
public Capitalization capitalSnake(String capitalSnake) { public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake; this.capitalSnake = capitalSnake;
return this; return this;
} }
/** /**
* Get capitalSnake * Get capitalSnake
*
* @return capitalSnake * @return capitalSnake
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE) @JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalSnake() { public String getCapitalSnake() {
return capitalSnake; return capitalSnake;
} }
public void setCapitalSnake(String capitalSnake) { public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake; this.capitalSnake = capitalSnake;
} }
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) { public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints; this.scAETHFlowPoints = scAETHFlowPoints;
return this; return this;
} }
/** /**
* Get scAETHFlowPoints * Get scAETHFlowPoints
*
* @return scAETHFlowPoints * @return scAETHFlowPoints
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS) @JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getScAETHFlowPoints() { public String getScAETHFlowPoints() {
return scAETHFlowPoints; return scAETHFlowPoints;
} }
public void setScAETHFlowPoints(String scAETHFlowPoints) { public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints; this.scAETHFlowPoints = scAETHFlowPoints;
} }
public Capitalization ATT_NAME(String ATT_NAME) { public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME; this.ATT_NAME = ATT_NAME;
return this; return this;
} }
/** /**
* Name of the pet * Name of the pet
*
* @return ATT_NAME * @return ATT_NAME
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ") @ApiModelProperty(value = "Name of the pet ")
@JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E) @JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getATTNAME() { public String getATTNAME() {
return ATT_NAME; return ATT_NAME;
} }
public void setATTNAME(String ATT_NAME) { public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME; this.ATT_NAME = ATT_NAME;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -214,20 +193,20 @@ public class Capitalization {
return false; return false;
} }
Capitalization capitalization = (Capitalization) o; Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) && return Objects.equals(this.smallCamel, capitalization.smallCamel)
Objects.equals(this.capitalCamel, capitalization.capitalCamel) && && Objects.equals(this.capitalCamel, capitalization.capitalCamel)
Objects.equals(this.smallSnake, capitalization.smallSnake) && && Objects.equals(this.smallSnake, capitalization.smallSnake)
Objects.equals(this.capitalSnake, capitalization.capitalSnake) && && Objects.equals(this.capitalSnake, capitalization.capitalSnake)
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) && && Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints)
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME); && Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME); return Objects.hash(
smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -243,8 +222,7 @@ public class Capitalization {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -252,6 +230,4 @@ public class Capitalization {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,65 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.CatAllOf;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Cat */
* Cat @JsonPropertyOrder({Cat.JSON_PROPERTY_DECLAWED})
*/
@JsonPropertyOrder({
Cat.JSON_PROPERTY_DECLAWED
})
public class Cat extends Animal { public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed"; public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed; private Boolean declawed;
public Cat declawed(Boolean declawed) { public Cat declawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
return this; return this;
} }
/** /**
* Get declawed * Get declawed
*
* @return declawed * @return declawed
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECLAWED) @JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
public void setDeclawed(Boolean declawed) { public void setDeclawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -71,8 +56,7 @@ public class Cat extends Animal {
return false; return false;
} }
Cat cat = (Cat) o; Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) && return Objects.equals(this.declawed, cat.declawed) && super.equals(o);
super.equals(o);
} }
@Override @Override
@@ -80,7 +64,6 @@ public class Cat extends Animal {
return Objects.hash(declawed, super.hashCode()); return Objects.hash(declawed, super.hashCode());
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -92,8 +75,7 @@ public class Cat extends Animal {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -101,6 +83,4 @@ public class Cat extends Animal {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,63 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** CatAllOf */
* CatAllOf @JsonPropertyOrder({CatAllOf.JSON_PROPERTY_DECLAWED})
*/
@JsonPropertyOrder({
CatAllOf.JSON_PROPERTY_DECLAWED
})
public class CatAllOf { public class CatAllOf {
public static final String JSON_PROPERTY_DECLAWED = "declawed"; public static final String JSON_PROPERTY_DECLAWED = "declawed";
private Boolean declawed; private Boolean declawed;
public CatAllOf declawed(Boolean declawed) { public CatAllOf declawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
return this; return this;
} }
/** /**
* Get declawed * Get declawed
*
* @return declawed * @return declawed
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DECLAWED) @JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() { public Boolean getDeclawed() {
return declawed; return declawed;
} }
public void setDeclawed(Boolean declawed) { public void setDeclawed(Boolean declawed) {
this.declawed = declawed; this.declawed = declawed;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -77,7 +64,6 @@ public class CatAllOf {
return Objects.hash(declawed); return Objects.hash(declawed);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class CatAllOf {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -97,6 +82,4 @@ public class CatAllOf {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,34 +3,23 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Category */
* Category @JsonPropertyOrder({Category.JSON_PROPERTY_ID, Category.JSON_PROPERTY_NAME})
*/
@JsonPropertyOrder({
Category.JSON_PROPERTY_ID,
Category.JSON_PROPERTY_NAME
})
public class Category { public class Category {
public static final String JSON_PROPERTY_ID = "id"; public static final String JSON_PROPERTY_ID = "id";
private Long id; private Long id;
@@ -38,56 +27,51 @@ public class Category {
public static final String JSON_PROPERTY_NAME = "name"; public static final String JSON_PROPERTY_NAME = "name";
private String name = "default-name"; private String name = "default-name";
public Category id(Long id) { public Category id(Long id) {
this.id = id; this.id = id;
return this; return this;
} }
/** /**
* Get id * Get id
*
* @return id * @return id
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ID) @JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) { public void setId(Long id) {
this.id = id; this.id = id;
} }
public Category name(String name) { public Category name(String name) {
this.name = name; this.name = name;
return this; return this;
} }
/** /**
* Get name * Get name
*
* @return name * @return name
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NAME) @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -97,8 +81,7 @@ public class Category {
return false; return false;
} }
Category category = (Category) o; Category category = (Category) o;
return Objects.equals(this.id, category.id) && return Objects.equals(this.id, category.id) && Objects.equals(this.name, category.name);
Objects.equals(this.name, category.name);
} }
@Override @Override
@@ -106,7 +89,6 @@ public class Category {
return Objects.hash(id, name); return Objects.hash(id, name);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -118,8 +100,7 @@ public class Category {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -127,6 +108,4 @@ public class Category {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,64 +3,52 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/** /** Model for testing model with \&quot;_class\&quot; property */
* Model for testing model with \&quot;_class\&quot; property
*/
@ApiModel(description = "Model for testing model with \"_class\" property") @ApiModel(description = "Model for testing model with \"_class\" property")
@JsonPropertyOrder({ @JsonPropertyOrder({ClassModel.JSON_PROPERTY_PROPERTY_CLASS})
ClassModel.JSON_PROPERTY_PROPERTY_CLASS
})
public class ClassModel { public class ClassModel {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class"; public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
private String propertyClass; private String propertyClass;
public ClassModel propertyClass(String propertyClass) { public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass; this.propertyClass = propertyClass;
return this; return this;
} }
/** /**
* Get propertyClass * Get propertyClass
*
* @return propertyClass * @return propertyClass
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS) @JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPropertyClass() { public String getPropertyClass() {
return propertyClass; return propertyClass;
} }
public void setPropertyClass(String propertyClass) { public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass; this.propertyClass = propertyClass;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -78,7 +66,6 @@ public class ClassModel {
return Objects.hash(propertyClass); return Objects.hash(propertyClass);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -89,8 +76,7 @@ public class ClassModel {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -98,6 +84,4 @@ public class ClassModel {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,63 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Client */
* Client @JsonPropertyOrder({Client.JSON_PROPERTY_CLIENT})
*/
@JsonPropertyOrder({
Client.JSON_PROPERTY_CLIENT
})
public class Client { public class Client {
public static final String JSON_PROPERTY_CLIENT = "client"; public static final String JSON_PROPERTY_CLIENT = "client";
private String client; private String client;
public Client client(String client) { public Client client(String client) {
this.client = client; this.client = client;
return this; return this;
} }
/** /**
* Get client * Get client
*
* @return client * @return client
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_CLIENT) @JsonProperty(JSON_PROPERTY_CLIENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getClient() { public String getClient() {
return client; return client;
} }
public void setClient(String client) { public void setClient(String client) {
this.client = client; this.client = client;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -77,7 +64,6 @@ public class Client {
return Objects.hash(client); return Objects.hash(client);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class Client {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -97,6 +82,4 @@ public class Client {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,65 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.DogAllOf;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Dog */
* Dog @JsonPropertyOrder({Dog.JSON_PROPERTY_BREED})
*/
@JsonPropertyOrder({
Dog.JSON_PROPERTY_BREED
})
public class Dog extends Animal { public class Dog extends Animal {
public static final String JSON_PROPERTY_BREED = "breed"; public static final String JSON_PROPERTY_BREED = "breed";
private String breed; private String breed;
public Dog breed(String breed) { public Dog breed(String breed) {
this.breed = breed; this.breed = breed;
return this; return this;
} }
/** /**
* Get breed * Get breed
*
* @return breed * @return breed
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BREED) @JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
public void setBreed(String breed) { public void setBreed(String breed) {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -71,8 +56,7 @@ public class Dog extends Animal {
return false; return false;
} }
Dog dog = (Dog) o; Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) && return Objects.equals(this.breed, dog.breed) && super.equals(o);
super.equals(o);
} }
@Override @Override
@@ -80,7 +64,6 @@ public class Dog extends Animal {
return Objects.hash(breed, super.hashCode()); return Objects.hash(breed, super.hashCode());
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -92,8 +75,7 @@ public class Dog extends Animal {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -101,6 +83,4 @@ public class Dog extends Animal {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,63 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** DogAllOf */
* DogAllOf @JsonPropertyOrder({DogAllOf.JSON_PROPERTY_BREED})
*/
@JsonPropertyOrder({
DogAllOf.JSON_PROPERTY_BREED
})
public class DogAllOf { public class DogAllOf {
public static final String JSON_PROPERTY_BREED = "breed"; public static final String JSON_PROPERTY_BREED = "breed";
private String breed; private String breed;
public DogAllOf breed(String breed) { public DogAllOf breed(String breed) {
this.breed = breed; this.breed = breed;
return this; return this;
} }
/** /**
* Get breed * Get breed
*
* @return breed * @return breed
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BREED) @JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBreed() { public String getBreed() {
return breed; return breed;
} }
public void setBreed(String breed) { public void setBreed(String breed) {
this.breed = breed; this.breed = breed;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -77,7 +64,6 @@ public class DogAllOf {
return Objects.hash(breed); return Objects.hash(breed);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -88,8 +74,7 @@ public class DogAllOf {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -97,6 +82,4 @@ public class DogAllOf {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,43 +3,32 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects; import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/**
* EnumArrays
*/
@JsonPropertyOrder({
EnumArrays.JSON_PROPERTY_JUST_SYMBOL,
EnumArrays.JSON_PROPERTY_ARRAY_ENUM
})
/** EnumArrays */
@JsonPropertyOrder({EnumArrays.JSON_PROPERTY_JUST_SYMBOL, EnumArrays.JSON_PROPERTY_ARRAY_ENUM})
public class EnumArrays { public class EnumArrays {
/** /** Gets or Sets justSymbol */
* Gets or Sets justSymbol
*/
public enum JustSymbolEnum { public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="), GREATER_THAN_OR_EQUAL_TO(">="),
DOLLAR("$"); DOLLAR("$");
private String value; private String value;
@@ -72,12 +61,10 @@ public class EnumArrays {
public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol"; public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol";
private JustSymbolEnum justSymbol; private JustSymbolEnum justSymbol;
/** /** Gets or Sets arrayEnum */
* Gets or Sets arrayEnum
*/
public enum ArrayEnumEnum { public enum ArrayEnumEnum {
FISH("fish"), FISH("fish"),
CRAB("crab"); CRAB("crab");
private String value; private String value;
@@ -110,34 +97,31 @@ public class EnumArrays {
public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum"; public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
private List<ArrayEnumEnum> arrayEnum = null; private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) { public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol; this.justSymbol = justSymbol;
return this; return this;
} }
/** /**
* Get justSymbol * Get justSymbol
*
* @return justSymbol * @return justSymbol
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_JUST_SYMBOL) @JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JustSymbolEnum getJustSymbol() { public JustSymbolEnum getJustSymbol() {
return justSymbol; return justSymbol;
} }
public void setJustSymbol(JustSymbolEnum justSymbol) { public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol; this.justSymbol = justSymbol;
} }
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) { public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum; this.arrayEnum = arrayEnum;
return this; return this;
} }
@@ -150,25 +134,23 @@ public class EnumArrays {
return this; return this;
} }
/** /**
* Get arrayEnum * Get arrayEnum
*
* @return arrayEnum * @return arrayEnum
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ARRAY_ENUM) @JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ArrayEnumEnum> getArrayEnum() { public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum; return arrayEnum;
} }
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) { public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum; this.arrayEnum = arrayEnum;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -178,8 +160,8 @@ public class EnumArrays {
return false; return false;
} }
EnumArrays enumArrays = (EnumArrays) o; EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) && return Objects.equals(this.justSymbol, enumArrays.justSymbol)
Objects.equals(this.arrayEnum, enumArrays.arrayEnum); && Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
} }
@Override @Override
@@ -187,7 +169,6 @@ public class EnumArrays {
return Objects.hash(justSymbol, arrayEnum); return Objects.hash(justSymbol, arrayEnum);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -199,8 +180,7 @@ public class EnumArrays {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -208,6 +188,4 @@ public class EnumArrays {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,32 +3,25 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
/** /** Gets or Sets EnumClass */
* Gets or Sets EnumClass
*/
public enum EnumClass { public enum EnumClass {
_ABC("_abc"), _ABC("_abc"),
_EFG("-efg"), _EFG("-efg"),
_XYZ_("(xyz)"); _XYZ_("(xyz)");
private String value; private String value;
@@ -57,4 +50,3 @@ public enum EnumClass {
throw new IllegalArgumentException("Unexpected value '" + value + "'"); throw new IllegalArgumentException("Unexpected value '" + value + "'");
} }
} }

View File

@@ -3,47 +3,43 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects; import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.client.model.OuterEnum;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
/** /** EnumTest */
* EnumTest
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
EnumTest.JSON_PROPERTY_ENUM_STRING, EnumTest.JSON_PROPERTY_ENUM_STRING,
EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED, EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED,
EnumTest.JSON_PROPERTY_ENUM_INTEGER, EnumTest.JSON_PROPERTY_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_ENUM_NUMBER, EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM EnumTest.JSON_PROPERTY_OUTER_ENUM,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE
}) })
public class EnumTest { public class EnumTest {
/** /** Gets or Sets enumString */
* Gets or Sets enumString
*/
public enum EnumStringEnum { public enum EnumStringEnum {
UPPER("UPPER"), UPPER("UPPER"),
LOWER("lower"), LOWER("lower"),
EMPTY(""); EMPTY("");
private String value; private String value;
@@ -76,14 +72,12 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_STRING = "enum_string"; public static final String JSON_PROPERTY_ENUM_STRING = "enum_string";
private EnumStringEnum enumString; private EnumStringEnum enumString;
/** /** Gets or Sets enumStringRequired */
* Gets or Sets enumStringRequired
*/
public enum EnumStringRequiredEnum { public enum EnumStringRequiredEnum {
UPPER("UPPER"), UPPER("UPPER"),
LOWER("lower"), LOWER("lower"),
EMPTY(""); EMPTY("");
private String value; private String value;
@@ -116,12 +110,10 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required"; public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required";
private EnumStringRequiredEnum enumStringRequired; private EnumStringRequiredEnum enumStringRequired;
/** /** Gets or Sets enumInteger */
* Gets or Sets enumInteger
*/
public enum EnumIntegerEnum { public enum EnumIntegerEnum {
NUMBER_1(1), NUMBER_1(1),
NUMBER_MINUS_1(-1); NUMBER_MINUS_1(-1);
private Integer value; private Integer value;
@@ -154,12 +146,10 @@ public class EnumTest {
public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer"; public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer";
private EnumIntegerEnum enumInteger; private EnumIntegerEnum enumInteger;
/** /** Gets or Sets enumNumber */
* Gets or Sets enumNumber
*/
public enum EnumNumberEnum { public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1), NUMBER_1_DOT_1(1.1),
NUMBER_MINUS_1_DOT_2(-1.2); NUMBER_MINUS_1_DOT_2(-1.2);
private Double value; private Double value;
@@ -193,132 +183,213 @@ public class EnumTest {
private EnumNumberEnum enumNumber; private EnumNumberEnum enumNumber;
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum"; public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
private OuterEnum outerEnum; private JsonNullable<OuterEnum> outerEnum = JsonNullable.<OuterEnum>undefined();
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger";
private OuterEnumInteger outerEnumInteger;
public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue";
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE =
"outerEnumIntegerDefaultValue";
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue =
OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest enumString(EnumStringEnum enumString) { public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString; this.enumString = enumString;
return this; return this;
} }
/** /**
* Get enumString * Get enumString
*
* @return enumString * @return enumString
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_STRING) @JsonProperty(JSON_PROPERTY_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumStringEnum getEnumString() { public EnumStringEnum getEnumString() {
return enumString; return enumString;
} }
public void setEnumString(EnumStringEnum enumString) { public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString; this.enumString = enumString;
} }
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) { public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired; this.enumStringRequired = enumStringRequired;
return this; return this;
} }
/** /**
* Get enumStringRequired * Get enumStringRequired
*
* @return enumStringRequired * @return enumStringRequired
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED) @JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public EnumStringRequiredEnum getEnumStringRequired() { public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired; return enumStringRequired;
} }
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) { public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired; this.enumStringRequired = enumStringRequired;
} }
public EnumTest enumInteger(EnumIntegerEnum enumInteger) { public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
return this; return this;
} }
/** /**
* Get enumInteger * Get enumInteger
*
* @return enumInteger * @return enumInteger
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_INTEGER) @JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
return enumInteger; return enumInteger;
} }
public void setEnumInteger(EnumIntegerEnum enumInteger) { public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger; this.enumInteger = enumInteger;
} }
public EnumTest enumNumber(EnumNumberEnum enumNumber) { public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
return this; return this;
} }
/** /**
* Get enumNumber * Get enumNumber
*
* @return enumNumber * @return enumNumber
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_ENUM_NUMBER) @JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
return enumNumber; return enumNumber;
} }
public void setEnumNumber(EnumNumberEnum enumNumber) { public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber; this.enumNumber = enumNumber;
} }
public EnumTest outerEnum(OuterEnum outerEnum) { public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
this.outerEnum = outerEnum;
return this; return this;
} }
/** /**
* Get outerEnum * Get outerEnum
*
* @return outerEnum * @return outerEnum
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonIgnore
public OuterEnum getOuterEnum() {
return outerEnum.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM) @JsonProperty(JSON_PROPERTY_OUTER_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OuterEnum> getOuterEnum_JsonNullable() {
public OuterEnum getOuterEnum() {
return outerEnum; return outerEnum;
} }
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public void setOuterEnum(OuterEnum outerEnum) { public void setOuterEnum_JsonNullable(JsonNullable<OuterEnum> outerEnum) {
this.outerEnum = outerEnum; this.outerEnum = outerEnum;
} }
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
}
public EnumTest outerEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
/**
* Get outerEnumInteger
*
* @return outerEnumInteger
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
public void setOuterEnumInteger(OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
public EnumTest outerEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
/**
* Get outerEnumDefaultValue
*
* @return outerEnumDefaultValue
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
public void setOuterEnumDefaultValue(OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
public EnumTest outerEnumIntegerDefaultValue(
OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
/**
* Get outerEnumIntegerDefaultValue
*
* @return outerEnumIntegerDefaultValue
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
public void setOuterEnumIntegerDefaultValue(
OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
@@ -329,19 +400,29 @@ public class EnumTest {
return false; return false;
} }
EnumTest enumTest = (EnumTest) o; EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) && return Objects.equals(this.enumString, enumTest.enumString)
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) && && Objects.equals(this.enumStringRequired, enumTest.enumStringRequired)
Objects.equals(this.enumInteger, enumTest.enumInteger) && && Objects.equals(this.enumInteger, enumTest.enumInteger)
Objects.equals(this.enumNumber, enumTest.enumNumber) && && Objects.equals(this.enumNumber, enumTest.enumNumber)
Objects.equals(this.outerEnum, enumTest.outerEnum); && Objects.equals(this.outerEnum, enumTest.outerEnum)
&& Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger)
&& Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue)
&& Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum); return Objects.hash(
enumString,
enumStringRequired,
enumInteger,
enumNumber,
outerEnum,
outerEnumInteger,
outerEnumDefaultValue,
outerEnumIntegerDefaultValue);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -351,13 +432,19 @@ public class EnumTest {
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n"); sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n"); sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n"); sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ")
.append(toIndentedString(outerEnumDefaultValue))
.append("\n");
sb.append(" outerEnumIntegerDefaultValue: ")
.append(toIndentedString(outerEnumIntegerDefaultValue))
.append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -365,6 +452,4 @@ public class EnumTest {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,36 +3,28 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/** /** FileSchemaTestClass */
* FileSchemaTestClass
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
FileSchemaTestClass.JSON_PROPERTY_FILE, FileSchemaTestClass.JSON_PROPERTY_FILE,
FileSchemaTestClass.JSON_PROPERTY_FILES FileSchemaTestClass.JSON_PROPERTY_FILES
}) })
public class FileSchemaTestClass { public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILE = "file"; public static final String JSON_PROPERTY_FILE = "file";
private java.io.File file; private java.io.File file;
@@ -40,34 +32,31 @@ public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILES = "files"; public static final String JSON_PROPERTY_FILES = "files";
private List<java.io.File> files = null; private List<java.io.File> files = null;
public FileSchemaTestClass file(java.io.File file) { public FileSchemaTestClass file(java.io.File file) {
this.file = file; this.file = file;
return this; return this;
} }
/** /**
* Get file * Get file
*
* @return file * @return file
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FILE) @JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public java.io.File getFile() { public java.io.File getFile() {
return file; return file;
} }
public void setFile(java.io.File file) { public void setFile(java.io.File file) {
this.file = file; this.file = file;
} }
public FileSchemaTestClass files(List<java.io.File> files) { public FileSchemaTestClass files(List<java.io.File> files) {
this.files = files; this.files = files;
return this; return this;
} }
@@ -80,25 +69,23 @@ public class FileSchemaTestClass {
return this; return this;
} }
/** /**
* Get files * Get files
*
* @return files * @return files
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FILES) @JsonProperty(JSON_PROPERTY_FILES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<java.io.File> getFiles() { public List<java.io.File> getFiles() {
return files; return files;
} }
public void setFiles(List<java.io.File> files) { public void setFiles(List<java.io.File> files) {
this.files = files; this.files = files;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -108,8 +95,8 @@ public class FileSchemaTestClass {
return false; return false;
} }
FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o; FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o;
return Objects.equals(this.file, fileSchemaTestClass.file) && return Objects.equals(this.file, fileSchemaTestClass.file)
Objects.equals(this.files, fileSchemaTestClass.files); && Objects.equals(this.files, fileSchemaTestClass.files);
} }
@Override @Override
@@ -117,7 +104,6 @@ public class FileSchemaTestClass {
return Objects.hash(file, files); return Objects.hash(file, files);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -129,8 +115,7 @@ public class FileSchemaTestClass {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -138,6 +123,4 @@ public class FileSchemaTestClass {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,65 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** Foo */
* AdditionalPropertiesString @JsonPropertyOrder({Foo.JSON_PROPERTY_BAR})
*/ public class Foo {
@JsonPropertyOrder({ public static final String JSON_PROPERTY_BAR = "bar";
AdditionalPropertiesString.JSON_PROPERTY_NAME private String bar = "bar";
})
public class AdditionalPropertiesString extends HashMap<String, String> { public Foo bar(String bar) {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
this.bar = bar;
public AdditionalPropertiesString name(String name) {
this.name = name;
return this; return this;
} }
/** /**
* Get name * Get bar
* @return name *
**/ * @return bar
*/
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME) @JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
public String getName() { return bar;
return name;
} }
public void setBar(String bar) {
public void setName(String name) { this.bar = bar;
this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -70,30 +55,26 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o; Foo foo = (Foo) o;
return Objects.equals(this.name, additionalPropertiesString.name) && return Objects.equals(this.bar, foo.bar);
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, super.hashCode()); return Objects.hash(bar);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesString {\n"); sb.append("class Foo {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -101,6 +82,4 @@ public class AdditionalPropertiesString extends HashMap<String, String> {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,34 +3,28 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.io.File; import java.io.File;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import org.threeten.bp.LocalDate; import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime; import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/** /** FormatTest */
* FormatTest
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
FormatTest.JSON_PROPERTY_INTEGER, FormatTest.JSON_PROPERTY_INTEGER,
FormatTest.JSON_PROPERTY_INT32, FormatTest.JSON_PROPERTY_INT32,
@@ -45,9 +39,9 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
FormatTest.JSON_PROPERTY_DATE_TIME, FormatTest.JSON_PROPERTY_DATE_TIME,
FormatTest.JSON_PROPERTY_UUID, FormatTest.JSON_PROPERTY_UUID,
FormatTest.JSON_PROPERTY_PASSWORD, FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_BIG_DECIMAL FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER
}) })
public class FormatTest { public class FormatTest {
public static final String JSON_PROPERTY_INTEGER = "integer"; public static final String JSON_PROPERTY_INTEGER = "integer";
private Integer integer; private Integer integer;
@@ -88,365 +82,356 @@ public class FormatTest {
public static final String JSON_PROPERTY_PASSWORD = "password"; public static final String JSON_PROPERTY_PASSWORD = "password";
private String password; private String password;
public static final String JSON_PROPERTY_BIG_DECIMAL = "BigDecimal"; public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits";
private BigDecimal bigDecimal; private String patternWithDigits;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER =
"pattern_with_digits_and_delimiter";
private String patternWithDigitsAndDelimiter;
public FormatTest integer(Integer integer) { public FormatTest integer(Integer integer) {
this.integer = integer; this.integer = integer;
return this; return this;
} }
/** /**
* Get integer * Get integer minimum: 10 maximum: 100
* minimum: 10 *
* maximum: 100
* @return integer * @return integer
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INTEGER) @JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInteger() { public Integer getInteger() {
return integer; return integer;
} }
public void setInteger(Integer integer) { public void setInteger(Integer integer) {
this.integer = integer; this.integer = integer;
} }
public FormatTest int32(Integer int32) { public FormatTest int32(Integer int32) {
this.int32 = int32; this.int32 = int32;
return this; return this;
} }
/** /**
* Get int32 * Get int32 minimum: 20 maximum: 200
* minimum: 20 *
* maximum: 200
* @return int32 * @return int32
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INT32) @JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInt32() { public Integer getInt32() {
return int32; return int32;
} }
public void setInt32(Integer int32) { public void setInt32(Integer int32) {
this.int32 = int32; this.int32 = int32;
} }
public FormatTest int64(Long int64) { public FormatTest int64(Long int64) {
this.int64 = int64; this.int64 = int64;
return this; return this;
} }
/** /**
* Get int64 * Get int64
*
* @return int64 * @return int64
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INT64) @JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInt64() { public Long getInt64() {
return int64; return int64;
} }
public void setInt64(Long int64) { public void setInt64(Long int64) {
this.int64 = int64; this.int64 = int64;
} }
public FormatTest number(BigDecimal number) { public FormatTest number(BigDecimal number) {
this.number = number; this.number = number;
return this; return this;
} }
/** /**
* Get number * Get number minimum: 32.1 maximum: 543.2
* minimum: 32.1 *
* maximum: 543.2
* @return number * @return number
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_NUMBER) @JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getNumber() { public BigDecimal getNumber() {
return number; return number;
} }
public void setNumber(BigDecimal number) { public void setNumber(BigDecimal number) {
this.number = number; this.number = number;
} }
public FormatTest _float(Float _float) { public FormatTest _float(Float _float) {
this._float = _float; this._float = _float;
return this; return this;
} }
/** /**
* Get _float * Get _float minimum: 54.3 maximum: 987.6
* minimum: 54.3 *
* maximum: 987.6
* @return _float * @return _float
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FLOAT) @JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() { public Float getFloat() {
return _float; return _float;
} }
public void setFloat(Float _float) { public void setFloat(Float _float) {
this._float = _float; this._float = _float;
} }
public FormatTest _double(Double _double) { public FormatTest _double(Double _double) {
this._double = _double; this._double = _double;
return this; return this;
} }
/** /**
* Get _double * Get _double minimum: 67.8 maximum: 123.4
* minimum: 67.8 *
* maximum: 123.4
* @return _double * @return _double
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DOUBLE) @JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getDouble() { public Double getDouble() {
return _double; return _double;
} }
public void setDouble(Double _double) { public void setDouble(Double _double) {
this._double = _double; this._double = _double;
} }
public FormatTest string(String string) { public FormatTest string(String string) {
this.string = string; this.string = string;
return this; return this;
} }
/** /**
* Get string * Get string
*
* @return string * @return string
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_STRING) @JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getString() { public String getString() {
return string; return string;
} }
public void setString(String string) { public void setString(String string) {
this.string = string; this.string = string;
} }
public FormatTest _byte(byte[] _byte) { public FormatTest _byte(byte[] _byte) {
this._byte = _byte; this._byte = _byte;
return this; return this;
} }
/** /**
* Get _byte * Get _byte
*
* @return _byte * @return _byte
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_BYTE) @JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public byte[] getByte() { public byte[] getByte() {
return _byte; return _byte;
} }
public void setByte(byte[] _byte) { public void setByte(byte[] _byte) {
this._byte = _byte; this._byte = _byte;
} }
public FormatTest binary(File binary) { public FormatTest binary(File binary) {
this.binary = binary; this.binary = binary;
return this; return this;
} }
/** /**
* Get binary * Get binary
*
* @return binary * @return binary
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BINARY) @JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getBinary() { public File getBinary() {
return binary; return binary;
} }
public void setBinary(File binary) { public void setBinary(File binary) {
this.binary = binary; this.binary = binary;
} }
public FormatTest date(LocalDate date) { public FormatTest date(LocalDate date) {
this.date = date; this.date = date;
return this; return this;
} }
/** /**
* Get date * Get date
*
* @return date * @return date
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_DATE) @JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public LocalDate getDate() { public LocalDate getDate() {
return date; return date;
} }
public void setDate(LocalDate date) { public void setDate(LocalDate date) {
this.date = date; this.date = date;
} }
public FormatTest dateTime(OffsetDateTime dateTime) { public FormatTest dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
return this; return this;
} }
/** /**
* Get dateTime * Get dateTime
*
* @return dateTime * @return dateTime
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() { public OffsetDateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(OffsetDateTime dateTime) { public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public FormatTest uuid(UUID uuid) { public FormatTest uuid(UUID uuid) {
this.uuid = uuid; this.uuid = uuid;
return this; return this;
} }
/** /**
* Get uuid * Get uuid
*
* @return uuid * @return uuid
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "") @ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
@JsonProperty(JSON_PROPERTY_UUID) @JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
public void setUuid(UUID uuid) { public void setUuid(UUID uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public FormatTest password(String password) { public FormatTest password(String password) {
this.password = password; this.password = password;
return this; return this;
} }
/** /**
* Get password * Get password
*
* @return password * @return password
**/ */
@ApiModelProperty(required = true, value = "") @ApiModelProperty(required = true, value = "")
@JsonProperty(JSON_PROPERTY_PASSWORD) @JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.ALWAYS) @JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPassword() { public String getPassword() {
return password; return password;
} }
public void setPassword(String password) { public void setPassword(String password) {
this.password = password; this.password = password;
} }
public FormatTest patternWithDigits(String patternWithDigits) {
public FormatTest bigDecimal(BigDecimal bigDecimal) { this.patternWithDigits = patternWithDigits;
this.bigDecimal = bigDecimal;
return this; return this;
} }
/** /**
* Get bigDecimal * A string that is a 10 digit number. Can have leading zeros.
* @return bigDecimal *
**/ * @return patternWithDigits
*/
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "A string that is a 10 digit number. Can have leading zeros.")
@JsonProperty(JSON_PROPERTY_BIG_DECIMAL) @JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigits() {
public BigDecimal getBigDecimal() { return patternWithDigits;
return bigDecimal;
} }
public void setPatternWithDigits(String patternWithDigits) {
public void setBigDecimal(BigDecimal bigDecimal) { this.patternWithDigits = patternWithDigits;
this.bigDecimal = bigDecimal;
} }
public FormatTest patternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following
* i.e. Image_01.
*
* @return patternWithDigitsAndDelimiter
*/
@javax.annotation.Nullable
@ApiModelProperty(
value =
"A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.")
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
public void setPatternWithDigitsAndDelimiter(String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
@@ -457,28 +442,44 @@ public class FormatTest {
return false; return false;
} }
FormatTest formatTest = (FormatTest) o; FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) && return Objects.equals(this.integer, formatTest.integer)
Objects.equals(this.int32, formatTest.int32) && && Objects.equals(this.int32, formatTest.int32)
Objects.equals(this.int64, formatTest.int64) && && Objects.equals(this.int64, formatTest.int64)
Objects.equals(this.number, formatTest.number) && && Objects.equals(this.number, formatTest.number)
Objects.equals(this._float, formatTest._float) && && Objects.equals(this._float, formatTest._float)
Objects.equals(this._double, formatTest._double) && && Objects.equals(this._double, formatTest._double)
Objects.equals(this.string, formatTest.string) && && Objects.equals(this.string, formatTest.string)
Arrays.equals(this._byte, formatTest._byte) && && Arrays.equals(this._byte, formatTest._byte)
Objects.equals(this.binary, formatTest.binary) && && Objects.equals(this.binary, formatTest.binary)
Objects.equals(this.date, formatTest.date) && && Objects.equals(this.date, formatTest.date)
Objects.equals(this.dateTime, formatTest.dateTime) && && Objects.equals(this.dateTime, formatTest.dateTime)
Objects.equals(this.uuid, formatTest.uuid) && && Objects.equals(this.uuid, formatTest.uuid)
Objects.equals(this.password, formatTest.password) && && Objects.equals(this.password, formatTest.password)
Objects.equals(this.bigDecimal, formatTest.bigDecimal); && Objects.equals(this.patternWithDigits, formatTest.patternWithDigits)
&& Objects.equals(
this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal); return Objects.hash(
integer,
int32,
int64,
number,
_float,
_double,
string,
Arrays.hashCode(_byte),
binary,
date,
dateTime,
uuid,
password,
patternWithDigits,
patternWithDigitsAndDelimiter);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -496,14 +497,16 @@ public class FormatTest {
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ")
.append(toIndentedString(patternWithDigitsAndDelimiter))
.append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -511,6 +514,4 @@ public class FormatTest {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,34 +3,23 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** HasOnlyReadOnly */
* HasOnlyReadOnly @JsonPropertyOrder({HasOnlyReadOnly.JSON_PROPERTY_BAR, HasOnlyReadOnly.JSON_PROPERTY_FOO})
*/
@JsonPropertyOrder({
HasOnlyReadOnly.JSON_PROPERTY_BAR,
HasOnlyReadOnly.JSON_PROPERTY_FOO
})
public class HasOnlyReadOnly { public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_BAR = "bar"; public static final String JSON_PROPERTY_BAR = "bar";
private String bar; private String bar;
@@ -38,39 +27,32 @@ public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_FOO = "foo"; public static final String JSON_PROPERTY_FOO = "foo";
private String foo; private String foo;
/**
/**
* Get bar * Get bar
*
* @return bar * @return bar
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_BAR) @JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() { public String getBar() {
return bar; return bar;
} }
/**
/**
* Get foo * Get foo
*
* @return foo * @return foo
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_FOO) @JsonProperty(JSON_PROPERTY_FOO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFoo() { public String getFoo() {
return foo; return foo;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -80,8 +62,8 @@ public class HasOnlyReadOnly {
return false; return false;
} }
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o; HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) && return Objects.equals(this.bar, hasOnlyReadOnly.bar)
Objects.equals(this.foo, hasOnlyReadOnly.foo); && Objects.equals(this.foo, hasOnlyReadOnly.foo);
} }
@Override @Override
@@ -89,7 +71,6 @@ public class HasOnlyReadOnly {
return Objects.hash(bar, foo); return Objects.hash(bar, foo);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -101,8 +82,7 @@ public class HasOnlyReadOnly {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -110,6 +90,4 @@ public class HasOnlyReadOnly {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -0,0 +1,104 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer
* in generated model.
*/
@ApiModel(
description =
"Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.")
@JsonPropertyOrder({HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE})
public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult nullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
return this;
}
/**
* Get nullableMessage
*
* @return nullableMessage
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
@JsonIgnore
public String getNullableMessage() {
return nullableMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableMessage_JsonNullable() {
return nullableMessage;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
public void setNullableMessage_JsonNullable(JsonNullable<String> nullableMessage) {
this.nullableMessage = nullableMessage;
}
public void setNullableMessage(String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return Objects.equals(this.nullableMessage, healthCheckResult.nullableMessage);
}
@Override
public int hashCode() {
return Objects.hash(nullableMessage);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -3,64 +3,75 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** InlineObject */
* AdditionalPropertiesAnyType @JsonPropertyOrder({InlineObject.JSON_PROPERTY_NAME, InlineObject.JSON_PROPERTY_STATUS})
*/ public class InlineObject {
@JsonPropertyOrder({
AdditionalPropertiesAnyType.JSON_PROPERTY_NAME
})
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
public static final String JSON_PROPERTY_NAME = "name"; public static final String JSON_PROPERTY_NAME = "name";
private String name; private String name;
public static final String JSON_PROPERTY_STATUS = "status";
private String status;
public InlineObject name(String name) {
public AdditionalPropertiesAnyType name(String name) {
this.name = name; this.name = name;
return this; return this;
} }
/** /**
* Get name * Updated name of the pet
*
* @return name * @return name
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "Updated name of the pet")
@JsonProperty(JSON_PROPERTY_NAME) @JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() { public String getName() {
return name; return name;
} }
public void setName(String name) { public void setName(String name) {
this.name = name; this.name = name;
} }
public InlineObject status(String status) {
this.status = status;
return this;
}
/**
* Updated status of the pet
*
* @return status
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Updated status of the pet")
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
@@ -70,30 +81,28 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o; InlineObject inlineObject = (InlineObject) o;
return Objects.equals(this.name, additionalPropertiesAnyType.name) && return Objects.equals(this.name, inlineObject.name)
super.equals(o); && Objects.equals(this.status, inlineObject.status);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, super.hashCode()); return Objects.hash(name, status);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesAnyType {\n"); sb.append("class InlineObject {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -101,6 +110,4 @@ public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -0,0 +1,117 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.util.Objects;
/** InlineObject1 */
@JsonPropertyOrder({
InlineObject1.JSON_PROPERTY_ADDITIONAL_METADATA,
InlineObject1.JSON_PROPERTY_FILE
})
public class InlineObject1 {
public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata";
private String additionalMetadata;
public static final String JSON_PROPERTY_FILE = "file";
private File file;
public InlineObject1 additionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
return this;
}
/**
* Additional data to pass to server
*
* @return additionalMetadata
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Additional data to pass to server")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAdditionalMetadata() {
return additionalMetadata;
}
public void setAdditionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
}
public InlineObject1 file(File file) {
this.file = file;
return this;
}
/**
* file to upload
*
* @return file
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "file to upload")
@JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getFile() {
return file;
}
public void setFile(File file) {
this.file = file;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject1 inlineObject1 = (InlineObject1) o;
return Objects.equals(this.additionalMetadata, inlineObject1.additionalMetadata)
&& Objects.equals(this.file, inlineObject1.file);
}
@Override
public int hashCode() {
return Objects.hash(additionalMetadata, file);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject1 {\n");
sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n");
sb.append(" file: ").append(toIndentedString(file)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,198 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** InlineObject2 */
@JsonPropertyOrder({
InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING_ARRAY,
InlineObject2.JSON_PROPERTY_ENUM_FORM_STRING
})
public class InlineObject2 {
/** Gets or Sets enumFormStringArray */
public enum EnumFormStringArrayEnum {
GREATER_THAN(">"),
DOLLAR("$");
private String value;
EnumFormStringArrayEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumFormStringArrayEnum fromValue(String value) {
for (EnumFormStringArrayEnum b : EnumFormStringArrayEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_FORM_STRING_ARRAY = "enum_form_string_array";
private List<EnumFormStringArrayEnum> enumFormStringArray = null;
/** Form parameter enum test (string) */
public enum EnumFormStringEnum {
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
private String value;
EnumFormStringEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumFormStringEnum fromValue(String value) {
for (EnumFormStringEnum b : EnumFormStringEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_FORM_STRING = "enum_form_string";
private EnumFormStringEnum enumFormString = EnumFormStringEnum._EFG;
public InlineObject2 enumFormStringArray(List<EnumFormStringArrayEnum> enumFormStringArray) {
this.enumFormStringArray = enumFormStringArray;
return this;
}
public InlineObject2 addEnumFormStringArrayItem(EnumFormStringArrayEnum enumFormStringArrayItem) {
if (this.enumFormStringArray == null) {
this.enumFormStringArray = new ArrayList<EnumFormStringArrayEnum>();
}
this.enumFormStringArray.add(enumFormStringArrayItem);
return this;
}
/**
* Form parameter enum test (string array)
*
* @return enumFormStringArray
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Form parameter enum test (string array)")
@JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING_ARRAY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<EnumFormStringArrayEnum> getEnumFormStringArray() {
return enumFormStringArray;
}
public void setEnumFormStringArray(List<EnumFormStringArrayEnum> enumFormStringArray) {
this.enumFormStringArray = enumFormStringArray;
}
public InlineObject2 enumFormString(EnumFormStringEnum enumFormString) {
this.enumFormString = enumFormString;
return this;
}
/**
* Form parameter enum test (string)
*
* @return enumFormString
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Form parameter enum test (string)")
@JsonProperty(JSON_PROPERTY_ENUM_FORM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumFormStringEnum getEnumFormString() {
return enumFormString;
}
public void setEnumFormString(EnumFormStringEnum enumFormString) {
this.enumFormString = enumFormString;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject2 inlineObject2 = (InlineObject2) o;
return Objects.equals(this.enumFormStringArray, inlineObject2.enumFormStringArray)
&& Objects.equals(this.enumFormString, inlineObject2.enumFormString);
}
@Override
public int hashCode() {
return Objects.hash(enumFormStringArray, enumFormString);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject2 {\n");
sb.append(" enumFormStringArray: ")
.append(toIndentedString(enumFormStringArray))
.append("\n");
sb.append(" enumFormString: ").append(toIndentedString(enumFormString)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,481 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.Objects;
import org.threeten.bp.LocalDate;
import org.threeten.bp.OffsetDateTime;
/** InlineObject3 */
@JsonPropertyOrder({
InlineObject3.JSON_PROPERTY_INTEGER,
InlineObject3.JSON_PROPERTY_INT32,
InlineObject3.JSON_PROPERTY_INT64,
InlineObject3.JSON_PROPERTY_NUMBER,
InlineObject3.JSON_PROPERTY_FLOAT,
InlineObject3.JSON_PROPERTY_DOUBLE,
InlineObject3.JSON_PROPERTY_STRING,
InlineObject3.JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER,
InlineObject3.JSON_PROPERTY_BYTE,
InlineObject3.JSON_PROPERTY_BINARY,
InlineObject3.JSON_PROPERTY_DATE,
InlineObject3.JSON_PROPERTY_DATE_TIME,
InlineObject3.JSON_PROPERTY_PASSWORD,
InlineObject3.JSON_PROPERTY_CALLBACK
})
public class InlineObject3 {
public static final String JSON_PROPERTY_INTEGER = "integer";
private Integer integer;
public static final String JSON_PROPERTY_INT32 = "int32";
private Integer int32;
public static final String JSON_PROPERTY_INT64 = "int64";
private Long int64;
public static final String JSON_PROPERTY_NUMBER = "number";
private BigDecimal number;
public static final String JSON_PROPERTY_FLOAT = "float";
private Float _float;
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
public static final String JSON_PROPERTY_STRING = "string";
private String string;
public static final String JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER = "pattern_without_delimiter";
private String patternWithoutDelimiter;
public static final String JSON_PROPERTY_BYTE = "byte";
private byte[] _byte;
public static final String JSON_PROPERTY_BINARY = "binary";
private File binary;
public static final String JSON_PROPERTY_DATE = "date";
private LocalDate date;
public static final String JSON_PROPERTY_DATE_TIME = "dateTime";
private OffsetDateTime dateTime;
public static final String JSON_PROPERTY_PASSWORD = "password";
private String password;
public static final String JSON_PROPERTY_CALLBACK = "callback";
private String callback;
public InlineObject3 integer(Integer integer) {
this.integer = integer;
return this;
}
/**
* None minimum: 10 maximum: 100
*
* @return integer
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
public InlineObject3 int32(Integer int32) {
this.int32 = int32;
return this;
}
/**
* None minimum: 20 maximum: 200
*
* @return int32
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
public InlineObject3 int64(Long int64) {
this.int64 = int64;
return this;
}
/**
* None
*
* @return int64
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
public InlineObject3 number(BigDecimal number) {
this.number = number;
return this;
}
/**
* None minimum: 32.1 maximum: 543.2
*
* @return number
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
public InlineObject3 _float(Float _float) {
this._float = _float;
return this;
}
/**
* None maximum: 987.6
*
* @return _float
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
public InlineObject3 _double(Double _double) {
this._double = _double;
return this;
}
/**
* None minimum: 67.8 maximum: 123.4
*
* @return _double
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
public InlineObject3 string(String string) {
this.string = string;
return this;
}
/**
* None
*
* @return string
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
public InlineObject3 patternWithoutDelimiter(String patternWithoutDelimiter) {
this.patternWithoutDelimiter = patternWithoutDelimiter;
return this;
}
/**
* None
*
* @return patternWithoutDelimiter
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_PATTERN_WITHOUT_DELIMITER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPatternWithoutDelimiter() {
return patternWithoutDelimiter;
}
public void setPatternWithoutDelimiter(String patternWithoutDelimiter) {
this.patternWithoutDelimiter = patternWithoutDelimiter;
}
public InlineObject3 _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* None
*
* @return _byte
*/
@ApiModelProperty(required = true, value = "None")
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
public InlineObject3 binary(File binary) {
this.binary = binary;
return this;
}
/**
* None
*
* @return binary
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getBinary() {
return binary;
}
public void setBinary(File binary) {
this.binary = binary;
}
public InlineObject3 date(LocalDate date) {
this.date = date;
return this;
}
/**
* None
*
* @return date
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public InlineObject3 dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* None
*
* @return dateTime
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public InlineObject3 password(String password) {
this.password = password;
return this;
}
/**
* None
*
* @return password
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public InlineObject3 callback(String callback) {
this.callback = callback;
return this;
}
/**
* None
*
* @return callback
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "None")
@JsonProperty(JSON_PROPERTY_CALLBACK)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCallback() {
return callback;
}
public void setCallback(String callback) {
this.callback = callback;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject3 inlineObject3 = (InlineObject3) o;
return Objects.equals(this.integer, inlineObject3.integer)
&& Objects.equals(this.int32, inlineObject3.int32)
&& Objects.equals(this.int64, inlineObject3.int64)
&& Objects.equals(this.number, inlineObject3.number)
&& Objects.equals(this._float, inlineObject3._float)
&& Objects.equals(this._double, inlineObject3._double)
&& Objects.equals(this.string, inlineObject3.string)
&& Objects.equals(this.patternWithoutDelimiter, inlineObject3.patternWithoutDelimiter)
&& Arrays.equals(this._byte, inlineObject3._byte)
&& Objects.equals(this.binary, inlineObject3.binary)
&& Objects.equals(this.date, inlineObject3.date)
&& Objects.equals(this.dateTime, inlineObject3.dateTime)
&& Objects.equals(this.password, inlineObject3.password)
&& Objects.equals(this.callback, inlineObject3.callback);
}
@Override
public int hashCode() {
return Objects.hash(
integer,
int32,
int64,
number,
_float,
_double,
string,
patternWithoutDelimiter,
Arrays.hashCode(_byte),
binary,
date,
dateTime,
password,
callback);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject3 {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" patternWithoutDelimiter: ")
.append(toIndentedString(patternWithoutDelimiter))
.append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" callback: ").append(toIndentedString(callback)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,111 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** InlineObject4 */
@JsonPropertyOrder({InlineObject4.JSON_PROPERTY_PARAM, InlineObject4.JSON_PROPERTY_PARAM2})
public class InlineObject4 {
public static final String JSON_PROPERTY_PARAM = "param";
private String param;
public static final String JSON_PROPERTY_PARAM2 = "param2";
private String param2;
public InlineObject4 param(String param) {
this.param = param;
return this;
}
/**
* field1
*
* @return param
*/
@ApiModelProperty(required = true, value = "field1")
@JsonProperty(JSON_PROPERTY_PARAM)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getParam() {
return param;
}
public void setParam(String param) {
this.param = param;
}
public InlineObject4 param2(String param2) {
this.param2 = param2;
return this;
}
/**
* field2
*
* @return param2
*/
@ApiModelProperty(required = true, value = "field2")
@JsonProperty(JSON_PROPERTY_PARAM2)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject4 inlineObject4 = (InlineObject4) o;
return Objects.equals(this.param, inlineObject4.param)
&& Objects.equals(this.param2, inlineObject4.param2);
}
@Override
public int hashCode() {
return Objects.hash(param, param2);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject4 {\n");
sb.append(" param: ").append(toIndentedString(param)).append("\n");
sb.append(" param2: ").append(toIndentedString(param2)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,116 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.util.Objects;
/** InlineObject5 */
@JsonPropertyOrder({
InlineObject5.JSON_PROPERTY_ADDITIONAL_METADATA,
InlineObject5.JSON_PROPERTY_REQUIRED_FILE
})
public class InlineObject5 {
public static final String JSON_PROPERTY_ADDITIONAL_METADATA = "additionalMetadata";
private String additionalMetadata;
public static final String JSON_PROPERTY_REQUIRED_FILE = "requiredFile";
private File requiredFile;
public InlineObject5 additionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
return this;
}
/**
* Additional data to pass to server
*
* @return additionalMetadata
*/
@javax.annotation.Nullable
@ApiModelProperty(value = "Additional data to pass to server")
@JsonProperty(JSON_PROPERTY_ADDITIONAL_METADATA)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getAdditionalMetadata() {
return additionalMetadata;
}
public void setAdditionalMetadata(String additionalMetadata) {
this.additionalMetadata = additionalMetadata;
}
public InlineObject5 requiredFile(File requiredFile) {
this.requiredFile = requiredFile;
return this;
}
/**
* file to upload
*
* @return requiredFile
*/
@ApiModelProperty(required = true, value = "file to upload")
@JsonProperty(JSON_PROPERTY_REQUIRED_FILE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public File getRequiredFile() {
return requiredFile;
}
public void setRequiredFile(File requiredFile) {
this.requiredFile = requiredFile;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineObject5 inlineObject5 = (InlineObject5) o;
return Objects.equals(this.additionalMetadata, inlineObject5.additionalMetadata)
&& Objects.equals(this.requiredFile, inlineObject5.requiredFile);
}
@Override
public int hashCode() {
return Objects.hash(additionalMetadata, requiredFile);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineObject5 {\n");
sb.append(" additionalMetadata: ").append(toIndentedString(additionalMetadata)).append("\n");
sb.append(" requiredFile: ").append(toIndentedString(requiredFile)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -3,65 +3,50 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.swagger.annotations.ApiModelProperty;
import java.util.Objects;
/** /** InlineResponseDefault */
* AdditionalPropertiesObject @JsonPropertyOrder({InlineResponseDefault.JSON_PROPERTY_STRING})
*/ public class InlineResponseDefault {
@JsonPropertyOrder({ public static final String JSON_PROPERTY_STRING = "string";
AdditionalPropertiesObject.JSON_PROPERTY_NAME private Foo string;
})
public class AdditionalPropertiesObject extends HashMap<String, Map> { public InlineResponseDefault string(Foo string) {
public static final String JSON_PROPERTY_NAME = "name";
private String name;
this.string = string;
public AdditionalPropertiesObject name(String name) {
this.name = name;
return this; return this;
} }
/** /**
* Get name * Get string
* @return name *
**/ * @return string
*/
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_NAME) @JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Foo getString() {
public String getName() { return string;
return name;
} }
public void setString(Foo string) {
public void setName(String name) { this.string = string;
this.name = name;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -70,30 +55,26 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o; InlineResponseDefault inlineResponseDefault = (InlineResponseDefault) o;
return Objects.equals(this.name, additionalPropertiesObject.name) && return Objects.equals(this.string, inlineResponseDefault.string);
super.equals(o);
} }
@Override @Override
public int hashCode() { public int hashCode() {
return Objects.hash(name, super.hashCode()); return Objects.hash(string);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesObject {\n"); sb.append("class InlineResponseDefault {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n"); sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}"); sb.append("}");
return sb.toString(); return sb.toString();
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -101,6 +82,4 @@ public class AdditionalPropertiesObject extends HashMap<String, Map> {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,49 +3,40 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects; import com.fasterxml.jackson.annotation.JsonCreator;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue; import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder; import java.util.Objects;
/** /** MapTest */
* MapTest
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING, MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING,
MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING, MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING,
MapTest.JSON_PROPERTY_DIRECT_MAP, MapTest.JSON_PROPERTY_DIRECT_MAP,
MapTest.JSON_PROPERTY_INDIRECT_MAP MapTest.JSON_PROPERTY_INDIRECT_MAP
}) })
public class MapTest { public class MapTest {
public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string"; public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string";
private Map<String, Map<String, String>> mapMapOfString = null; private Map<String, Map<String, String>> mapMapOfString = null;
/** /** Gets or Sets inner */
* Gets or Sets inner
*/
public enum InnerEnum { public enum InnerEnum {
UPPER("UPPER"), UPPER("UPPER"),
LOWER("lower"); LOWER("lower");
private String value; private String value;
@@ -84,9 +75,8 @@ public class MapTest {
public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map"; public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map";
private Map<String, Boolean> indirectMap = null; private Map<String, Boolean> indirectMap = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) { public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString; this.mapMapOfString = mapMapOfString;
return this; return this;
} }
@@ -99,27 +89,25 @@ public class MapTest {
return this; return this;
} }
/** /**
* Get mapMapOfString * Get mapMapOfString
*
* @return mapMapOfString * @return mapMapOfString
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING) @JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapOfString() { public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString; return mapMapOfString;
} }
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) { public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString; this.mapMapOfString = mapMapOfString;
} }
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) { public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString; this.mapOfEnumString = mapOfEnumString;
return this; return this;
} }
@@ -132,27 +120,25 @@ public class MapTest {
return this; return this;
} }
/** /**
* Get mapOfEnumString * Get mapOfEnumString
*
* @return mapOfEnumString * @return mapOfEnumString
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING) @JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, InnerEnum> getMapOfEnumString() { public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString; return mapOfEnumString;
} }
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) { public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString; this.mapOfEnumString = mapOfEnumString;
} }
public MapTest directMap(Map<String, Boolean> directMap) { public MapTest directMap(Map<String, Boolean> directMap) {
this.directMap = directMap; this.directMap = directMap;
return this; return this;
} }
@@ -165,27 +151,25 @@ public class MapTest {
return this; return this;
} }
/** /**
* Get directMap * Get directMap
*
* @return directMap * @return directMap
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DIRECT_MAP) @JsonProperty(JSON_PROPERTY_DIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getDirectMap() { public Map<String, Boolean> getDirectMap() {
return directMap; return directMap;
} }
public void setDirectMap(Map<String, Boolean> directMap) { public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap; this.directMap = directMap;
} }
public MapTest indirectMap(Map<String, Boolean> indirectMap) { public MapTest indirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap; this.indirectMap = indirectMap;
return this; return this;
} }
@@ -198,25 +182,23 @@ public class MapTest {
return this; return this;
} }
/** /**
* Get indirectMap * Get indirectMap
*
* @return indirectMap * @return indirectMap
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_INDIRECT_MAP) @JsonProperty(JSON_PROPERTY_INDIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getIndirectMap() { public Map<String, Boolean> getIndirectMap() {
return indirectMap; return indirectMap;
} }
public void setIndirectMap(Map<String, Boolean> indirectMap) { public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap; this.indirectMap = indirectMap;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -226,10 +208,10 @@ public class MapTest {
return false; return false;
} }
MapTest mapTest = (MapTest) o; MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) && return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString)
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) && && Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString)
Objects.equals(this.directMap, mapTest.directMap) && && Objects.equals(this.directMap, mapTest.directMap)
Objects.equals(this.indirectMap, mapTest.indirectMap); && Objects.equals(this.indirectMap, mapTest.indirectMap);
} }
@Override @Override
@@ -237,7 +219,6 @@ public class MapTest {
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap); return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -251,8 +232,7 @@ public class MapTest {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -260,6 +240,4 @@ public class MapTest {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

View File

@@ -3,41 +3,31 @@
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* *
* The version of the OpenAPI document: 1.0.0 * The version of the OpenAPI document: 1.0.0
* *
* *
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech * https://openapi-generator.tech
* Do not edit the class manually. * Do not edit the class manually.
*/ */
package org.openapitools.client.model; package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import org.openapitools.client.model.Animal;
import org.threeten.bp.OffsetDateTime; import org.threeten.bp.OffsetDateTime;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/** /** MixedPropertiesAndAdditionalPropertiesClass */
* MixedPropertiesAndAdditionalPropertiesClass
*/
@JsonPropertyOrder({ @JsonPropertyOrder({
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID, MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME, MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP
}) })
public class MixedPropertiesAndAdditionalPropertiesClass { public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_UUID = "uuid"; public static final String JSON_PROPERTY_UUID = "uuid";
private UUID uuid; private UUID uuid;
@@ -48,59 +38,54 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP = "map"; public static final String JSON_PROPERTY_MAP = "map";
private Map<String, Animal> map = null; private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid; this.uuid = uuid;
return this; return this;
} }
/** /**
* Get uuid * Get uuid
*
* @return uuid * @return uuid
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_UUID) @JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
public void setUuid(UUID uuid) { public void setUuid(UUID uuid) {
this.uuid = uuid; this.uuid = uuid;
} }
public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) { public MixedPropertiesAndAdditionalPropertiesClass dateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
return this; return this;
} }
/** /**
* Get dateTime * Get dateTime
*
* @return dateTime * @return dateTime
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_DATE_TIME) @JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() { public OffsetDateTime getDateTime() {
return dateTime; return dateTime;
} }
public void setDateTime(OffsetDateTime dateTime) { public void setDateTime(OffsetDateTime dateTime) {
this.dateTime = dateTime; this.dateTime = dateTime;
} }
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) { public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map; this.map = map;
return this; return this;
} }
@@ -113,25 +98,23 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return this; return this;
} }
/** /**
* Get map * Get map
*
* @return map * @return map
**/ */
@javax.annotation.Nullable @javax.annotation.Nullable
@ApiModelProperty(value = "") @ApiModelProperty(value = "")
@JsonProperty(JSON_PROPERTY_MAP) @JsonProperty(JSON_PROPERTY_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {
return map; return map;
} }
public void setMap(Map<String, Animal> map) { public void setMap(Map<String, Animal> map) {
this.map = map; this.map = map;
} }
@Override @Override
public boolean equals(java.lang.Object o) { public boolean equals(java.lang.Object o) {
if (this == o) { if (this == o) {
@@ -140,10 +123,11 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o; MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass =
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) && (MixedPropertiesAndAdditionalPropertiesClass) o;
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) && return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid)
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map); && Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime)
&& Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
} }
@Override @Override
@@ -151,7 +135,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
return Objects.hash(uuid, dateTime, map); return Objects.hash(uuid, dateTime, map);
} }
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@@ -164,8 +147,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
} }
/** /**
* Convert the given object to string with each line indented by 4 spaces * Convert the given object to string with each line indented by 4 spaces (except the first line).
* (except the first line).
*/ */
private String toIndentedString(java.lang.Object o) { private String toIndentedString(java.lang.Object o) {
if (o == null) { if (o == null) {
@@ -173,6 +155,4 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
} }
return o.toString().replace("\n", "\n "); return o.toString().replace("\n", "\n ");
} }
} }

Some files were not shown because too many files have changed in this diff Show More