[Java] Decommission Retrofit 1.x support (#6447)

* decommission retrofit 1.x support

* remove retrofit 1.x from pom.xml
This commit is contained in:
William Cheng 2020-05-28 21:43:38 +08:00 committed by GitHub
parent 34ccec889a
commit 07647b1a31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
141 changed files with 12 additions and 17745 deletions

View File

@ -14,7 +14,6 @@
./bin/java-petstore-resteasy.sh ./bin/java-petstore-resteasy.sh
./bin/java-petstore-resttemplate-withxml.sh ./bin/java-petstore-resttemplate-withxml.sh
./bin/java-petstore-resttemplate.sh ./bin/java-petstore-resttemplate.sh
./bin/java-petstore-retrofit.sh
./bin/java-petstore-retrofit2-play24.sh ./bin/java-petstore-retrofit2-play24.sh
./bin/java-petstore-retrofit2-play25.sh ./bin/java-petstore-retrofit2-play25.sh
./bin/java-petstore-retrofit2-play26.sh ./bin/java-petstore-retrofit2-play26.sh

View File

@ -1,4 +0,0 @@
{
"library": "retrofit",
"artifactId": "petstore-retrofit"
}

View File

@ -1,35 +0,0 @@
#!/bin/sh
SCRIPT="$0"
echo "# START SCRIPT: $SCRIPT"
while [ -h "$SCRIPT" ] ; do
ls=`ls -ld "$SCRIPT"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
SCRIPT="$link"
else
SCRIPT=`dirname "$SCRIPT"`/"$link"
fi
done
if [ ! -d "${APP_DIR}" ]; then
APP_DIR=`dirname "$SCRIPT"`/..
APP_DIR=`cd "${APP_DIR}"; pwd`
fi
executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar"
if [ ! -f "$executable" ]
then
mvn -B clean package
fi
# if you've executed sbt assembly previously it will use that instead.
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-retrofit.json -o samples/client/petstore/java/retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda $@"
echo "Removing files and folders under samples/client/petstore/java/retrofit/src/main"
rm -rf samples/client/petstore/java/retrofit/src/main
find samples/client/petstore/java/retrofit -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
java $JAVA_OPTS -jar $executable $ags

View File

@ -10,7 +10,6 @@ call .\bin\windows\java-petstore-rest-assured-jackson.bat
call .\bin\windows\java-petstore-resteasy.bat call .\bin\windows\java-petstore-resteasy.bat
call .\bin\windows\java-petstore-resttemplate-withxml.bat call .\bin\windows\java-petstore-resttemplate-withxml.bat
call .\bin\windows\java-petstore-resttemplate.bat call .\bin\windows\java-petstore-resttemplate.bat
call .\bin\windows\java-petstore-retrofit.bat
call .\bin\windows\java-petstore-retrofit2-play24.bat call .\bin\windows\java-petstore-retrofit2-play24.bat
call .\bin\windows\java-petstore-retrofit2-play25.bat call .\bin\windows\java-petstore-retrofit2-play25.bat
call .\bin\windows\java-petstore-retrofit2-play26.bat call .\bin\windows\java-petstore-retrofit2-play26.bat

View File

@ -1,10 +0,0 @@
set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar
If Not Exist %executable% (
mvn clean package
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set 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-retrofit.json -o samples\client\petstore\java\retrofit --additional-properties hideGenerationTimestamp=true,dateLibrary=joda
java %JAVA_OPTS% -jar %executable% %ags%

View File

@ -31,7 +31,7 @@ sidebar_label: java
|invokerPackage|root package for generated code| |org.openapitools.client| |invokerPackage|root package for generated code| |org.openapitools.client|
|java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|true| |java8|Use Java8 classes instead of third party equivalents. Starting in 5.x, JDK8 is the default and the support for JDK7, JDK6 has been dropped|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true| |legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
|library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit**</dt><dd>HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x</dd></dl>|okhttp-gson| |library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>HTTP client: Jersey client 1.19.x. JSON processing: Jackson 2.9.x. Enable Java6 support using '-DsupportJava6=true'. Enable gzip request encoding using '-DuseGzipFeature=true'. IMPORTANT NOTE: jersey 1.x is no longer actively maintained so please upgrade to 'jersey2' or other HTTP libaries instead.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.</dd><dt>**retrofit2**</dt><dd>HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x</dd></dl>|okhttp-gson|
|licenseName|The name of the license| |Unlicense| |licenseName|The name of the license| |Unlicense|
|licenseUrl|The URL of the license| |http://unlicense.org| |licenseUrl|The URL of the license| |http://unlicense.org|
|modelPackage|package for generated models| |org.openapitools.client.model| |modelPackage|package for generated models| |org.openapitools.client.model|

View File

@ -78,7 +78,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
public static final String RESTTEMPLATE = "resttemplate"; public static final String RESTTEMPLATE = "resttemplate";
public static final String WEBCLIENT = "webclient"; public static final String WEBCLIENT = "webclient";
public static final String REST_ASSURED = "rest-assured"; public static final String REST_ASSURED = "rest-assured";
public static final String RETROFIT_1 = "retrofit";
public static final String RETROFIT_2 = "retrofit2"; public static final String RETROFIT_2 = "retrofit2";
public static final String VERTX = "vertx"; public static final String VERTX = "vertx";
public static final String MICROPROFILE = "microprofile"; public static final String MICROPROFILE = "microprofile";
@ -149,7 +148,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x"); supportedLibraries.put(JERSEY2, "HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x");
supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x."); supportedLibraries.put(FEIGN, "HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.");
supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'."); supportedLibraries.put(OKHTTP_GSON, "[DEFAULT] HTTP client: OkHttp 3.x. JSON processing: Gson 2.8.x. Enable Parcelable models on Android using '-DparcelableModel=true'. Enable gzip request encoding using '-DuseGzipFeature=true'.");
supportedLibraries.put(RETROFIT_1, "HTTP client: OkHttp 2.x. JSON processing: Gson 2.x (Retrofit 1.9.0). IMPORTANT NOTE: retrofit1.x is no longer actively maintained so please upgrade to 'retrofit2' instead.");
supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)"); supportedLibraries.put(RETROFIT_2, "HTTP client: OkHttp 3.x. JSON processing: Gson 2.x (Retrofit 2.3.0). Enable the RxJava adapter using '-DuseRxJava[2]=true'. (RxJava 1.x or 2.x)");
supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(RESTTEMPLATE, "HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x");
supportedLibraries.put(WEBCLIENT, "HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(WEBCLIENT, "HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x");
@ -158,7 +156,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(GOOGLE_API_CLIENT, "HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x");
supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8"); supportedLibraries.put(REST_ASSURED, "HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8");
supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+"); supportedLibraries.put(NATIVE, "HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+");
supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x"); supportedLibraries.put(MICROPROFILE, "HTTP client: Microprofile client 1.x. JSON processing: Jackson 2.9.x");
CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use"); CliOption libraryOption = new CliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
libraryOption.setEnum(supportedLibraries); libraryOption.setEnum(supportedLibraries);
@ -192,7 +190,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen
@Override @Override
public String getHelp() { public String getHelp() {
return "Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (1.x, 2.x), OpenFeign (9.x, 10.x) and more."; return "Generates a Java client library (HTTP lib: Jersey (1.x, 2.x), Retrofit (2.x), OpenFeign (10.x) and more.";
} }
@Override @Override
@ -325,19 +323,19 @@ public class JavaClientCodegen extends AbstractJavaCodegen
setSerializationLibrary(additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY).toString()); setSerializationLibrary(additionalProperties.get(CodegenConstants.SERIALIZATION_LIBRARY).toString());
} }
//TODO: add doc to retrofit1 and feign //TODO: add auto-generated doc to feign
if (FEIGN.equals(getLibrary()) || RETROFIT_1.equals(getLibrary())) { if (FEIGN.equals(getLibrary())) {
modelDocTemplateFiles.remove("model_doc.mustache"); modelDocTemplateFiles.remove("model_doc.mustache");
apiDocTemplateFiles.remove("api_doc.mustache"); apiDocTemplateFiles.remove("api_doc.mustache");
} }
if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || WEBCLIENT.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("apiException.mustache", invokerFolder, "ApiException.java")); supportingFiles.add(new SupportingFile("apiException.mustache", invokerFolder, "ApiException.java"));
supportingFiles.add(new SupportingFile("Configuration.mustache", invokerFolder, "Configuration.java")); supportingFiles.add(new SupportingFile("Configuration.mustache", invokerFolder, "Configuration.java"));
supportingFiles.add(new SupportingFile("Pair.mustache", invokerFolder, "Pair.java")); supportingFiles.add(new SupportingFile("Pair.mustache", invokerFolder, "Pair.java"));
} }
if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || usesAnyRetrofitLibrary() || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) { if (!(FEIGN.equals(getLibrary()) || RESTTEMPLATE.equals(getLibrary()) || RETROFIT_2.equals(getLibrary()) || GOOGLE_API_CLIENT.equals(getLibrary()) || REST_ASSURED.equals(getLibrary()) || NATIVE.equals(getLibrary()) || MICROPROFILE.equals(getLibrary()))) {
supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java")); supportingFiles.add(new SupportingFile("auth/Authentication.mustache", authFolder, "Authentication.java"));
} }
@ -358,11 +356,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen
//supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); //supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java"));
//supportingFiles.add(new SupportingFile("auth/RetryingOAuth.mustache", authFolder, "RetryingOAuth.java")); //supportingFiles.add(new SupportingFile("auth/RetryingOAuth.mustache", authFolder, "RetryingOAuth.java"));
forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON); forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON);
} else if (usesAnyRetrofitLibrary()) { } else if (RETROFIT_2.equals(getLibrary())) {
supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java")); supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java"));
supportingFiles.add(new SupportingFile("CollectionFormats.mustache", invokerFolder, "CollectionFormats.java")); supportingFiles.add(new SupportingFile("CollectionFormats.mustache", invokerFolder, "CollectionFormats.java"));
forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON); forceSerializationLibrary(SERIALIZATION_LIBRARY_GSON);
if ("retrofit2".equals(getLibrary()) && !usePlayWS) { if (RETROFIT_2.equals(getLibrary()) && !usePlayWS) {
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java")); supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
} }
} else if (JERSEY2.equals(getLibrary())) { } else if (JERSEY2.equals(getLibrary())) {
@ -519,19 +517,11 @@ public class JavaClientCodegen extends AbstractJavaCodegen
} }
} }
private boolean usesAnyRetrofitLibrary() {
return getLibrary() != null && getLibrary().contains(RETROFIT_1);
}
private boolean usesRetrofit2Library() {
return getLibrary() != null && getLibrary().contains(RETROFIT_2);
}
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) { public Map<String, Object> postProcessOperationsWithModels(Map<String, Object> objs, List<Object> allModels) {
super.postProcessOperationsWithModels(objs, allModels); super.postProcessOperationsWithModels(objs, allModels);
if (usesAnyRetrofitLibrary()) { if (RETROFIT_2.equals(getLibrary())) {
Map<String, Object> operations = (Map<String, Object>) objs.get("operations"); Map<String, Object> operations = (Map<String, Object>) objs.get("operations");
if (operations != null) { if (operations != null) {
List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation"); List<CodegenOperation> ops = (List<CodegenOperation>) operations.get("operation");
@ -544,7 +534,8 @@ public class JavaClientCodegen extends AbstractJavaCodegen
operation.prioritizedContentTypes = prioritizeContentTypes(operation.consumes); operation.prioritizedContentTypes = prioritizeContentTypes(operation.consumes);
} }
} }
if (usesRetrofit2Library() && StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) {
if (StringUtils.isNotEmpty(operation.path) && operation.path.startsWith("/")) {
operation.path = operation.path.substring(1); operation.path = operation.path.substring(1);
} }

14
pom.xml
View File

@ -727,18 +727,6 @@
<module>samples/client/petstore/java/okhttp-gson-parcelableModel</module> <module>samples/client/petstore/java/okhttp-gson-parcelableModel</module>
</modules> </modules>
</profile> </profile>
<profile>
<id>java-client-retrofit</id>
<activation>
<property>
<name>env</name>
<value>java</value>
</property>
</activation>
<modules>
<module>samples/client/petstore/java/retrofit</module>
</modules>
</profile>
<profile> <profile>
<id>java-client-retrofit2</id> <id>java-client-retrofit2</id>
<activation> <activation>
@ -1265,7 +1253,6 @@
<module>samples/client/petstore/java/jersey1</module> <module>samples/client/petstore/java/jersey1</module>
<module>samples/client/petstore/java/jersey2-java8</module> <module>samples/client/petstore/java/jersey2-java8</module>
<module>samples/client/petstore/java/okhttp-gson</module> <module>samples/client/petstore/java/okhttp-gson</module>
<module>samples/client/petstore/java/retrofit</module>
<module>samples/client/petstore/java/retrofit2</module> <module>samples/client/petstore/java/retrofit2</module>
<module>samples/client/petstore/java/retrofit2rx</module> <module>samples/client/petstore/java/retrofit2rx</module>
<module>samples/client/petstore/java/retrofit2-play25</module> <module>samples/client/petstore/java/retrofit2-play25</module>
@ -1356,7 +1343,6 @@
<module>samples/client/petstore/scala-httpclient</module> <module>samples/client/petstore/scala-httpclient</module>
<module>samples/client/petstore/java/jersey1</module> <module>samples/client/petstore/java/jersey1</module>
<module>samples/client/petstore/java/okhttp-gson</module> <module>samples/client/petstore/java/okhttp-gson</module>
<module>samples/client/petstore/java/retrofit</module>
<module>samples/client/petstore/java/retrofit2</module> <module>samples/client/petstore/java/retrofit2</module>
<module>samples/client/petstore/java/retrofit2rx</module> <module>samples/client/petstore/java/retrofit2rx</module>
<module>samples/client/petstore/jaxrs-cxf-client</module> <module>samples/client/petstore/jaxrs-cxf-client</module>

View File

@ -1,21 +0,0 @@
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# exclude jar for gradle wrapper
!gradle/wrapper/*.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# build files
**/target
target
.gradle
build

View File

@ -1,23 +0,0 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -1,79 +0,0 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
build.gradle
build.sbt
git_push.sh
gradle.properties
gradle/wrapper/gradle-wrapper.jar
gradle/wrapper/gradle-wrapper.properties
gradlew
gradlew.bat
pom.xml
settings.gradle
src/main/AndroidManifest.xml
src/main/java/org/openapitools/client/ApiClient.java
src/main/java/org/openapitools/client/CollectionFormats.java
src/main/java/org/openapitools/client/ServerConfiguration.java
src/main/java/org/openapitools/client/ServerVariable.java
src/main/java/org/openapitools/client/StringUtil.java
src/main/java/org/openapitools/client/api/AnotherFakeApi.java
src/main/java/org/openapitools/client/api/FakeApi.java
src/main/java/org/openapitools/client/api/FakeClassnameTags123Api.java
src/main/java/org/openapitools/client/api/PetApi.java
src/main/java/org/openapitools/client/api/StoreApi.java
src/main/java/org/openapitools/client/api/UserApi.java
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
src/main/java/org/openapitools/client/auth/OAuth.java
src/main/java/org/openapitools/client/auth/OAuthFlow.java
src/main/java/org/openapitools/client/auth/OAuthOkHttpClient.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesAnyType.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesArray.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesBoolean.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesInteger.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesNumber.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesObject.java
src/main/java/org/openapitools/client/model/AdditionalPropertiesString.java
src/main/java/org/openapitools/client/model/Animal.java
src/main/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayOfNumberOnly.java
src/main/java/org/openapitools/client/model/ArrayTest.java
src/main/java/org/openapitools/client/model/BigCat.java
src/main/java/org/openapitools/client/model/BigCatAllOf.java
src/main/java/org/openapitools/client/model/Capitalization.java
src/main/java/org/openapitools/client/model/Cat.java
src/main/java/org/openapitools/client/model/CatAllOf.java
src/main/java/org/openapitools/client/model/Category.java
src/main/java/org/openapitools/client/model/ClassModel.java
src/main/java/org/openapitools/client/model/Client.java
src/main/java/org/openapitools/client/model/Dog.java
src/main/java/org/openapitools/client/model/DogAllOf.java
src/main/java/org/openapitools/client/model/EnumArrays.java
src/main/java/org/openapitools/client/model/EnumClass.java
src/main/java/org/openapitools/client/model/EnumTest.java
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
src/main/java/org/openapitools/client/model/FormatTest.java
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
src/main/java/org/openapitools/client/model/MapTest.java
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
src/main/java/org/openapitools/client/model/Model200Response.java
src/main/java/org/openapitools/client/model/ModelApiResponse.java
src/main/java/org/openapitools/client/model/ModelReturn.java
src/main/java/org/openapitools/client/model/Name.java
src/main/java/org/openapitools/client/model/NumberOnly.java
src/main/java/org/openapitools/client/model/Order.java
src/main/java/org/openapitools/client/model/OuterComposite.java
src/main/java/org/openapitools/client/model/OuterEnum.java
src/main/java/org/openapitools/client/model/Pet.java
src/main/java/org/openapitools/client/model/ReadOnlyFirst.java
src/main/java/org/openapitools/client/model/SpecialModelName.java
src/main/java/org/openapitools/client/model/Tag.java
src/main/java/org/openapitools/client/model/TypeHolderDefault.java
src/main/java/org/openapitools/client/model/TypeHolderExample.java
src/main/java/org/openapitools/client/model/User.java
src/main/java/org/openapitools/client/model/XmlItem.java

View File

@ -1 +0,0 @@
5.0.0-SNAPSHOT

View File

@ -1,22 +0,0 @@
#
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
# Ref: https://docs.travis-ci.com/user/languages/java/
#
language: java
jdk:
- openjdk12
- openjdk11
- openjdk10
- openjdk9
- openjdk8
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
#- mvn test
# test using gradle
- gradle test
# test using sbt
# - sbt test

View File

@ -1,43 +0,0 @@
# petstore-retrofit
## Requirements
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
## Installation & Usage
To install the API client library to your local Maven repository, simply execute:
```shell
mvn install
```
To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:
```shell
mvn deploy
```
Refer to the [official documentation](https://maven.apache.org/plugins/maven-deploy-plugin/usage.html) for more information.
After the client library is installed/deployed, you can use it in your Maven project by adding the following to your *pom.xml*:
```xml
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>petstore-retrofit</artifactId>
<version>1.0.0</version>
<scope>compile</scope>
</dependency>
```
## Recommendation
It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues.
## Author

File diff suppressed because it is too large Load Diff

View File

@ -1,114 +0,0 @@
apply plugin: 'idea'
apply plugin: 'eclipse'
group = 'org.openapitools'
version = '1.0.0'
buildscript {
repositories {
maven { url "https://repo1.maven.org/maven2" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
}
}
repositories {
jcenter()
}
if(hasProperty('target') && target == 'android') {
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
minSdkVersion 14
targetSdkVersion 25
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
// Rename the aar correctly
libraryVariants.all { variant ->
variant.outputs.each { output ->
def outputFile = output.outputFile
if (outputFile != null && outputFile.name.endsWith('.aar')) {
def fileName = "${project.name}-${variant.baseName}-${version}.aar"
output.outputFile = new File(outputFile.parent, fileName)
}
}
}
dependencies {
provided 'javax.annotation:jsr250-api:1.0'
}
}
afterEvaluate {
android.libraryVariants.all { variant ->
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
task.from variant.javaCompile.destinationDir
task.destinationDir = project.file("${project.buildDir}/outputs/jar")
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task);
}
}
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
artifacts {
archives sourcesJar
}
} else {
apply plugin: 'java'
apply plugin: 'maven'
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
install {
repositories.mavenInstaller {
pom.artifactId = 'petstore-retrofit'
}
}
task execute(type:JavaExec) {
main = System.getProperty('mainClass')
classpath = sourceSets.main.runtimeClasspath
}
}
ext {
okhttp_version = "2.7.5"
oltu_version = "1.0.1"
retrofit_version = "1.9.0"
swagger_annotations_version = "1.5.21"
junit_version = "4.13"
jodatime_version = "2.9.3"
}
dependencies {
compile "com.squareup.okhttp:okhttp:$okhttp_version"
compile "com.google.code.findbugs:jsr305:3.0.2"
compile "com.squareup.retrofit:retrofit:$retrofit_version"
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
compile "joda-time:joda-time:$jodatime_version"
testCompile "junit:junit:$junit_version"
}

View File

@ -1,20 +0,0 @@
lazy val root = (project in file(".")).
settings(
organization := "org.openapitools",
name := "petstore-retrofit",
version := "1.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
publishArtifact in (Compile, packageDoc) := false,
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"com.squareup.okhttp" % "okhttp" % "2.7.5" % "compile",
"com.squareup.retrofit" % "retrofit" % "1.9.0" % "compile",
"io.swagger" % "swagger-annotations" % "1.5.21" % "compile",
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
"joda-time" % "joda-time" % "2.9.3" % "compile",
"junit" % "junit" % "4.13" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
)

View File

@ -1,58 +0,0 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@ -1,2 +0,0 @@
# Uncomment to build for Android
#target = android

View File

@ -1,5 +0,0 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -1,183 +0,0 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
exec "$JAVACMD" "$@"

View File

@ -1,100 +0,0 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View File

@ -1,250 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.openapitools</groupId>
<artifactId>petstore-retrofit</artifactId>
<packaging>jar</packaging>
<name>petstore-retrofit</name>
<version>1.0.0</version>
<url>https://github.com/openapitools/openapi-generator</url>
<description>OpenAPI Java</description>
<scm>
<connection>scm:git:git@github.com:openapitools/openapi-generator.git</connection>
<developerConnection>scm:git:git@github.com:openapitools/openapi-generator.git</developerConnection>
<url>https://github.com/openapitools/openapi-generator</url>
</scm>
<licenses>
<license>
<name>Unlicense</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>OpenAPI-Generator Contributors</name>
<email>team@openapitools.org</email>
<organization>OpenAPITools.org</organization>
<organizationUrl>http://openapitools.org</organizationUrl>
</developer>
</developers>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>2.2.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12</version>
<configuration>
<systemProperties>
<property>
<name>loggerPath</name>
<value>conf/log4j.properties</value>
</property>
</systemProperties>
<argLine>-Xms512m -Xmx1500m</argLine>
<parallel>methods</parallel>
<forkMode>pertest</forkMode>
</configuration>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- attach test jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>add_sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/java</source>
</sources>
</configuration>
</execution>
<execution>
<id>add_test_sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>sign-artifacts</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations-version}</version>
</dependency>
<!-- @Nullable annotation -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>com.squareup.retrofit</groupId>
<artifactId>retrofit</artifactId>
<version>${retrofit-version}</version>
</dependency>
<dependency>
<groupId>org.apache.oltu.oauth2</groupId>
<artifactId>org.apache.oltu.oauth2.client</artifactId>
<version>${oltu-version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp-version}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${jodatime-version}</version>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-annotations-version>1.5.21</swagger-annotations-version>
<retrofit-version>1.9.0</retrofit-version>
<okhttp-version>2.7.5</okhttp-version>
<jodatime-version>2.9.9</jodatime-version>
<oltu-version>1.0.1</oltu-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.13</junit-version>
</properties>
</project>

View File

@ -1 +0,0 @@
rootProject.name = "petstore-retrofit"

View File

@ -1,3 +0,0 @@
<manifest package="org.openapitools.client" xmlns:android="http://schemas.android.com/apk/res/android">
<application />
</manifest>

View File

@ -1,426 +0,0 @@
package org.openapitools.client;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Type;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormatter;
import org.joda.time.format.ISODateTimeFormat;
import retrofit.RestAdapter;
import retrofit.client.OkClient;
import retrofit.converter.ConversionException;
import retrofit.converter.Converter;
import retrofit.converter.GsonConverter;
import retrofit.mime.TypedByteArray;
import retrofit.mime.TypedInput;
import retrofit.mime.TypedOutput;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.OkHttpClient;
import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.auth.OAuth;
import org.openapitools.client.auth.OAuth.AccessTokenListener;
import org.openapitools.client.auth.OAuthFlow;
public class ApiClient {
private Map<String, Interceptor> apiAuthorizations;
private OkHttpClient okClient;
private RestAdapter.Builder adapterBuilder;
public ApiClient() {
apiAuthorizations = new LinkedHashMap<String, Interceptor>();
createDefaultAdapter();
}
public ApiClient(String[] authNames) {
this();
for(String authName : authNames) {
Interceptor auth;
if ("api_key".equals(authName)) {
auth = new ApiKeyAuth("header", "api_key");
} else if ("api_key_query".equals(authName)) {
auth = new ApiKeyAuth("query", "api_key_query");
} else if ("http_basic_test".equals(authName)) {
auth = new HttpBasicAuth();
} else if ("petstore_auth".equals(authName)) {
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
} else {
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
}
addAuthorization(authName, auth);
}
}
/**
* Basic constructor for single auth name
* @param authName Authentication name
*/
public ApiClient(String authName) {
this(new String[]{authName});
}
/**
* Helper constructor for single api key
* @param authName Authentication name
* @param apiKey API key
*/
public ApiClient(String authName, String apiKey) {
this(authName);
this.setApiKey(apiKey);
}
/**
* Helper constructor for single basic auth or password oauth2
* @param authName Authentication name
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String username, String password) {
this(authName);
this.setCredentials(username, password);
}
/**
* Helper constructor for single password oauth2
* @param authName Authentication name
* @param clientId Client ID
* @param secret Client secret
* @param username Username
* @param password Password
*/
public ApiClient(String authName, String clientId, String secret, String username, String password) {
this(authName);
this.getTokenEndPoint()
.setClientId(clientId)
.setClientSecret(secret)
.setUsername(username)
.setPassword(password);
}
public void createDefaultAdapter() {
Gson gson = new GsonBuilder()
.setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ")
.registerTypeAdapter(DateTime.class, new DateTimeTypeAdapter())
.registerTypeAdapter(LocalDate.class, new LocalDateTypeAdapter())
.create();
okClient = new OkHttpClient();
adapterBuilder = new RestAdapter
.Builder()
.setEndpoint("http://petstore.swagger.io:80/v2")
.setClient(new OkClient(okClient))
.setConverter(new GsonConverterWrapper(gson));
}
public <S> S createService(Class<S> serviceClass) {
return adapterBuilder.build().create(serviceClass);
}
/**
* Helper method to configure the first api key found
* @param apiKey API key
*/
private void setApiKey(String apiKey) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof ApiKeyAuth) {
ApiKeyAuth keyAuth = (ApiKeyAuth) apiAuthorization;
keyAuth.setApiKey(apiKey);
return;
}
}
}
/**
* Helper method to set token for the first Http Bearer authentication found.
* @param bearerToken Bearer token
*/
public void setBearerToken(String bearerToken) {
for (Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof HttpBearerAuth) {
((HttpBearerAuth) apiAuthorization).setBearerToken(bearerToken);
return;
}
}
}
/**
* Helper method to configure the username/password for basic auth or password oauth
* @param username Username
* @param password Password
*/
private void setCredentials(String username, String password) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof HttpBasicAuth) {
HttpBasicAuth basicAuth = (HttpBasicAuth) apiAuthorization;
basicAuth.setCredentials(username, password);
return;
}
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.getTokenRequestBuilder().setUsername(username).setPassword(password);
return;
}
}
}
/**
* Helper method to configure the token endpoint of the first oauth found in the apiAuthorizations (there should be only one)
* @return Token request builder
*/
public TokenRequestBuilder getTokenEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getTokenRequestBuilder();
}
}
return null;
}
/**
* Helper method to configure authorization endpoint of the first oauth found in the apiAuthorizations (there should be only one)
* @return Authentication request builder
*/
public AuthenticationRequestBuilder getAuthorizationEndPoint() {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
return oauth.getAuthenticationRequestBuilder();
}
}
return null;
}
/**
* Helper method to pre-set the oauth access token of the first oauth found in the apiAuthorizations (there should be only one)
* @param accessToken Access token
*/
public void setAccessToken(String accessToken) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.setAccessToken(accessToken);
return;
}
}
}
/**
* Helper method to configure the oauth accessCode/implicit flow parameters
* @param clientId Client ID
* @param clientSecret Client secret
* @param redirectURI Redirect URI
*/
public void configureAuthorizationFlow(String clientId, String clientSecret, String redirectURI) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.getTokenRequestBuilder()
.setClientId(clientId)
.setClientSecret(clientSecret)
.setRedirectURI(redirectURI);
oauth.getAuthenticationRequestBuilder()
.setClientId(clientId)
.setRedirectURI(redirectURI);
return;
}
}
}
/**
* Configures a listener which is notified when a new access token is received.
* @param accessTokenListener Access token listener
*/
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
if (apiAuthorization instanceof OAuth) {
OAuth oauth = (OAuth) apiAuthorization;
oauth.registerAccessTokenListener(accessTokenListener);
return;
}
}
}
/**
* Adds an authorization to be used by the client
* @param authName Authentication name
* @param authorization Authorization
*/
public void addAuthorization(String authName, Interceptor authorization) {
if (apiAuthorizations.containsKey(authName)) {
throw new RuntimeException("auth name \"" + authName + "\" already in api authorizations");
}
apiAuthorizations.put(authName, authorization);
okClient.interceptors().add(authorization);
}
public Map<String, Interceptor> getApiAuthorizations() {
return apiAuthorizations;
}
public void setApiAuthorizations(Map<String, Interceptor> apiAuthorizations) {
this.apiAuthorizations = apiAuthorizations;
}
public RestAdapter.Builder getAdapterBuilder() {
return adapterBuilder;
}
public void setAdapterBuilder(RestAdapter.Builder adapterBuilder) {
this.adapterBuilder = adapterBuilder;
}
public OkHttpClient getOkClient() {
return okClient;
}
public void addAuthsToOkClient(OkHttpClient okClient) {
for(Interceptor apiAuthorization : apiAuthorizations.values()) {
okClient.interceptors().add(apiAuthorization);
}
}
/**
* Clones the okClient given in parameter, adds the auth interceptors and uses it to configure the RestAdapter
* @param okClient OkHttp client
*/
public void configureFromOkclient(OkHttpClient okClient) {
OkHttpClient clone = okClient.clone();
addAuthsToOkClient(clone);
adapterBuilder.setClient(new OkClient(clone));
}
}
/**
* This wrapper is to take care of this case:
* when the deserialization fails due to JsonParseException and the
* expected type is String, then just return the body string.
*/
class GsonConverterWrapper implements Converter {
private GsonConverter converter;
public GsonConverterWrapper(Gson gson) {
converter = new GsonConverter(gson);
}
@Override public Object fromBody(TypedInput body, Type type) throws ConversionException {
byte[] bodyBytes = readInBytes(body);
TypedByteArray newBody = new TypedByteArray(body.mimeType(), bodyBytes);
try {
return converter.fromBody(newBody, type);
} catch (ConversionException e) {
if (e.getCause() instanceof JsonParseException && type.equals(String.class)) {
return new String(bodyBytes);
} else {
throw e;
}
}
}
@Override public TypedOutput toBody(Object object) {
return converter.toBody(object);
}
private byte[] readInBytes(TypedInput body) throws ConversionException {
InputStream in = null;
try {
in = body.in();
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[0xFFFF];
for (int len; (len = in.read(buffer)) != -1;)
os.write(buffer, 0, len);
os.flush();
return os.toByteArray();
} catch (IOException e) {
throw new ConversionException(e);
} finally {
if (in != null) {
try {
in.close();
} catch (IOException ignored) {
}
}
}
}
}
/**
* Gson TypeAdapter for Joda DateTime type
*/
class DateTimeTypeAdapter extends TypeAdapter<DateTime> {
private final DateTimeFormatter parseFormatter = ISODateTimeFormat.dateOptionalTimeParser();
private final DateTimeFormatter printFormatter = ISODateTimeFormat.dateTime();
@Override
public void write(JsonWriter out, DateTime date) throws IOException {
if (date == null) {
out.nullValue();
} else {
out.value(printFormatter.print(date));
}
}
@Override
public DateTime read(JsonReader in) throws IOException {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
return parseFormatter.parseDateTime(date);
}
}
}
/**
* Gson TypeAdapter for Joda DateTime type
*/
class LocalDateTypeAdapter extends TypeAdapter<LocalDate> {
private final DateTimeFormatter formatter = ISODateTimeFormat.date();
@Override
public void write(JsonWriter out, LocalDate date) throws IOException {
if (date == null) {
out.nullValue();
} else {
out.value(formatter.print(date));
}
}
@Override
public LocalDate read(JsonReader in) throws IOException {
switch (in.peek()) {
case NULL:
in.nextNull();
return null;
default:
String date = in.nextString();
return formatter.parseLocalDate(date);
}
}
}

View File

@ -1,99 +0,0 @@
package org.openapitools.client;
import java.util.Arrays;
import java.util.List;
public class CollectionFormats {
public static class CSVParams {
protected List<String> params;
public CSVParams() {
}
public CSVParams(List<String> params) {
this.params = params;
}
public CSVParams(String... params) {
this.params = Arrays.asList(params);
}
public List<String> getParams() {
return params;
}
public void setParams(List<String> params) {
this.params = params;
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), ",");
}
}
public static class SPACEParams extends SSVParams {
}
public static class SSVParams extends CSVParams {
public SSVParams() {
}
public SSVParams(List<String> params) {
super(params);
}
public SSVParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), " ");
}
}
public static class TSVParams extends CSVParams {
public TSVParams() {
}
public TSVParams(List<String> params) {
super(params);
}
public TSVParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join( params.toArray(new String[0]), "\t");
}
}
public static class PIPESParams extends CSVParams {
public PIPESParams() {
}
public PIPESParams(List<String> params) {
super(params);
}
public PIPESParams(String... params) {
super(params);
}
@Override
public String toString() {
return StringUtil.join(params.toArray(new String[0]), "|");
}
}
}

View File

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

View File

@ -1,23 +0,0 @@
package org.openapitools.client;
import java.util.HashSet;
/**
* Representing a Server Variable for server URL template substitution.
*/
public class ServerVariable {
public String description;
public String defaultValue;
public HashSet<String> enumValues = null;
/**
* @param description A description for the server variable.
* @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.
*/
public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) {
this.description = description;
this.defaultValue = defaultValue;
this.enumValues = enumValues;
}
}

View File

@ -1,83 +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;
import java.util.Collection;
import java.util.Iterator;
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
*
* @param array The array
* @param value The value to search
* @return true if the array contains the value
*/
public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) {
if (value == null && str == null) {
return true;
}
if (value != null && value.equalsIgnoreCase(str)) {
return true;
}
}
return false;
}
/**
* 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
* @param separator The separator
* @return the resulting string
*/
public static String join(String[] array, String separator) {
int len = array.length;
if (len == 0) {
return "";
}
StringBuilder out = new StringBuilder();
out.append(array[0]);
for (int i = 1; i < len; i++) {
out.append(separator).append(array[i]);
}
return out.toString();
}
/**
* Join a list of strings with the given separator.
*
* @param list The list of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(Collection<String> list, String separator) {
Iterator<String> iterator = list.iterator();
StringBuilder out = new StringBuilder();
if (iterator.hasNext()) {
out.append(iterator.next());
}
while (iterator.hasNext()) {
out.append(separator).append(iterator.next());
}
return out.toString();
}
}

View File

@ -1,41 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import org.openapitools.client.model.Client;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface AnotherFakeApi {
/**
* To test special tags
* Sync method
* To test special tags and operation ID starting with number
* @param body client model (required)
* @return Client
*/
@PATCH("/another-fake/dummy")
Client call123testSpecialTags(
@retrofit.http.Body Client body
);
/**
* To test special tags
* Async method
* @param body client model (required)
* @param cb callback method
*/
@PATCH("/another-fake/dummy")
void call123testSpecialTags(
@retrofit.http.Body Client body, Callback<Client> cb
);
}

View File

@ -1,429 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import org.joda.time.DateTime;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.joda.time.LocalDate;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.User;
import org.openapitools.client.model.XmlItem;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface FakeApi {
/**
* creates an XmlItem
* Sync method
* this route creates an XmlItem
* @param xmlItem XmlItem Body (required)
* @return Void
*/
@POST("/fake/create_xml_item")
Void createXmlItem(
@retrofit.http.Body XmlItem xmlItem
);
/**
* creates an XmlItem
* Async method
* @param xmlItem XmlItem Body (required)
* @param cb callback method
*/
@POST("/fake/create_xml_item")
void createXmlItem(
@retrofit.http.Body XmlItem xmlItem, Callback<Void> cb
);
/**
*
* Sync method
* Test serialization of outer boolean types
* @param body Input boolean as post body (optional)
* @return Boolean
*/
@POST("/fake/outer/boolean")
Boolean fakeOuterBooleanSerialize(
@retrofit.http.Body Boolean body
);
/**
*
* Async method
* @param body Input boolean as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/boolean")
void fakeOuterBooleanSerialize(
@retrofit.http.Body Boolean body, Callback<Boolean> cb
);
/**
*
* Sync method
* Test serialization of object with outer number type
* @param body Input composite as post body (optional)
* @return OuterComposite
*/
@POST("/fake/outer/composite")
OuterComposite fakeOuterCompositeSerialize(
@retrofit.http.Body OuterComposite body
);
/**
*
* Async method
* @param body Input composite as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/composite")
void fakeOuterCompositeSerialize(
@retrofit.http.Body OuterComposite body, Callback<OuterComposite> cb
);
/**
*
* Sync method
* Test serialization of outer number types
* @param body Input number as post body (optional)
* @return BigDecimal
*/
@POST("/fake/outer/number")
BigDecimal fakeOuterNumberSerialize(
@retrofit.http.Body BigDecimal body
);
/**
*
* Async method
* @param body Input number as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/number")
void fakeOuterNumberSerialize(
@retrofit.http.Body BigDecimal body, Callback<BigDecimal> cb
);
/**
*
* Sync method
* Test serialization of outer string types
* @param body Input string as post body (optional)
* @return String
*/
@POST("/fake/outer/string")
String fakeOuterStringSerialize(
@retrofit.http.Body String body
);
/**
*
* Async method
* @param body Input string as post body (optional)
* @param cb callback method
*/
@POST("/fake/outer/string")
void fakeOuterStringSerialize(
@retrofit.http.Body String body, Callback<String> cb
);
/**
*
* Sync method
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
* @param body (required)
* @return Void
*/
@PUT("/fake/body-with-file-schema")
Void testBodyWithFileSchema(
@retrofit.http.Body FileSchemaTestClass body
);
/**
*
* Async method
* @param body (required)
* @param cb callback method
*/
@PUT("/fake/body-with-file-schema")
void testBodyWithFileSchema(
@retrofit.http.Body FileSchemaTestClass body, Callback<Void> cb
);
/**
*
* Sync method
*
* @param query (required)
* @param body (required)
* @return Void
*/
@PUT("/fake/body-with-query-params")
Void testBodyWithQueryParams(
@retrofit.http.Query("query") String query, @retrofit.http.Body User body
);
/**
*
* Async method
* @param query (required)
* @param body (required)
* @param cb callback method
*/
@PUT("/fake/body-with-query-params")
void testBodyWithQueryParams(
@retrofit.http.Query("query") String query, @retrofit.http.Body User body, Callback<Void> cb
);
/**
* To test \&quot;client\&quot; model
* Sync method
* To test \&quot;client\&quot; model
* @param body client model (required)
* @return Client
*/
@PATCH("/fake")
Client testClientModel(
@retrofit.http.Body Client body
);
/**
* To test \&quot;client\&quot; model
* Async method
* @param body client model (required)
* @param cb callback method
*/
@PATCH("/fake")
void testClientModel(
@retrofit.http.Body Client body, Callback<Client> cb
);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Sync method
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* @param number None (required)
* @param _double None (required)
* @param patternWithoutDelimiter None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param string None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @return Void
*/
@retrofit.http.FormUrlEncoded
@POST("/fake")
Void testEndpointParameters(
@retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") TypedFile binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback
);
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
* Async method
* @param number None (required)
* @param _double None (required)
* @param patternWithoutDelimiter None (required)
* @param _byte None (required)
* @param integer None (optional)
* @param int32 None (optional)
* @param int64 None (optional)
* @param _float None (optional)
* @param string None (optional)
* @param binary None (optional)
* @param date None (optional)
* @param dateTime None (optional)
* @param password None (optional)
* @param paramCallback None (optional)
* @param cb callback method
*/
@retrofit.http.FormUrlEncoded
@POST("/fake")
void testEndpointParameters(
@retrofit.http.Field("number") BigDecimal number, @retrofit.http.Field("double") Double _double, @retrofit.http.Field("pattern_without_delimiter") String patternWithoutDelimiter, @retrofit.http.Field("byte") byte[] _byte, @retrofit.http.Field("integer") Integer integer, @retrofit.http.Field("int32") Integer int32, @retrofit.http.Field("int64") Long int64, @retrofit.http.Field("float") Float _float, @retrofit.http.Field("string") String string, @retrofit.http.Field("binary") TypedFile binary, @retrofit.http.Field("date") LocalDate date, @retrofit.http.Field("dateTime") DateTime dateTime, @retrofit.http.Field("password") String password, @retrofit.http.Field("callback") String paramCallback, Callback<Void> cb
);
/**
* To test enum parameters
* Sync method
* To test enum parameters
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList&lt;String&gt;())
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList&lt;String&gt;())
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @return Void
*/
@retrofit.http.FormUrlEncoded
@GET("/fake")
Void testEnumParameters(
@retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Query("enum_query_double") Double enumQueryDouble, @retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString
);
/**
* To test enum parameters
* Async method
* @param enumHeaderStringArray Header parameter enum test (string array) (optional, default to new ArrayList&lt;String&gt;())
* @param enumHeaderString Header parameter enum test (string) (optional, default to -efg)
* @param enumQueryStringArray Query parameter enum test (string array) (optional, default to new ArrayList&lt;String&gt;())
* @param enumQueryString Query parameter enum test (string) (optional, default to -efg)
* @param enumQueryInteger Query parameter enum test (double) (optional)
* @param enumQueryDouble Query parameter enum test (double) (optional)
* @param enumFormStringArray Form parameter enum test (string array) (optional, default to $)
* @param enumFormString Form parameter enum test (string) (optional, default to -efg)
* @param cb callback method
*/
@retrofit.http.FormUrlEncoded
@GET("/fake")
void testEnumParameters(
@retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Query("enum_query_double") Double enumQueryDouble, @retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, Callback<Void> cb
);
/**
* Fake endpoint to test group parameters (optional)
* Sync method
* Fake endpoint to test group parameters (optional)
* @param requiredStringGroup Required String in group parameters (required)
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @param requiredInt64Group Required Integer in group parameters (required)
* @param stringGroup String in group parameters (optional)
* @param booleanGroup Boolean in group parameters (optional)
* @param int64Group Integer in group parameters (optional)
* @return Void
*/
@DELETE("/fake")
Void testGroupParameters(
@retrofit.http.Query("required_string_group") Integer requiredStringGroup, @retrofit.http.Header("required_boolean_group") Boolean requiredBooleanGroup, @retrofit.http.Query("required_int64_group") Long requiredInt64Group, @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group
);
/**
* Fake endpoint to test group parameters (optional)
* Async method
* @param requiredStringGroup Required String in group parameters (required)
* @param requiredBooleanGroup Required Boolean in group parameters (required)
* @param requiredInt64Group Required Integer in group parameters (required)
* @param stringGroup String in group parameters (optional)
* @param booleanGroup Boolean in group parameters (optional)
* @param int64Group Integer in group parameters (optional)
* @param cb callback method
*/
@DELETE("/fake")
void testGroupParameters(
@retrofit.http.Query("required_string_group") Integer requiredStringGroup, @retrofit.http.Header("required_boolean_group") Boolean requiredBooleanGroup, @retrofit.http.Query("required_int64_group") Long requiredInt64Group, @retrofit.http.Query("string_group") Integer stringGroup, @retrofit.http.Header("boolean_group") Boolean booleanGroup, @retrofit.http.Query("int64_group") Long int64Group, Callback<Void> cb
);
/**
* test inline additionalProperties
* Sync method
*
* @param param request body (required)
* @return Void
*/
@POST("/fake/inline-additionalProperties")
Void testInlineAdditionalProperties(
@retrofit.http.Body Map<String, String> param
);
/**
* test inline additionalProperties
* Async method
* @param param request body (required)
* @param cb callback method
*/
@POST("/fake/inline-additionalProperties")
void testInlineAdditionalProperties(
@retrofit.http.Body Map<String, String> param, Callback<Void> cb
);
/**
* test json serialization of form data
* Sync method
*
* @param param field1 (required)
* @param param2 field2 (required)
* @return Void
*/
@retrofit.http.FormUrlEncoded
@GET("/fake/jsonFormData")
Void testJsonFormData(
@retrofit.http.Field("param") String param, @retrofit.http.Field("param2") String param2
);
/**
* test json serialization of form data
* Async method
* @param param field1 (required)
* @param param2 field2 (required)
* @param cb callback method
*/
@retrofit.http.FormUrlEncoded
@GET("/fake/jsonFormData")
void testJsonFormData(
@retrofit.http.Field("param") String param, @retrofit.http.Field("param2") String param2, Callback<Void> cb
);
/**
*
* Sync method
* To test the collection format in query parameters
* @param pipe (required)
* @param ioutil (required)
* @param http (required)
* @param url (required)
* @param context (required)
* @return Void
*/
@PUT("/fake/test-query-paramters")
Void testQueryParameterCollectionFormat(
@retrofit.http.Query("pipe") CSVParams pipe, @retrofit.http.Query("ioutil") CSVParams ioutil, @retrofit.http.Query("http") SPACEParams http, @retrofit.http.Query("url") CSVParams url, @retrofit.http.Query("context") List<String> context
);
/**
*
* Async method
* @param pipe (required)
* @param ioutil (required)
* @param http (required)
* @param url (required)
* @param context (required)
* @param cb callback method
*/
@PUT("/fake/test-query-paramters")
void testQueryParameterCollectionFormat(
@retrofit.http.Query("pipe") CSVParams pipe, @retrofit.http.Query("ioutil") CSVParams ioutil, @retrofit.http.Query("http") SPACEParams http, @retrofit.http.Query("url") CSVParams url, @retrofit.http.Query("context") List<String> context, Callback<Void> cb
);
}

View File

@ -1,41 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import org.openapitools.client.model.Client;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface FakeClassnameTags123Api {
/**
* To test class name in snake case
* Sync method
* To test class name in snake case
* @param body client model (required)
* @return Client
*/
@PATCH("/fake_classname_test")
Client testClassname(
@retrofit.http.Body Client body
);
/**
* To test class name in snake case
* Async method
* @param body client model (required)
* @param cb callback method
*/
@PATCH("/fake_classname_test")
void testClassname(
@retrofit.http.Body Client body, Callback<Client> cb
);
}

View File

@ -1,256 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import java.io.File;
import org.openapitools.client.model.ModelApiResponse;
import org.openapitools.client.model.Pet;
import java.util.Set;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface PetApi {
/**
* Add a new pet to the store
* Sync method
*
* @param body Pet object that needs to be added to the store (required)
* @return Void
*/
@POST("/pet")
Void addPet(
@retrofit.http.Body Pet body
);
/**
* Add a new pet to the store
* Async method
* @param body Pet object that needs to be added to the store (required)
* @param cb callback method
*/
@POST("/pet")
void addPet(
@retrofit.http.Body Pet body, Callback<Void> cb
);
/**
* Deletes a pet
* Sync method
*
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @return Void
*/
@DELETE("/pet/{petId}")
Void deletePet(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey
);
/**
* Deletes a pet
* Async method
* @param petId Pet id to delete (required)
* @param apiKey (optional)
* @param cb callback method
*/
@DELETE("/pet/{petId}")
void deletePet(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Header("api_key") String apiKey, Callback<Void> cb
);
/**
* Finds Pets by status
* Sync method
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for filter (required)
* @return List&lt;Pet&gt;
*/
@GET("/pet/findByStatus")
List<Pet> findPetsByStatus(
@retrofit.http.Query("status") CSVParams status
);
/**
* Finds Pets by status
* Async method
* @param status Status values that need to be considered for filter (required)
* @param cb callback method
*/
@GET("/pet/findByStatus")
void findPetsByStatus(
@retrofit.http.Query("status") CSVParams status, Callback<List<Pet>> cb
);
/**
* Finds Pets by tags
* Sync method
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return Set&lt;Pet&gt;
*/
@GET("/pet/findByTags")
Set<Pet> findPetsByTags(
@retrofit.http.Query("tags") CSVParams tags
);
/**
* Finds Pets by tags
* Async method
* @param tags Tags to filter by (required)
* @param cb callback method
*/
@GET("/pet/findByTags")
void findPetsByTags(
@retrofit.http.Query("tags") CSVParams tags, Callback<Set<Pet>> cb
);
/**
* Find pet by ID
* Sync method
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Pet
*/
@GET("/pet/{petId}")
Pet getPetById(
@retrofit.http.Path("petId") Long petId
);
/**
* Find pet by ID
* Async method
* @param petId ID of pet to return (required)
* @param cb callback method
*/
@GET("/pet/{petId}")
void getPetById(
@retrofit.http.Path("petId") Long petId, Callback<Pet> cb
);
/**
* Update an existing pet
* Sync method
*
* @param body Pet object that needs to be added to the store (required)
* @return Void
*/
@PUT("/pet")
Void updatePet(
@retrofit.http.Body Pet body
);
/**
* Update an existing pet
* Async method
* @param body Pet object that needs to be added to the store (required)
* @param cb callback method
*/
@PUT("/pet")
void updatePet(
@retrofit.http.Body Pet body, Callback<Void> cb
);
/**
* Updates a pet in the store with form data
* Sync method
*
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @return Void
*/
@retrofit.http.FormUrlEncoded
@POST("/pet/{petId}")
Void updatePetWithForm(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status
);
/**
* Updates a pet in the store with form data
* Async method
* @param petId ID of pet that needs to be updated (required)
* @param name Updated name of the pet (optional)
* @param status Updated status of the pet (optional)
* @param cb callback method
*/
@retrofit.http.FormUrlEncoded
@POST("/pet/{petId}")
void updatePetWithForm(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Field("name") String name, @retrofit.http.Field("status") String status, Callback<Void> cb
);
/**
* uploads an image
* Sync method
*
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ModelApiResponse
*/
@retrofit.http.Multipart
@POST("/pet/{petId}/uploadImage")
ModelApiResponse uploadFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file
);
/**
* uploads an image
* Async method
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @param cb callback method
*/
@retrofit.http.Multipart
@POST("/pet/{petId}/uploadImage")
void uploadFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("additionalMetadata") String additionalMetadata, @retrofit.http.Part("file") TypedFile file, Callback<ModelApiResponse> cb
);
/**
* uploads an image (required)
* Sync method
*
* @param petId ID of pet to update (required)
* @param requiredFile file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @return ModelApiResponse
*/
@retrofit.http.Multipart
@POST("/fake/{petId}/uploadImageWithRequiredFile")
ModelApiResponse uploadFileWithRequiredFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata
);
/**
* uploads an image (required)
* Async method
* @param petId ID of pet to update (required)
* @param requiredFile file to upload (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param cb callback method
*/
@retrofit.http.Multipart
@POST("/fake/{petId}/uploadImageWithRequiredFile")
void uploadFileWithRequiredFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback<ModelApiResponse> cb
);
}

View File

@ -1,110 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import org.openapitools.client.model.Order;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface StoreApi {
/**
* Delete purchase order by ID
* Sync method
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* @param orderId ID of the order that needs to be deleted (required)
* @return Void
*/
@DELETE("/store/order/{order_id}")
Void deleteOrder(
@retrofit.http.Path("order_id") String orderId
);
/**
* Delete purchase order by ID
* Async method
* @param orderId ID of the order that needs to be deleted (required)
* @param cb callback method
*/
@DELETE("/store/order/{order_id}")
void deleteOrder(
@retrofit.http.Path("order_id") String orderId, Callback<Void> cb
);
/**
* Returns pet inventories by status
* Sync method
* Returns a map of status codes to quantities
* @return Map&lt;String, Integer&gt;
*/
@GET("/store/inventory")
Map<String, Integer> getInventory();
/**
* Returns pet inventories by status
* Async method
* @param cb callback method
*/
@GET("/store/inventory")
void getInventory(
Callback<Map<String, Integer>> cb
);
/**
* Find purchase order by ID
* Sync method
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
*/
@GET("/store/order/{order_id}")
Order getOrderById(
@retrofit.http.Path("order_id") Long orderId
);
/**
* Find purchase order by ID
* Async method
* @param orderId ID of pet that needs to be fetched (required)
* @param cb callback method
*/
@GET("/store/order/{order_id}")
void getOrderById(
@retrofit.http.Path("order_id") Long orderId, Callback<Order> cb
);
/**
* Place an order for a pet
* Sync method
*
* @param body order placed for purchasing the pet (required)
* @return Order
*/
@POST("/store/order")
Order placeOrder(
@retrofit.http.Body Order body
);
/**
* Place an order for a pet
* Async method
* @param body order placed for purchasing the pet (required)
* @param cb callback method
*/
@POST("/store/order")
void placeOrder(
@retrofit.http.Body Order body, Callback<Order> cb
);
}

View File

@ -1,210 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.CollectionFormats.*;
import retrofit.Callback;
import retrofit.http.*;
import retrofit.mime.*;
import org.openapitools.client.model.User;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public interface UserApi {
/**
* Create user
* Sync method
* This can only be done by the logged in user.
* @param body Created user object (required)
* @return Void
*/
@POST("/user")
Void createUser(
@retrofit.http.Body User body
);
/**
* Create user
* Async method
* @param body Created user object (required)
* @param cb callback method
*/
@POST("/user")
void createUser(
@retrofit.http.Body User body, Callback<Void> cb
);
/**
* Creates list of users with given input array
* Sync method
*
* @param body List of user object (required)
* @return Void
*/
@POST("/user/createWithArray")
Void createUsersWithArrayInput(
@retrofit.http.Body List<User> body
);
/**
* Creates list of users with given input array
* Async method
* @param body List of user object (required)
* @param cb callback method
*/
@POST("/user/createWithArray")
void createUsersWithArrayInput(
@retrofit.http.Body List<User> body, Callback<Void> cb
);
/**
* Creates list of users with given input array
* Sync method
*
* @param body List of user object (required)
* @return Void
*/
@POST("/user/createWithList")
Void createUsersWithListInput(
@retrofit.http.Body List<User> body
);
/**
* Creates list of users with given input array
* Async method
* @param body List of user object (required)
* @param cb callback method
*/
@POST("/user/createWithList")
void createUsersWithListInput(
@retrofit.http.Body List<User> body, Callback<Void> cb
);
/**
* Delete user
* Sync method
* This can only be done by the logged in user.
* @param username The name that needs to be deleted (required)
* @return Void
*/
@DELETE("/user/{username}")
Void deleteUser(
@retrofit.http.Path("username") String username
);
/**
* Delete user
* Async method
* @param username The name that needs to be deleted (required)
* @param cb callback method
*/
@DELETE("/user/{username}")
void deleteUser(
@retrofit.http.Path("username") String username, Callback<Void> cb
);
/**
* Get user by user name
* Sync method
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
@GET("/user/{username}")
User getUserByName(
@retrofit.http.Path("username") String username
);
/**
* Get user by user name
* Async method
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param cb callback method
*/
@GET("/user/{username}")
void getUserByName(
@retrofit.http.Path("username") String username, Callback<User> cb
);
/**
* Logs user into the system
* Sync method
*
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return String
*/
@GET("/user/login")
String loginUser(
@retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password
);
/**
* Logs user into the system
* Async method
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @param cb callback method
*/
@GET("/user/login")
void loginUser(
@retrofit.http.Query("username") String username, @retrofit.http.Query("password") String password, Callback<String> cb
);
/**
* Logs out current logged in user session
* Sync method
*
* @return Void
*/
@GET("/user/logout")
Void logoutUser();
/**
* Logs out current logged in user session
* Async method
* @param cb callback method
*/
@GET("/user/logout")
void logoutUser(
Callback<Void> cb
);
/**
* Updated user
* Sync method
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @return Void
*/
@PUT("/user/{username}")
Void updateUser(
@retrofit.http.Path("username") String username, @retrofit.http.Body User body
);
/**
* Updated user
* Async method
* @param username name that need to be deleted (required)
* @param body Updated user object (required)
* @param cb callback method
*/
@PUT("/user/{username}")
void updateUser(
@retrofit.http.Path("username") String username, @retrofit.http.Body User body, Callback<Void> cb
);
}

View File

@ -1,72 +0,0 @@
package org.openapitools.client.auth;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
public class ApiKeyAuth implements Interceptor {
private final String location;
private final String paramName;
private String apiKey;
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;
}
@Override
public Response intercept(Chain chain) throws IOException {
String paramValue;
Request request = chain.request();
if ("query".equals(location)) {
String newQuery = request.uri().getQuery();
paramValue = paramName + "=" + apiKey;
if (newQuery == null) {
newQuery = paramValue;
} else {
newQuery += "&" + paramValue;
}
URI newUri;
try {
newUri = new URI(request.uri().getScheme(), request.uri().getAuthority(),
request.uri().getPath(), newQuery, request.uri().getFragment());
} catch (URISyntaxException e) {
throw new IOException(e);
}
request = request.newBuilder().url(newUri.toURL()).build();
} else if ("header".equals(location)) {
request = request.newBuilder()
.addHeader(paramName, apiKey)
.build();
} else if ("cookie".equals(location)) {
request = request.newBuilder()
.addHeader("Cookie", String.format("%s=%s", paramName, apiKey))
.build();
}
return chain.proceed(request);
}
}

View File

@ -1,49 +0,0 @@
package org.openapitools.client.auth;
import java.io.IOException;
import com.squareup.okhttp.Credentials;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
public class HttpBasicAuth implements Interceptor {
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;
}
public void setCredentials(String username, String password) {
this.username = username;
this.password = password;
}
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
// If the request already have an authorization (eg. Basic auth), do nothing
if (request.header("Authorization") == null) {
String credentials = Credentials.basic(username, password);
request = request.newBuilder()
.addHeader("Authorization", credentials)
.build();
}
return chain.proceed(request);
}
}

View File

@ -1,42 +0,0 @@
package org.openapitools.client.auth;
import java.io.IOException;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
public class HttpBearerAuth implements Interceptor {
private final String scheme;
private String bearerToken;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
}
public String getBearerToken() {
return bearerToken;
}
public void setBearerToken(String bearerToken) {
this.bearerToken = bearerToken;
}
@Override
public Response intercept(Chain chain) throws IOException {
Request request = chain.request();
// If the request already have an authorization (eg. Basic auth), do nothing
if (request.header("Authorization") == null && bearerToken != null) {
request = request.newBuilder()
.addHeader("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken)
.build();
}
return chain.proceed(request);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
}
}

View File

@ -1,185 +0,0 @@
package org.openapitools.client.auth;
import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED;
import static java.net.HttpURLConnection.HTTP_FORBIDDEN;
import java.io.IOException;
import java.util.Map;
import org.apache.oltu.oauth2.client.OAuthClient;
import org.apache.oltu.oauth2.client.request.OAuthBearerClientRequest;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder;
import org.apache.oltu.oauth2.client.response.OAuthJSONAccessTokenResponse;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import org.apache.oltu.oauth2.common.message.types.GrantType;
import org.apache.oltu.oauth2.common.token.BasicOAuthToken;
import com.squareup.okhttp.Interceptor;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Request.Builder;
import com.squareup.okhttp.Response;
public class OAuth implements Interceptor {
public interface AccessTokenListener {
public void notify(BasicOAuthToken token);
}
private volatile String accessToken;
private OAuthClient oauthClient;
private TokenRequestBuilder tokenRequestBuilder;
private AuthenticationRequestBuilder authenticationRequestBuilder;
private AccessTokenListener accessTokenListener;
public OAuth( OkHttpClient client, TokenRequestBuilder requestBuilder ) {
this.oauthClient = new OAuthClient(new OAuthOkHttpClient(client));
this.tokenRequestBuilder = requestBuilder;
}
public OAuth(TokenRequestBuilder requestBuilder ) {
this(new OkHttpClient(), requestBuilder);
}
public OAuth(OAuthFlow flow, String authorizationUrl, String tokenUrl, String scopes) {
this(OAuthClientRequest.tokenLocation(tokenUrl).setScope(scopes));
setFlow(flow);
authenticationRequestBuilder = OAuthClientRequest.authorizationLocation(authorizationUrl);
}
public void setFlow(OAuthFlow flow) {
switch(flow) {
case accessCode:
case implicit:
tokenRequestBuilder.setGrantType(GrantType.AUTHORIZATION_CODE);
break;
case password:
tokenRequestBuilder.setGrantType(GrantType.PASSWORD);
break;
case application:
tokenRequestBuilder.setGrantType(GrantType.CLIENT_CREDENTIALS);
break;
default:
break;
}
}
@Override
public Response intercept(Chain chain)
throws IOException {
return retryingIntercept(chain, true);
}
private Response retryingIntercept(Chain chain, boolean updateTokenAndRetryOnAuthorizationFailure) throws IOException {
Request request = chain.request();
// If the request already have an authorization (eg. Basic auth), do nothing
if (request.header("Authorization") != null) {
return chain.proceed(request);
}
// If first time, get the token
OAuthClientRequest oAuthRequest;
if (getAccessToken() == null) {
updateAccessToken(null);
}
if (getAccessToken() != null) {
// Build the request
Builder rb = request.newBuilder();
String requestAccessToken = new String(getAccessToken());
try {
oAuthRequest = new OAuthBearerClientRequest(request.urlString())
.setAccessToken(requestAccessToken)
.buildHeaderMessage();
} catch (OAuthSystemException e) {
throw new IOException(e);
}
for ( Map.Entry<String, String> header : oAuthRequest.getHeaders().entrySet() ) {
rb.addHeader(header.getKey(), header.getValue());
}
rb.url( oAuthRequest.getLocationUri());
//Execute the request
Response response = chain.proceed(rb.build());
// 401/403 most likely indicates that access token has expired. Unless it happens two times in a row.
if ( response != null && (response.code() == HTTP_UNAUTHORIZED || response.code() == HTTP_FORBIDDEN) && updateTokenAndRetryOnAuthorizationFailure ) {
try {
if (updateAccessToken(requestAccessToken)) {
response.body().close();
return retryingIntercept( chain, false );
}
} catch (Exception e) {
response.body().close();
throw e;
}
}
return response;
} else {
return chain.proceed(chain.request());
}
}
/*
* Returns true if the access token has been updated
*/
public synchronized boolean updateAccessToken(String requestAccessToken) throws IOException {
if (getAccessToken() == null || getAccessToken().equals(requestAccessToken)) {
try {
OAuthJSONAccessTokenResponse accessTokenResponse = oauthClient.accessToken(this.tokenRequestBuilder.buildBodyMessage());
if (accessTokenResponse != null && accessTokenResponse.getAccessToken() != null) {
setAccessToken(accessTokenResponse.getAccessToken());
if (accessTokenListener != null) {
accessTokenListener.notify((BasicOAuthToken) accessTokenResponse.getOAuthToken());
}
return !getAccessToken().equals(requestAccessToken);
} else {
return false;
}
} catch (OAuthSystemException e) {
throw new IOException(e);
} catch (OAuthProblemException e) {
throw new IOException(e);
}
}
return true;
}
public void registerAccessTokenListener(AccessTokenListener accessTokenListener) {
this.accessTokenListener = accessTokenListener;
}
public synchronized String getAccessToken() {
return accessToken;
}
public synchronized void setAccessToken(String accessToken) {
this.accessToken = accessToken;
}
public TokenRequestBuilder getTokenRequestBuilder() {
return tokenRequestBuilder;
}
public void setTokenRequestBuilder(TokenRequestBuilder tokenRequestBuilder) {
this.tokenRequestBuilder = tokenRequestBuilder;
}
public AuthenticationRequestBuilder getAuthenticationRequestBuilder() {
return authenticationRequestBuilder;
}
public void setAuthenticationRequestBuilder(AuthenticationRequestBuilder authenticationRequestBuilder) {
this.authenticationRequestBuilder = authenticationRequestBuilder;
}
}

View File

@ -1,18 +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.auth;
public enum OAuthFlow {
accessCode, implicit, password, application
}

View File

@ -1,69 +0,0 @@
package org.openapitools.client.auth;
import java.io.IOException;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.oltu.oauth2.client.HttpClient;
import org.apache.oltu.oauth2.client.request.OAuthClientRequest;
import org.apache.oltu.oauth2.client.response.OAuthClientResponse;
import org.apache.oltu.oauth2.client.response.OAuthClientResponseFactory;
import org.apache.oltu.oauth2.common.exception.OAuthProblemException;
import org.apache.oltu.oauth2.common.exception.OAuthSystemException;
import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.RequestBody;
import com.squareup.okhttp.Response;
public class OAuthOkHttpClient implements HttpClient {
private OkHttpClient client;
public OAuthOkHttpClient() {
this.client = new OkHttpClient();
}
public OAuthOkHttpClient(OkHttpClient client) {
this.client = client;
}
public <T extends OAuthClientResponse> T execute(OAuthClientRequest request, Map<String, String> headers,
String requestMethod, Class<T> responseClass)
throws OAuthSystemException, OAuthProblemException {
MediaType mediaType = MediaType.parse("application/json");
Request.Builder requestBuilder = new Request.Builder().url(request.getLocationUri());
if(headers != null) {
for (Entry<String, String> entry : headers.entrySet()) {
if (entry.getKey().equalsIgnoreCase("Content-Type")) {
mediaType = MediaType.parse(entry.getValue());
} else {
requestBuilder.addHeader(entry.getKey(), entry.getValue());
}
}
}
RequestBody body = request.getBody() != null ? RequestBody.create(mediaType, request.getBody()) : null;
requestBuilder.method(requestMethod, body);
try {
Response response = client.newCall(requestBuilder.build()).execute();
return OAuthClientResponseFactory.createCustomResponse(
response.body().string(),
response.body().contentType().toString(),
response.code(),
responseClass);
} catch (IOException e) {
throw new OAuthSystemException(e);
}
}
public void shutdown() {
// Nothing to do here
}
}

View File

@ -1,103 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesAnyType
*/
public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesAnyType name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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;
}
AdditionalPropertiesAnyType additionalPropertiesAnyType = (AdditionalPropertiesAnyType) o;
return Objects.equals(this.name, additionalPropertiesAnyType.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 AdditionalPropertiesAnyType {\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,104 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesArray
*/
public class AdditionalPropertiesArray extends HashMap<String, List> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesArray name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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,103 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesBoolean
*/
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesBoolean name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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

@ -1,457 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* AdditionalPropertiesClass
*/
public class AdditionalPropertiesClass {
public static final String SERIALIZED_NAME_MAP_STRING = "map_string";
@SerializedName(SERIALIZED_NAME_MAP_STRING)
private Map<String, String> mapString = null;
public static final String SERIALIZED_NAME_MAP_NUMBER = "map_number";
@SerializedName(SERIALIZED_NAME_MAP_NUMBER)
private Map<String, BigDecimal> mapNumber = null;
public static final String SERIALIZED_NAME_MAP_INTEGER = "map_integer";
@SerializedName(SERIALIZED_NAME_MAP_INTEGER)
private Map<String, Integer> mapInteger = null;
public static final String SERIALIZED_NAME_MAP_BOOLEAN = "map_boolean";
@SerializedName(SERIALIZED_NAME_MAP_BOOLEAN)
private Map<String, Boolean> mapBoolean = null;
public static final String SERIALIZED_NAME_MAP_ARRAY_INTEGER = "map_array_integer";
@SerializedName(SERIALIZED_NAME_MAP_ARRAY_INTEGER)
private Map<String, List<Integer>> mapArrayInteger = null;
public static final String SERIALIZED_NAME_MAP_ARRAY_ANYTYPE = "map_array_anytype";
@SerializedName(SERIALIZED_NAME_MAP_ARRAY_ANYTYPE)
private Map<String, List<Object>> mapArrayAnytype = null;
public static final String SERIALIZED_NAME_MAP_MAP_STRING = "map_map_string";
@SerializedName(SERIALIZED_NAME_MAP_MAP_STRING)
private Map<String, Map<String, String>> mapMapString = null;
public static final String SERIALIZED_NAME_MAP_MAP_ANYTYPE = "map_map_anytype";
@SerializedName(SERIALIZED_NAME_MAP_MAP_ANYTYPE)
private Map<String, Map<String, Object>> mapMapAnytype = null;
public static final String SERIALIZED_NAME_ANYTYPE1 = "anytype_1";
@SerializedName(SERIALIZED_NAME_ANYTYPE1)
private Object anytype1;
public static final String SERIALIZED_NAME_ANYTYPE2 = "anytype_2";
@SerializedName(SERIALIZED_NAME_ANYTYPE2)
private Object anytype2;
public static final String SERIALIZED_NAME_ANYTYPE3 = "anytype_3";
@SerializedName(SERIALIZED_NAME_ANYTYPE3)
private Object anytype3;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
this.mapString = mapString;
return this;
}
public AdditionalPropertiesClass putMapStringItem(String key, String mapStringItem) {
if (this.mapString == null) {
this.mapString = new HashMap<String, String>();
}
this.mapString.put(key, mapStringItem);
return this;
}
/**
* Get mapString
* @return mapString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, String> getMapString() {
return mapString;
}
public void setMapString(Map<String, String> mapString) {
this.mapString = mapString;
}
public AdditionalPropertiesClass mapNumber(Map<String, BigDecimal> mapNumber) {
this.mapNumber = mapNumber;
return this;
}
public AdditionalPropertiesClass putMapNumberItem(String key, BigDecimal mapNumberItem) {
if (this.mapNumber == null) {
this.mapNumber = new HashMap<String, BigDecimal>();
}
this.mapNumber.put(key, mapNumberItem);
return this;
}
/**
* Get mapNumber
* @return mapNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, BigDecimal> getMapNumber() {
return mapNumber;
}
public void setMapNumber(Map<String, BigDecimal> mapNumber) {
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 = "")
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 = "")
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 = "")
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 = "")
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 = "")
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 = "")
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 = "")
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 = "")
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 = "")
public Object getAnytype3() {
return anytype3;
}
public void setAnytype3(Object anytype3) {
this.anytype3 = anytype3;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapString, additionalPropertiesClass.mapString) &&
Objects.equals(this.mapNumber, additionalPropertiesClass.mapNumber) &&
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
public int hashCode() {
return Objects.hash(mapString, mapNumber, mapInteger, mapBoolean, mapArrayInteger, mapArrayAnytype, mapMapString, mapMapAnytype, anytype1, anytype2, anytype3);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapString: ").append(toIndentedString(mapString)).append("\n");
sb.append(" mapNumber: ").append(toIndentedString(mapNumber)).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("}");
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,103 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesInteger
*/
public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesInteger name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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,104 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesNumber
*/
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesNumber name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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

@ -1,103 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesObject
*/
public class AdditionalPropertiesObject extends HashMap<String, Map> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesObject name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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;
}
AdditionalPropertiesObject additionalPropertiesObject = (AdditionalPropertiesObject) o;
return Objects.equals(this.name, additionalPropertiesObject.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 AdditionalPropertiesObject {\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,103 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
/**
* AdditionalPropertiesString
*/
public class AdditionalPropertiesString extends HashMap<String, String> {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public AdditionalPropertiesString name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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;
}
AdditionalPropertiesString additionalPropertiesString = (AdditionalPropertiesString) o;
return Objects.equals(this.name, additionalPropertiesString.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 AdditionalPropertiesString {\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,134 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.Cat;
import org.openapitools.client.model.Dog;
/**
* Animal
*/
public class Animal {
public static final String SERIALIZED_NAME_CLASS_NAME = "className";
@SerializedName(SERIALIZED_NAME_CLASS_NAME)
protected String className;
public static final String SERIALIZED_NAME_COLOR = "color";
@SerializedName(SERIALIZED_NAME_COLOR)
private String color = "red";
public Animal() {
this.className = this.getClass().getSimpleName();
}
public Animal className(String className) {
this.className = className;
return this;
}
/**
* Get className
* @return className
**/
@ApiModelProperty(required = true, value = "")
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public Animal color(String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
}
@Override
public int hashCode() {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).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,110 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfArrayOfNumberOnly
*/
public class ArrayOfArrayOfNumberOnly {
public static final String SERIALIZED_NAME_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_NUMBER)
private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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,110 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* ArrayOfNumberOnly
*/
public class ArrayOfNumberOnly {
public static final String SERIALIZED_NAME_ARRAY_NUMBER = "ArrayNumber";
@SerializedName(SERIALIZED_NAME_ARRAY_NUMBER)
private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<BigDecimal>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
public void setArrayNumber(List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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,184 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.client.model.ReadOnlyFirst;
/**
* ArrayTest
*/
public class ArrayTest {
public static final String SERIALIZED_NAME_ARRAY_OF_STRING = "array_of_string";
@SerializedName(SERIALIZED_NAME_ARRAY_OF_STRING)
private List<String> arrayOfString = null;
public static final String SERIALIZED_NAME_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer";
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_INTEGER)
private List<List<Long>> arrayArrayOfInteger = null;
public static final String SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
@SerializedName(SERIALIZED_NAME_ARRAY_ARRAY_OF_MODEL)
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<String>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<String> getArrayOfString() {
return arrayOfString;
}
public void setArrayOfString(List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
/**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
/**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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,158 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.BigCatAllOf;
import org.openapitools.client.model.Cat;
/**
* BigCat
*/
public class BigCat extends Cat {
/**
* Gets or Sets kind
*/
@JsonAdapter(KindEnum.Adapter.class)
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
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 class Adapter extends TypeAdapter<KindEnum> {
@Override
public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public KindEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return KindEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_KIND = "kind";
@SerializedName(SERIALIZED_NAME_KIND)
private KindEnum kind;
public BigCat() {
this.className = this.getClass().getSimpleName();
}
public BigCat kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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,150 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* BigCatAllOf
*/
public class BigCatAllOf {
/**
* Gets or Sets kind
*/
@JsonAdapter(KindEnum.Adapter.class)
public enum KindEnum {
LIONS("lions"),
TIGERS("tigers"),
LEOPARDS("leopards"),
JAGUARS("jaguars");
private String value;
KindEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
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 class Adapter extends TypeAdapter<KindEnum> {
@Override
public void write(final JsonWriter jsonWriter, final KindEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public KindEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return KindEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_KIND = "kind";
@SerializedName(SERIALIZED_NAME_KIND)
private KindEnum kind;
public BigCatAllOf kind(KindEnum kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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

@ -1,244 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Capitalization
*/
public class Capitalization {
public static final String SERIALIZED_NAME_SMALL_CAMEL = "smallCamel";
@SerializedName(SERIALIZED_NAME_SMALL_CAMEL)
private String smallCamel;
public static final String SERIALIZED_NAME_CAPITAL_CAMEL = "CapitalCamel";
@SerializedName(SERIALIZED_NAME_CAPITAL_CAMEL)
private String capitalCamel;
public static final String SERIALIZED_NAME_SMALL_SNAKE = "small_Snake";
@SerializedName(SERIALIZED_NAME_SMALL_SNAKE)
private String smallSnake;
public static final String SERIALIZED_NAME_CAPITAL_SNAKE = "Capital_Snake";
@SerializedName(SERIALIZED_NAME_CAPITAL_SNAKE)
private String capitalSnake;
public static final String SERIALIZED_NAME_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points";
@SerializedName(SERIALIZED_NAME_SC_A_E_T_H_FLOW_POINTS)
private String scAETHFlowPoints;
public static final String SERIALIZED_NAME_A_T_T_N_A_M_E = "ATT_NAME";
@SerializedName(SERIALIZED_NAME_A_T_T_N_A_M_E)
private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
/**
* Get smallCamel
* @return smallCamel
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallCamel() {
return smallCamel;
}
public void setSmallCamel(String smallCamel) {
this.smallCamel = smallCamel;
}
public Capitalization capitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
/**
* Get capitalCamel
* @return capitalCamel
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalCamel() {
return capitalCamel;
}
public void setCapitalCamel(String capitalCamel) {
this.capitalCamel = capitalCamel;
}
public Capitalization smallSnake(String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
/**
* Get smallSnake
* @return smallSnake
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getSmallSnake() {
return smallSnake;
}
public void setSmallSnake(String smallSnake) {
this.smallSnake = smallSnake;
}
public Capitalization capitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
/**
* Get capitalSnake
* @return capitalSnake
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getCapitalSnake() {
return capitalSnake;
}
public void setCapitalSnake(String capitalSnake) {
this.capitalSnake = capitalSnake;
}
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
/**
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
public void setScAETHFlowPoints(String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
public Capitalization ATT_NAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
/**
* Name of the pet
* @return ATT_NAME
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Name of the pet ")
public String getATTNAME() {
return ATT_NAME;
}
public void setATTNAME(String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
}
@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Capitalization {\n");
sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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,108 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.BigCat;
import org.openapitools.client.model.CatAllOf;
/**
* Cat
*/
public class Cat extends Animal {
public static final String SERIALIZED_NAME_DECLAWED = "declawed";
@SerializedName(SERIALIZED_NAME_DECLAWED)
private Boolean declawed;
public Cat() {
this.className = this.getClass().getSimpleName();
}
public Cat declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).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,99 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* CatAllOf
*/
public class CatAllOf {
public static final String SERIALIZED_NAME_DECLAWED = "declawed";
@SerializedName(SERIALIZED_NAME_DECLAWED)
private Boolean declawed;
public CatAllOf declawed(Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getDeclawed() {
return declawed;
}
public void setDeclawed(Boolean declawed) {
this.declawed = declawed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CatAllOf catAllOf = (CatAllOf) o;
return Objects.equals(this.declawed, catAllOf.declawed);
}
@Override
public int hashCode() {
return Objects.hash(declawed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CatAllOf {\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).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,127 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Category
*/
public class Category {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name = "default-name";
public Category id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Category name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(required = true, value = "")
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;
}
Category category = (Category) o;
return Objects.equals(this.id, category.id) &&
Objects.equals(this.name, category.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).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,100 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Model for testing model with \&quot;_class\&quot; property
*/
@ApiModel(description = "Model for testing model with \"_class\" property")
public class ClassModel {
public static final String SERIALIZED_NAME_PROPERTY_CLASS = "_class";
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
private String propertyClass;
public ClassModel propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClassModel classModel = (ClassModel) o;
return Objects.equals(this.propertyClass, classModel.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClassModel {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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,99 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Client
*/
public class Client {
public static final String SERIALIZED_NAME_CLIENT = "client";
@SerializedName(SERIALIZED_NAME_CLIENT)
private String client;
public Client client(String client) {
this.client = client;
return this;
}
/**
* Get client
* @return client
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getClient() {
return client;
}
public void setClient(String client) {
this.client = client;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Client client = (Client) o;
return Objects.equals(this.client, client.client);
}
@Override
public int hashCode() {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Client {\n");
sb.append(" client: ").append(toIndentedString(client)).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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.Animal;
import org.openapitools.client.model.DogAllOf;
/**
* Dog
*/
public class Dog extends Animal {
public static final String SERIALIZED_NAME_BREED = "breed";
@SerializedName(SERIALIZED_NAME_BREED)
private String breed;
public Dog() {
this.className = this.getClass().getSimpleName();
}
public Dog breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).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,99 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* DogAllOf
*/
public class DogAllOf {
public static final String SERIALIZED_NAME_BREED = "breed";
@SerializedName(SERIALIZED_NAME_BREED)
private String breed;
public DogAllOf breed(String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBreed() {
return breed;
}
public void setBreed(String breed) {
this.breed = breed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DogAllOf dogAllOf = (DogAllOf) o;
return Objects.equals(this.breed, dogAllOf.breed);
}
@Override
public int hashCode() {
return Objects.hash(breed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DogAllOf {\n");
sb.append(" breed: ").append(toIndentedString(breed)).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,232 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* EnumArrays
*/
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
@JsonAdapter(JustSymbolEnum.Adapter.class)
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(">="),
DOLLAR("$");
private String value;
JustSymbolEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static JustSymbolEnum fromValue(String value) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<JustSymbolEnum> {
@Override
public void write(final JsonWriter jsonWriter, final JustSymbolEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public JustSymbolEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return JustSymbolEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_JUST_SYMBOL = "just_symbol";
@SerializedName(SERIALIZED_NAME_JUST_SYMBOL)
private JustSymbolEnum justSymbol;
/**
* Gets or Sets arrayEnum
*/
@JsonAdapter(ArrayEnumEnum.Adapter.class)
public enum ArrayEnumEnum {
FISH("fish"),
CRAB("crab");
private String value;
ArrayEnumEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ArrayEnumEnum fromValue(String value) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<ArrayEnumEnum> {
@Override
public void write(final JsonWriter jsonWriter, final ArrayEnumEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ArrayEnumEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ArrayEnumEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ARRAY_ENUM = "array_enum";
@SerializedName(SERIALIZED_NAME_ARRAY_ENUM)
private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
return this;
}
/**
* Get justSymbol
* @return justSymbol
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public JustSymbolEnum getJustSymbol() {
return justSymbol;
}
public void setJustSymbol(JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
return this;
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}
/**
* Get arrayEnum
* @return arrayEnum
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
}
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
}
@Override
public int hashCode() {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnumArrays {\n");
sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n");
sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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,75 +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.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Gets or Sets EnumClass
*/
@JsonAdapter(EnumClass.Adapter.class)
public enum EnumClass {
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
private String value;
EnumClass(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EnumClass fromValue(String value) {
for (EnumClass b : EnumClass.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<EnumClass> {
@Override
public void write(final JsonWriter jsonWriter, final EnumClass enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EnumClass read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EnumClass.fromValue(value);
}
}
}

View File

@ -1,407 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.openapitools.client.model.OuterEnum;
/**
* EnumTest
*/
public class EnumTest {
/**
* Gets or Sets enumString
*/
@JsonAdapter(EnumStringEnum.Adapter.class)
public enum EnumStringEnum {
UPPER("UPPER"),
LOWER("lower"),
EMPTY("");
private String value;
EnumStringEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EnumStringEnum fromValue(String value) {
for (EnumStringEnum b : EnumStringEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<EnumStringEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EnumStringEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EnumStringEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EnumStringEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ENUM_STRING = "enum_string";
@SerializedName(SERIALIZED_NAME_ENUM_STRING)
private EnumStringEnum enumString;
/**
* Gets or Sets enumStringRequired
*/
@JsonAdapter(EnumStringRequiredEnum.Adapter.class)
public enum EnumStringRequiredEnum {
UPPER("UPPER"),
LOWER("lower"),
EMPTY("");
private String value;
EnumStringRequiredEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EnumStringRequiredEnum fromValue(String value) {
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<EnumStringRequiredEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EnumStringRequiredEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EnumStringRequiredEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return EnumStringRequiredEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ENUM_STRING_REQUIRED = "enum_string_required";
@SerializedName(SERIALIZED_NAME_ENUM_STRING_REQUIRED)
private EnumStringRequiredEnum enumStringRequired;
/**
* Gets or Sets enumInteger
*/
@JsonAdapter(EnumIntegerEnum.Adapter.class)
public enum EnumIntegerEnum {
NUMBER_1(1),
NUMBER_MINUS_1(-1);
private Integer value;
EnumIntegerEnum(Integer value) {
this.value = value;
}
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EnumIntegerEnum fromValue(Integer value) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<EnumIntegerEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EnumIntegerEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EnumIntegerEnum read(final JsonReader jsonReader) throws IOException {
Integer value = jsonReader.nextInt();
return EnumIntegerEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ENUM_INTEGER = "enum_integer";
@SerializedName(SERIALIZED_NAME_ENUM_INTEGER)
private EnumIntegerEnum enumInteger;
/**
* Gets or Sets enumNumber
*/
@JsonAdapter(EnumNumberEnum.Adapter.class)
public enum EnumNumberEnum {
NUMBER_1_DOT_1(1.1),
NUMBER_MINUS_1_DOT_2(-1.2);
private Double value;
EnumNumberEnum(Double value) {
this.value = value;
}
public Double getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static EnumNumberEnum fromValue(Double value) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<EnumNumberEnum> {
@Override
public void write(final JsonWriter jsonWriter, final EnumNumberEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public EnumNumberEnum read(final JsonReader jsonReader) throws IOException {
Double value = jsonReader.nextDouble();
return EnumNumberEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_ENUM_NUMBER = "enum_number";
@SerializedName(SERIALIZED_NAME_ENUM_NUMBER)
private EnumNumberEnum enumNumber;
public static final String SERIALIZED_NAME_OUTER_ENUM = "outerEnum";
@SerializedName(SERIALIZED_NAME_OUTER_ENUM)
private OuterEnum outerEnum;
public EnumTest enumString(EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/**
* Get enumString
* @return enumString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumStringEnum getEnumString() {
return enumString;
}
public void setEnumString(EnumStringEnum enumString) {
this.enumString = enumString;
}
public EnumTest enumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
return this;
}
/**
* Get enumStringRequired
* @return enumStringRequired
**/
@ApiModelProperty(required = true, value = "")
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}
public void setEnumStringRequired(EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/**
* Get enumInteger
* @return enumInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
}
public void setEnumInteger(EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/**
* Get enumNumber
* @return enumNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public EnumNumberEnum getEnumNumber() {
return enumNumber;
}
public void setEnumNumber(EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
public EnumTest outerEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
return this;
}
/**
* Get outerEnum
* @return outerEnum
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public OuterEnum getOuterEnum() {
return outerEnum;
}
public void setOuterEnum(OuterEnum outerEnum) {
this.outerEnum = outerEnum;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
Objects.equals(this.outerEnum, enumTest.outerEnum);
}
@Override
public int hashCode() {
return Objects.hash(enumString, enumStringRequired, enumInteger, enumNumber, outerEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).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,138 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* FileSchemaTestClass
*/
public class FileSchemaTestClass {
public static final String SERIALIZED_NAME_FILE = "file";
@SerializedName(SERIALIZED_NAME_FILE)
private java.io.File file;
public static final String SERIALIZED_NAME_FILES = "files";
@SerializedName(SERIALIZED_NAME_FILES)
private List<java.io.File> files = null;
public FileSchemaTestClass file(java.io.File file) {
this.file = file;
return this;
}
/**
* Get file
* @return file
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public java.io.File getFile() {
return file;
}
public void setFile(java.io.File file) {
this.file = file;
}
public FileSchemaTestClass files(List<java.io.File> files) {
this.files = files;
return this;
}
public FileSchemaTestClass addFilesItem(java.io.File filesItem) {
if (this.files == null) {
this.files = new ArrayList<java.io.File>();
}
this.files.add(filesItem);
return this;
}
/**
* Get files
* @return files
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<java.io.File> getFiles() {
return files;
}
public void setFiles(List<java.io.File> files) {
this.files = files;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o;
return Objects.equals(this.file, fileSchemaTestClass.file) &&
Objects.equals(this.files, fileSchemaTestClass.files);
}
@Override
public int hashCode() {
return Objects.hash(file, files);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileSchemaTestClass {\n");
sb.append(" file: ").append(toIndentedString(file)).append("\n");
sb.append(" files: ").append(toIndentedString(files)).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,487 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.UUID;
import org.joda.time.DateTime;
import org.joda.time.LocalDate;
/**
* FormatTest
*/
public class FormatTest {
public static final String SERIALIZED_NAME_INTEGER = "integer";
@SerializedName(SERIALIZED_NAME_INTEGER)
private Integer integer;
public static final String SERIALIZED_NAME_INT32 = "int32";
@SerializedName(SERIALIZED_NAME_INT32)
private Integer int32;
public static final String SERIALIZED_NAME_INT64 = "int64";
@SerializedName(SERIALIZED_NAME_INT64)
private Long int64;
public static final String SERIALIZED_NAME_NUMBER = "number";
@SerializedName(SERIALIZED_NAME_NUMBER)
private BigDecimal number;
public static final String SERIALIZED_NAME_FLOAT = "float";
@SerializedName(SERIALIZED_NAME_FLOAT)
private Float _float;
public static final String SERIALIZED_NAME_DOUBLE = "double";
@SerializedName(SERIALIZED_NAME_DOUBLE)
private Double _double;
public static final String SERIALIZED_NAME_STRING = "string";
@SerializedName(SERIALIZED_NAME_STRING)
private String string;
public static final String SERIALIZED_NAME_BYTE = "byte";
@SerializedName(SERIALIZED_NAME_BYTE)
private byte[] _byte;
public static final String SERIALIZED_NAME_BINARY = "binary";
@SerializedName(SERIALIZED_NAME_BINARY)
private File binary;
public static final String SERIALIZED_NAME_DATE = "date";
@SerializedName(SERIALIZED_NAME_DATE)
private LocalDate date;
public static final String SERIALIZED_NAME_DATE_TIME = "dateTime";
@SerializedName(SERIALIZED_NAME_DATE_TIME)
private DateTime dateTime;
public static final String SERIALIZED_NAME_UUID = "uuid";
@SerializedName(SERIALIZED_NAME_UUID)
private UUID uuid;
public static final String SERIALIZED_NAME_PASSWORD = "password";
@SerializedName(SERIALIZED_NAME_PASSWORD)
private String password;
public static final String SERIALIZED_NAME_BIG_DECIMAL = "BigDecimal";
@SerializedName(SERIALIZED_NAME_BIG_DECIMAL)
private BigDecimal bigDecimal;
public FormatTest integer(Integer integer) {
this.integer = integer;
return this;
}
/**
* Get integer
* minimum: 10
* maximum: 100
* @return integer
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInteger() {
return integer;
}
public void setInteger(Integer integer) {
this.integer = integer;
}
public FormatTest int32(Integer int32) {
this.int32 = int32;
return this;
}
/**
* Get int32
* minimum: 20
* maximum: 200
* @return int32
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getInt32() {
return int32;
}
public void setInt32(Integer int32) {
this.int32 = int32;
}
public FormatTest int64(Long int64) {
this.int64 = int64;
return this;
}
/**
* Get int64
* @return int64
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getInt64() {
return int64;
}
public void setInt64(Long int64) {
this.int64 = int64;
}
public FormatTest number(BigDecimal number) {
this.number = number;
return this;
}
/**
* Get number
* minimum: 32.1
* maximum: 543.2
* @return number
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumber() {
return number;
}
public void setNumber(BigDecimal number) {
this.number = number;
}
public FormatTest _float(Float _float) {
this._float = _float;
return this;
}
/**
* Get _float
* minimum: 54.3
* maximum: 987.6
* @return _float
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Float getFloat() {
return _float;
}
public void setFloat(Float _float) {
this._float = _float;
}
public FormatTest _double(Double _double) {
this._double = _double;
return this;
}
/**
* Get _double
* minimum: 67.8
* maximum: 123.4
* @return _double
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Double getDouble() {
return _double;
}
public void setDouble(Double _double) {
this._double = _double;
}
public FormatTest string(String string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getString() {
return string;
}
public void setString(String string) {
this.string = string;
}
public FormatTest _byte(byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* Get _byte
* @return _byte
**/
@ApiModelProperty(required = true, value = "")
public byte[] getByte() {
return _byte;
}
public void setByte(byte[] _byte) {
this._byte = _byte;
}
public FormatTest binary(File binary) {
this.binary = binary;
return this;
}
/**
* Get binary
* @return binary
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public File getBinary() {
return binary;
}
public void setBinary(File binary) {
this.binary = binary;
}
public FormatTest date(LocalDate date) {
this.date = date;
return this;
}
/**
* Get date
* @return date
**/
@ApiModelProperty(required = true, value = "")
public LocalDate getDate() {
return date;
}
public void setDate(LocalDate date) {
this.date = date;
}
public FormatTest dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
public FormatTest uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "72f98069-206d-4f12-9f12-3d1e525a8e84", value = "")
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public FormatTest password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@ApiModelProperty(required = true, value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public FormatTest bigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
return this;
}
/**
* Get bigDecimal
* @return bigDecimal
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getBigDecimal() {
return bigDecimal;
}
public void setBigDecimal(BigDecimal bigDecimal) {
this.bigDecimal = bigDecimal;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.bigDecimal, formatTest.bigDecimal);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, bigDecimal);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\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(" _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(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).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,110 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* HasOnlyReadOnly
*/
public class HasOnlyReadOnly {
public static final String SERIALIZED_NAME_BAR = "bar";
@SerializedName(SERIALIZED_NAME_BAR)
private String bar;
public static final String SERIALIZED_NAME_FOO = "foo";
@SerializedName(SERIALIZED_NAME_FOO)
private String foo;
/**
* Get bar
* @return bar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
}
/**
* Get foo
* @return foo
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFoo() {
return foo;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
public int hashCode() {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HasOnlyReadOnly {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" foo: ").append(toIndentedString(foo)).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,268 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* MapTest
*/
public class MapTest {
public static final String SERIALIZED_NAME_MAP_MAP_OF_STRING = "map_map_of_string";
@SerializedName(SERIALIZED_NAME_MAP_MAP_OF_STRING)
private Map<String, Map<String, String>> mapMapOfString = null;
/**
* Gets or Sets inner
*/
@JsonAdapter(InnerEnum.Adapter.class)
public enum InnerEnum {
UPPER("UPPER"),
LOWER("lower");
private String value;
InnerEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static InnerEnum fromValue(String value) {
for (InnerEnum b : InnerEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<InnerEnum> {
@Override
public void write(final JsonWriter jsonWriter, final InnerEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public InnerEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return InnerEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_MAP_OF_ENUM_STRING = "map_of_enum_string";
@SerializedName(SERIALIZED_NAME_MAP_OF_ENUM_STRING)
private Map<String, InnerEnum> mapOfEnumString = null;
public static final String SERIALIZED_NAME_DIRECT_MAP = "direct_map";
@SerializedName(SERIALIZED_NAME_DIRECT_MAP)
private Map<String, Boolean> directMap = null;
public static final String SERIALIZED_NAME_INDIRECT_MAP = "indirect_map";
@SerializedName(SERIALIZED_NAME_INDIRECT_MAP)
private Map<String, Boolean> indirectMap = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<String, Map<String, String>>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<String, InnerEnum>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
public MapTest directMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
return this;
}
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
if (this.directMap == null) {
this.directMap = new HashMap<String, Boolean>();
}
this.directMap.put(key, directMapItem);
return this;
}
/**
* Get directMap
* @return directMap
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Boolean> getDirectMap() {
return directMap;
}
public void setDirectMap(Map<String, Boolean> directMap) {
this.directMap = directMap;
}
public MapTest indirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
return this;
}
public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) {
if (this.indirectMap == null) {
this.indirectMap = new HashMap<String, Boolean>();
}
this.indirectMap.put(key, indirectMapItem);
return this;
}
/**
* Get indirectMap
* @return indirectMap
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Boolean> getIndirectMap() {
return indirectMap;
}
public void setIndirectMap(Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
Objects.equals(this.directMap, mapTest.directMap) &&
Objects.equals(this.indirectMap, mapTest.indirectMap);
}
@Override
public int hashCode() {
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MapTest {\n");
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n");
sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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,171 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import org.joda.time.DateTime;
import org.openapitools.client.model.Animal;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String SERIALIZED_NAME_UUID = "uuid";
@SerializedName(SERIALIZED_NAME_UUID)
private UUID uuid;
public static final String SERIALIZED_NAME_DATE_TIME = "dateTime";
@SerializedName(SERIALIZED_NAME_DATE_TIME)
private DateTime dateTime;
public static final String SERIALIZED_NAME_MAP = "map";
@SerializedName(SERIALIZED_NAME_MAP)
private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public UUID getUuid() {
return uuid;
}
public void setUuid(UUID uuid) {
this.uuid = uuid;
}
public MixedPropertiesAndAdditionalPropertiesClass dateTime(DateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public DateTime getDateTime() {
return dateTime;
}
public void setDateTime(DateTime dateTime) {
this.dateTime = dateTime;
}
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
this.map = map;
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<String, Animal>();
}
this.map.put(key, mapItem);
return this;
}
/**
* Get map
* @return map
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Map<String, Animal> getMap() {
return map;
}
public void setMap(Map<String, Animal> map) {
this.map = map;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
public int hashCode() {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" map: ").append(toIndentedString(map)).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,129 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private Integer name;
public static final String SERIALIZED_NAME_PROPERTY_CLASS = "class";
@SerializedName(SERIALIZED_NAME_PROPERTY_CLASS)
private String propertyClass;
public Model200Response name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
public Model200Response propertyClass(String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPropertyClass() {
return propertyClass;
}
public void setPropertyClass(String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Model200Response _200response = (Model200Response) o;
return Objects.equals(this.name, _200response.name) &&
Objects.equals(this.propertyClass, _200response.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(name, propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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,157 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* ModelApiResponse
*/
public class ModelApiResponse {
public static final String SERIALIZED_NAME_CODE = "code";
@SerializedName(SERIALIZED_NAME_CODE)
private Integer code;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
public static final String SERIALIZED_NAME_MESSAGE = "message";
@SerializedName(SERIALIZED_NAME_MESSAGE)
private String message;
public ModelApiResponse code(Integer code) {
this.code = code;
return this;
}
/**
* Get code
* @return code
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public ModelApiResponse type(String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public ModelApiResponse message(String message) {
this.message = message;
return this;
}
/**
* Get message
* @return message
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, _apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).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,100 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
public static final String SERIALIZED_NAME_RETURN = "return";
@SerializedName(SERIALIZED_NAME_RETURN)
private Integer _return;
public ModelReturn _return(Integer _return) {
this._return = _return;
return this;
}
/**
* Get _return
* @return _return
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getReturn() {
return _return;
}
public void setReturn(Integer _return) {
this._return = _return;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelReturn _return = (ModelReturn) o;
return Objects.equals(this._return, _return._return);
}
@Override
public int hashCode() {
return Objects.hash(_return);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelReturn {\n");
sb.append(" _return: ").append(toIndentedString(_return)).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,168 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private Integer name;
public static final String SERIALIZED_NAME_SNAKE_CASE = "snake_case";
@SerializedName(SERIALIZED_NAME_SNAKE_CASE)
private Integer snakeCase;
public static final String SERIALIZED_NAME_PROPERTY = "property";
@SerializedName(SERIALIZED_NAME_PROPERTY)
private String property;
public static final String SERIALIZED_NAME_123NUMBER = "123Number";
@SerializedName(SERIALIZED_NAME_123NUMBER)
private Integer _123number;
public Name name(Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
public void setName(Integer name) {
this.name = name;
}
/**
* Get snakeCase
* @return snakeCase
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public Name property(String property) {
this.property = property;
return this;
}
/**
* Get property
* @return property
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
/**
* Get _123number
* @return _123number
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer get123number() {
return _123number;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
Objects.equals(this._123number, name._123number);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase, property, _123number);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Name {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append(" _123number: ").append(toIndentedString(_123number)).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,100 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
/**
* NumberOnly
*/
public class NumberOnly {
public static final String SERIALIZED_NAME_JUST_NUMBER = "JustNumber";
@SerializedName(SERIALIZED_NAME_JUST_NUMBER)
private BigDecimal justNumber;
public NumberOnly justNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getJustNumber() {
return justNumber;
}
public void setJustNumber(BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
}
@Override
public int hashCode() {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberOnly {\n");
sb.append(" justNumber: ").append(toIndentedString(justNumber)).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,294 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import org.joda.time.DateTime;
/**
* Order
*/
public class Order {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public static final String SERIALIZED_NAME_PET_ID = "petId";
@SerializedName(SERIALIZED_NAME_PET_ID)
private Long petId;
public static final String SERIALIZED_NAME_QUANTITY = "quantity";
@SerializedName(SERIALIZED_NAME_QUANTITY)
private Integer quantity;
public static final String SERIALIZED_NAME_SHIP_DATE = "shipDate";
@SerializedName(SERIALIZED_NAME_SHIP_DATE)
private DateTime shipDate;
/**
* Order Status
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<StatusEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public static final String SERIALIZED_NAME_COMPLETE = "complete";
@SerializedName(SERIALIZED_NAME_COMPLETE)
private Boolean complete = false;
public Order id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Order petId(Long petId) {
this.petId = petId;
return this;
}
/**
* Get petId
* @return petId
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getPetId() {
return petId;
}
public void setPetId(Long petId) {
this.petId = petId;
}
public Order quantity(Integer quantity) {
this.quantity = quantity;
return this;
}
/**
* Get quantity
* @return quantity
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Integer getQuantity() {
return quantity;
}
public void setQuantity(Integer quantity) {
this.quantity = quantity;
}
public Order shipDate(DateTime shipDate) {
this.shipDate = shipDate;
return this;
}
/**
* Get shipDate
* @return shipDate
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public DateTime getShipDate() {
return shipDate;
}
public void setShipDate(DateTime shipDate) {
this.shipDate = shipDate;
}
public Order status(StatusEnum status) {
this.status = status;
return this;
}
/**
* Order Status
* @return status
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "Order Status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
public Order complete(Boolean complete) {
this.complete = complete;
return this;
}
/**
* Get complete
* @return complete
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getComplete() {
return complete;
}
public void setComplete(Boolean complete) {
this.complete = complete;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Order order = (Order) o;
return Objects.equals(this.id, order.id) &&
Objects.equals(this.petId, order.petId) &&
Objects.equals(this.quantity, order.quantity) &&
Objects.equals(this.shipDate, order.shipDate) &&
Objects.equals(this.status, order.status) &&
Objects.equals(this.complete, order.complete);
}
@Override
public int hashCode() {
return Objects.hash(id, petId, quantity, shipDate, status, complete);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" complete: ").append(toIndentedString(complete)).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,158 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
/**
* OuterComposite
*/
public class OuterComposite {
public static final String SERIALIZED_NAME_MY_NUMBER = "my_number";
@SerializedName(SERIALIZED_NAME_MY_NUMBER)
private BigDecimal myNumber;
public static final String SERIALIZED_NAME_MY_STRING = "my_string";
@SerializedName(SERIALIZED_NAME_MY_STRING)
private String myString;
public static final String SERIALIZED_NAME_MY_BOOLEAN = "my_boolean";
@SerializedName(SERIALIZED_NAME_MY_BOOLEAN)
private Boolean myBoolean;
public OuterComposite myNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
return this;
}
/**
* Get myNumber
* @return myNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getMyNumber() {
return myNumber;
}
public void setMyNumber(BigDecimal myNumber) {
this.myNumber = myNumber;
}
public OuterComposite myString(String myString) {
this.myString = myString;
return this;
}
/**
* Get myString
* @return myString
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getMyString() {
return myString;
}
public void setMyString(String myString) {
this.myString = myString;
}
public OuterComposite myBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
return this;
}
/**
* Get myBoolean
* @return myBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Boolean getMyBoolean() {
return myBoolean;
}
public void setMyBoolean(Boolean myBoolean) {
this.myBoolean = myBoolean;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterComposite outerComposite = (OuterComposite) o;
return Objects.equals(this.myNumber, outerComposite.myNumber) &&
Objects.equals(this.myString, outerComposite.myString) &&
Objects.equals(this.myBoolean, outerComposite.myBoolean);
}
@Override
public int hashCode() {
return Objects.hash(myNumber, myString, myBoolean);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterComposite {\n");
sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n");
sb.append(" myString: ").append(toIndentedString(myString)).append("\n");
sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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,75 +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.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* Gets or Sets OuterEnum
*/
@JsonAdapter(OuterEnum.Adapter.class)
public enum OuterEnum {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static OuterEnum fromValue(String value) {
for (OuterEnum b : OuterEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<OuterEnum> {
@Override
public void write(final JsonWriter jsonWriter, final OuterEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public OuterEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return OuterEnum.fromValue(value);
}
}
}

View File

@ -1,310 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
/**
* Pet
*/
public class Pet {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public static final String SERIALIZED_NAME_CATEGORY = "category";
@SerializedName(SERIALIZED_NAME_CATEGORY)
private Category category;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public static final String SERIALIZED_NAME_PHOTO_URLS = "photoUrls";
@SerializedName(SERIALIZED_NAME_PHOTO_URLS)
private Set<String> photoUrls = new LinkedHashSet<String>();
public static final String SERIALIZED_NAME_TAGS = "tags";
@SerializedName(SERIALIZED_NAME_TAGS)
private List<Tag> tags = null;
/**
* pet status in the store
*/
@JsonAdapter(StatusEnum.Adapter.class)
public enum StatusEnum {
AVAILABLE("available"),
PENDING("pending"),
SOLD("sold");
private String value;
StatusEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<StatusEnum> {
@Override
public void write(final JsonWriter jsonWriter, final StatusEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public StatusEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return StatusEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
private StatusEnum status;
public Pet id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Pet category(Category category) {
this.category = category;
return this;
}
/**
* Get category
* @return category
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Category getCategory() {
return category;
}
public void setCategory(Category category) {
this.category = category;
}
public Pet name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(example = "doggie", required = true, value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Pet photoUrls(Set<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
public Pet addPhotoUrlsItem(String photoUrlsItem) {
this.photoUrls.add(photoUrlsItem);
return this;
}
/**
* Get photoUrls
* @return photoUrls
**/
@ApiModelProperty(required = true, value = "")
public Set<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(Set<String> photoUrls) {
this.photoUrls = photoUrls;
}
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<Tag>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Tag> getTags() {
return tags;
}
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
/**
* pet status in the store
* @return status
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Pet pet = (Pet) o;
return Objects.equals(this.id, pet.id) &&
Objects.equals(this.category, pet.category) &&
Objects.equals(this.name, pet.name) &&
Objects.equals(this.photoUrls, pet.photoUrls) &&
Objects.equals(this.tags, pet.tags) &&
Objects.equals(this.status, pet.status);
}
@Override
public int hashCode() {
return Objects.hash(id, category, name, photoUrls, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).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,119 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* ReadOnlyFirst
*/
public class ReadOnlyFirst {
public static final String SERIALIZED_NAME_BAR = "bar";
@SerializedName(SERIALIZED_NAME_BAR)
private String bar;
public static final String SERIALIZED_NAME_BAZ = "baz";
@SerializedName(SERIALIZED_NAME_BAZ)
private String baz;
/**
* Get bar
* @return bar
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBar() {
return bar;
}
public ReadOnlyFirst baz(String baz) {
this.baz = baz;
return this;
}
/**
* Get baz
* @return baz
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getBaz() {
return baz;
}
public void setBaz(String baz) {
this.baz = baz;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
}
@Override
public int hashCode() {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReadOnlyFirst {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" baz: ").append(toIndentedString(baz)).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,99 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* SpecialModelName
*/
public class SpecialModelName {
public static final String SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
@SerializedName(SERIALIZED_NAME_$_SPECIAL_PROPERTY_NAME)
private Long $specialPropertyName;
public SpecialModelName $specialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
return this;
}
/**
* Get $specialPropertyName
* @return $specialPropertyName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long get$SpecialPropertyName() {
return $specialPropertyName;
}
public void set$SpecialPropertyName(Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName $specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, $specialModelName.$specialPropertyName);
}
@Override
public int hashCode() {
return Objects.hash($specialPropertyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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,128 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* Tag
*/
public class Tag {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
private String name;
public Tag id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Tag name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
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;
}
Tag tag = (Tag) o;
return Objects.equals(this.id, tag.id) &&
Objects.equals(this.name, tag.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).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,218 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* TypeHolderDefault
*/
public class TypeHolderDefault {
public static final String SERIALIZED_NAME_STRING_ITEM = "string_item";
@SerializedName(SERIALIZED_NAME_STRING_ITEM)
private String stringItem = "what";
public static final String SERIALIZED_NAME_NUMBER_ITEM = "number_item";
@SerializedName(SERIALIZED_NAME_NUMBER_ITEM)
private BigDecimal numberItem;
public static final String SERIALIZED_NAME_INTEGER_ITEM = "integer_item";
@SerializedName(SERIALIZED_NAME_INTEGER_ITEM)
private Integer integerItem;
public static final String SERIALIZED_NAME_BOOL_ITEM = "bool_item";
@SerializedName(SERIALIZED_NAME_BOOL_ITEM)
private Boolean boolItem = true;
public static final String SERIALIZED_NAME_ARRAY_ITEM = "array_item";
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderDefault stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
/**
* Get stringItem
* @return stringItem
**/
@ApiModelProperty(required = true, value = "")
public String getStringItem() {
return stringItem;
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
public TypeHolderDefault numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
/**
* Get numberItem
* @return numberItem
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumberItem() {
return numberItem;
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
public TypeHolderDefault integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
/**
* Get integerItem
* @return integerItem
**/
@ApiModelProperty(required = true, value = "")
public Integer getIntegerItem() {
return integerItem;
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
public TypeHolderDefault boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
/**
* Get boolItem
* @return boolItem
**/
@ApiModelProperty(required = true, value = "")
public Boolean getBoolItem() {
return boolItem;
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
public TypeHolderDefault arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
public TypeHolderDefault addArrayItemItem(Integer arrayItemItem) {
this.arrayItem.add(arrayItemItem);
return this;
}
/**
* Get arrayItem
* @return arrayItem
**/
@ApiModelProperty(required = true, value = "")
public List<Integer> getArrayItem() {
return arrayItem;
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TypeHolderDefault typeHolderDefault = (TypeHolderDefault) o;
return Objects.equals(this.stringItem, typeHolderDefault.stringItem) &&
Objects.equals(this.numberItem, typeHolderDefault.numberItem) &&
Objects.equals(this.integerItem, typeHolderDefault.integerItem) &&
Objects.equals(this.boolItem, typeHolderDefault.boolItem) &&
Objects.equals(this.arrayItem, typeHolderDefault.arrayItem);
}
@Override
public int hashCode() {
return Objects.hash(stringItem, numberItem, integerItem, boolItem, arrayItem);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypeHolderDefault {\n");
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).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,246 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* TypeHolderExample
*/
public class TypeHolderExample {
public static final String SERIALIZED_NAME_STRING_ITEM = "string_item";
@SerializedName(SERIALIZED_NAME_STRING_ITEM)
private String stringItem;
public static final String SERIALIZED_NAME_NUMBER_ITEM = "number_item";
@SerializedName(SERIALIZED_NAME_NUMBER_ITEM)
private BigDecimal numberItem;
public static final String SERIALIZED_NAME_FLOAT_ITEM = "float_item";
@SerializedName(SERIALIZED_NAME_FLOAT_ITEM)
private Float floatItem;
public static final String SERIALIZED_NAME_INTEGER_ITEM = "integer_item";
@SerializedName(SERIALIZED_NAME_INTEGER_ITEM)
private Integer integerItem;
public static final String SERIALIZED_NAME_BOOL_ITEM = "bool_item";
@SerializedName(SERIALIZED_NAME_BOOL_ITEM)
private Boolean boolItem;
public static final String SERIALIZED_NAME_ARRAY_ITEM = "array_item";
@SerializedName(SERIALIZED_NAME_ARRAY_ITEM)
private List<Integer> arrayItem = new ArrayList<Integer>();
public TypeHolderExample stringItem(String stringItem) {
this.stringItem = stringItem;
return this;
}
/**
* Get stringItem
* @return stringItem
**/
@ApiModelProperty(example = "what", required = true, value = "")
public String getStringItem() {
return stringItem;
}
public void setStringItem(String stringItem) {
this.stringItem = stringItem;
}
public TypeHolderExample numberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
return this;
}
/**
* Get numberItem
* @return numberItem
**/
@ApiModelProperty(example = "1.234", required = true, value = "")
public BigDecimal getNumberItem() {
return numberItem;
}
public void setNumberItem(BigDecimal numberItem) {
this.numberItem = numberItem;
}
public TypeHolderExample floatItem(Float floatItem) {
this.floatItem = floatItem;
return this;
}
/**
* Get floatItem
* @return floatItem
**/
@ApiModelProperty(example = "1.234", required = true, value = "")
public Float getFloatItem() {
return floatItem;
}
public void setFloatItem(Float floatItem) {
this.floatItem = floatItem;
}
public TypeHolderExample integerItem(Integer integerItem) {
this.integerItem = integerItem;
return this;
}
/**
* Get integerItem
* @return integerItem
**/
@ApiModelProperty(example = "-2", required = true, value = "")
public Integer getIntegerItem() {
return integerItem;
}
public void setIntegerItem(Integer integerItem) {
this.integerItem = integerItem;
}
public TypeHolderExample boolItem(Boolean boolItem) {
this.boolItem = boolItem;
return this;
}
/**
* Get boolItem
* @return boolItem
**/
@ApiModelProperty(example = "true", required = true, value = "")
public Boolean getBoolItem() {
return boolItem;
}
public void setBoolItem(Boolean boolItem) {
this.boolItem = boolItem;
}
public TypeHolderExample arrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
return this;
}
public TypeHolderExample addArrayItemItem(Integer arrayItemItem) {
this.arrayItem.add(arrayItemItem);
return this;
}
/**
* Get arrayItem
* @return arrayItem
**/
@ApiModelProperty(example = "[0, 1, 2, 3]", required = true, value = "")
public List<Integer> getArrayItem() {
return arrayItem;
}
public void setArrayItem(List<Integer> arrayItem) {
this.arrayItem = arrayItem;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TypeHolderExample typeHolderExample = (TypeHolderExample) o;
return Objects.equals(this.stringItem, typeHolderExample.stringItem) &&
Objects.equals(this.numberItem, typeHolderExample.numberItem) &&
Objects.equals(this.floatItem, typeHolderExample.floatItem) &&
Objects.equals(this.integerItem, typeHolderExample.integerItem) &&
Objects.equals(this.boolItem, typeHolderExample.boolItem) &&
Objects.equals(this.arrayItem, typeHolderExample.arrayItem);
}
@Override
public int hashCode() {
return Objects.hash(stringItem, numberItem, floatItem, integerItem, boolItem, arrayItem);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TypeHolderExample {\n");
sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n");
sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n");
sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n");
sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n");
sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n");
sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).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,302 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* User
*/
public class User {
public static final String SERIALIZED_NAME_ID = "id";
@SerializedName(SERIALIZED_NAME_ID)
private Long id;
public static final String SERIALIZED_NAME_USERNAME = "username";
@SerializedName(SERIALIZED_NAME_USERNAME)
private String username;
public static final String SERIALIZED_NAME_FIRST_NAME = "firstName";
@SerializedName(SERIALIZED_NAME_FIRST_NAME)
private String firstName;
public static final String SERIALIZED_NAME_LAST_NAME = "lastName";
@SerializedName(SERIALIZED_NAME_LAST_NAME)
private String lastName;
public static final String SERIALIZED_NAME_EMAIL = "email";
@SerializedName(SERIALIZED_NAME_EMAIL)
private String email;
public static final String SERIALIZED_NAME_PASSWORD = "password";
@SerializedName(SERIALIZED_NAME_PASSWORD)
private String password;
public static final String SERIALIZED_NAME_PHONE = "phone";
@SerializedName(SERIALIZED_NAME_PHONE)
private String phone;
public static final String SERIALIZED_NAME_USER_STATUS = "userStatus";
@SerializedName(SERIALIZED_NAME_USER_STATUS)
private Integer userStatus;
public User id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public User username(String username) {
this.username = username;
return this;
}
/**
* Get username
* @return username
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public User firstName(String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public User lastName(String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public User email(String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public User password(String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public User phone(String phone) {
this.phone = phone;
return this;
}
/**
* Get phone
* @return phone
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public User userStatus(Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/**
* User Status
* @return userStatus
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "User Status")
public Integer getUserStatus() {
return userStatus;
}
public void setUserStatus(Integer userStatus) {
this.userStatus = userStatus;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(this.id, user.id) &&
Objects.equals(this.username, user.username) &&
Objects.equals(this.firstName, user.firstName) &&
Objects.equals(this.lastName, user.lastName) &&
Objects.equals(this.email, user.email) &&
Objects.equals(this.password, user.password) &&
Objects.equals(this.phone, user.phone) &&
Objects.equals(this.userStatus, user.userStatus);
}
@Override
public int hashCode() {
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
sb.append(" userStatus: ").append(toIndentedString(userStatus)).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,986 +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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
/**
* XmlItem
*/
public class XmlItem {
public static final String SERIALIZED_NAME_ATTRIBUTE_STRING = "attribute_string";
@SerializedName(SERIALIZED_NAME_ATTRIBUTE_STRING)
private String attributeString;
public static final String SERIALIZED_NAME_ATTRIBUTE_NUMBER = "attribute_number";
@SerializedName(SERIALIZED_NAME_ATTRIBUTE_NUMBER)
private BigDecimal attributeNumber;
public static final String SERIALIZED_NAME_ATTRIBUTE_INTEGER = "attribute_integer";
@SerializedName(SERIALIZED_NAME_ATTRIBUTE_INTEGER)
private Integer attributeInteger;
public static final String SERIALIZED_NAME_ATTRIBUTE_BOOLEAN = "attribute_boolean";
@SerializedName(SERIALIZED_NAME_ATTRIBUTE_BOOLEAN)
private Boolean attributeBoolean;
public static final String SERIALIZED_NAME_WRAPPED_ARRAY = "wrapped_array";
@SerializedName(SERIALIZED_NAME_WRAPPED_ARRAY)
private List<Integer> wrappedArray = null;
public static final String SERIALIZED_NAME_NAME_STRING = "name_string";
@SerializedName(SERIALIZED_NAME_NAME_STRING)
private String nameString;
public static final String SERIALIZED_NAME_NAME_NUMBER = "name_number";
@SerializedName(SERIALIZED_NAME_NAME_NUMBER)
private BigDecimal nameNumber;
public static final String SERIALIZED_NAME_NAME_INTEGER = "name_integer";
@SerializedName(SERIALIZED_NAME_NAME_INTEGER)
private Integer nameInteger;
public static final String SERIALIZED_NAME_NAME_BOOLEAN = "name_boolean";
@SerializedName(SERIALIZED_NAME_NAME_BOOLEAN)
private Boolean nameBoolean;
public static final String SERIALIZED_NAME_NAME_ARRAY = "name_array";
@SerializedName(SERIALIZED_NAME_NAME_ARRAY)
private List<Integer> nameArray = null;
public static final String SERIALIZED_NAME_NAME_WRAPPED_ARRAY = "name_wrapped_array";
@SerializedName(SERIALIZED_NAME_NAME_WRAPPED_ARRAY)
private List<Integer> nameWrappedArray = null;
public static final String SERIALIZED_NAME_PREFIX_STRING = "prefix_string";
@SerializedName(SERIALIZED_NAME_PREFIX_STRING)
private String prefixString;
public static final String SERIALIZED_NAME_PREFIX_NUMBER = "prefix_number";
@SerializedName(SERIALIZED_NAME_PREFIX_NUMBER)
private BigDecimal prefixNumber;
public static final String SERIALIZED_NAME_PREFIX_INTEGER = "prefix_integer";
@SerializedName(SERIALIZED_NAME_PREFIX_INTEGER)
private Integer prefixInteger;
public static final String SERIALIZED_NAME_PREFIX_BOOLEAN = "prefix_boolean";
@SerializedName(SERIALIZED_NAME_PREFIX_BOOLEAN)
private Boolean prefixBoolean;
public static final String SERIALIZED_NAME_PREFIX_ARRAY = "prefix_array";
@SerializedName(SERIALIZED_NAME_PREFIX_ARRAY)
private List<Integer> prefixArray = null;
public static final String SERIALIZED_NAME_PREFIX_WRAPPED_ARRAY = "prefix_wrapped_array";
@SerializedName(SERIALIZED_NAME_PREFIX_WRAPPED_ARRAY)
private List<Integer> prefixWrappedArray = null;
public static final String SERIALIZED_NAME_NAMESPACE_STRING = "namespace_string";
@SerializedName(SERIALIZED_NAME_NAMESPACE_STRING)
private String namespaceString;
public static final String SERIALIZED_NAME_NAMESPACE_NUMBER = "namespace_number";
@SerializedName(SERIALIZED_NAME_NAMESPACE_NUMBER)
private BigDecimal namespaceNumber;
public static final String SERIALIZED_NAME_NAMESPACE_INTEGER = "namespace_integer";
@SerializedName(SERIALIZED_NAME_NAMESPACE_INTEGER)
private Integer namespaceInteger;
public static final String SERIALIZED_NAME_NAMESPACE_BOOLEAN = "namespace_boolean";
@SerializedName(SERIALIZED_NAME_NAMESPACE_BOOLEAN)
private Boolean namespaceBoolean;
public static final String SERIALIZED_NAME_NAMESPACE_ARRAY = "namespace_array";
@SerializedName(SERIALIZED_NAME_NAMESPACE_ARRAY)
private List<Integer> namespaceArray = null;
public static final String SERIALIZED_NAME_NAMESPACE_WRAPPED_ARRAY = "namespace_wrapped_array";
@SerializedName(SERIALIZED_NAME_NAMESPACE_WRAPPED_ARRAY)
private List<Integer> namespaceWrappedArray = null;
public static final String SERIALIZED_NAME_PREFIX_NS_STRING = "prefix_ns_string";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_STRING)
private String prefixNsString;
public static final String SERIALIZED_NAME_PREFIX_NS_NUMBER = "prefix_ns_number";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_NUMBER)
private BigDecimal prefixNsNumber;
public static final String SERIALIZED_NAME_PREFIX_NS_INTEGER = "prefix_ns_integer";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_INTEGER)
private Integer prefixNsInteger;
public static final String SERIALIZED_NAME_PREFIX_NS_BOOLEAN = "prefix_ns_boolean";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_BOOLEAN)
private Boolean prefixNsBoolean;
public static final String SERIALIZED_NAME_PREFIX_NS_ARRAY = "prefix_ns_array";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_ARRAY)
private List<Integer> prefixNsArray = null;
public static final String SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY = "prefix_ns_wrapped_array";
@SerializedName(SERIALIZED_NAME_PREFIX_NS_WRAPPED_ARRAY)
private List<Integer> prefixNsWrappedArray = null;
public XmlItem attributeString(String attributeString) {
this.attributeString = attributeString;
return this;
}
/**
* Get attributeString
* @return attributeString
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getAttributeString() {
return attributeString;
}
public void setAttributeString(String attributeString) {
this.attributeString = attributeString;
}
public XmlItem attributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
return this;
}
/**
* Get attributeNumber
* @return attributeNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getAttributeNumber() {
return attributeNumber;
}
public void setAttributeNumber(BigDecimal attributeNumber) {
this.attributeNumber = attributeNumber;
}
public XmlItem attributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
return this;
}
/**
* Get attributeInteger
* @return attributeInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getAttributeInteger() {
return attributeInteger;
}
public void setAttributeInteger(Integer attributeInteger) {
this.attributeInteger = attributeInteger;
}
public XmlItem attributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
return this;
}
/**
* Get attributeBoolean
* @return attributeBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getAttributeBoolean() {
return attributeBoolean;
}
public void setAttributeBoolean(Boolean attributeBoolean) {
this.attributeBoolean = attributeBoolean;
}
public XmlItem wrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
return this;
}
public XmlItem addWrappedArrayItem(Integer wrappedArrayItem) {
if (this.wrappedArray == null) {
this.wrappedArray = new ArrayList<Integer>();
}
this.wrappedArray.add(wrappedArrayItem);
return this;
}
/**
* Get wrappedArray
* @return wrappedArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getWrappedArray() {
return wrappedArray;
}
public void setWrappedArray(List<Integer> wrappedArray) {
this.wrappedArray = wrappedArray;
}
public XmlItem nameString(String nameString) {
this.nameString = nameString;
return this;
}
/**
* Get nameString
* @return nameString
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNameString() {
return nameString;
}
public void setNameString(String nameString) {
this.nameString = nameString;
}
public XmlItem nameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
return this;
}
/**
* Get nameNumber
* @return nameNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNameNumber() {
return nameNumber;
}
public void setNameNumber(BigDecimal nameNumber) {
this.nameNumber = nameNumber;
}
public XmlItem nameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
return this;
}
/**
* Get nameInteger
* @return nameInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNameInteger() {
return nameInteger;
}
public void setNameInteger(Integer nameInteger) {
this.nameInteger = nameInteger;
}
public XmlItem nameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
return this;
}
/**
* Get nameBoolean
* @return nameBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNameBoolean() {
return nameBoolean;
}
public void setNameBoolean(Boolean nameBoolean) {
this.nameBoolean = nameBoolean;
}
public XmlItem nameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
return this;
}
public XmlItem addNameArrayItem(Integer nameArrayItem) {
if (this.nameArray == null) {
this.nameArray = new ArrayList<Integer>();
}
this.nameArray.add(nameArrayItem);
return this;
}
/**
* Get nameArray
* @return nameArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getNameArray() {
return nameArray;
}
public void setNameArray(List<Integer> nameArray) {
this.nameArray = nameArray;
}
public XmlItem nameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
return this;
}
public XmlItem addNameWrappedArrayItem(Integer nameWrappedArrayItem) {
if (this.nameWrappedArray == null) {
this.nameWrappedArray = new ArrayList<Integer>();
}
this.nameWrappedArray.add(nameWrappedArrayItem);
return this;
}
/**
* Get nameWrappedArray
* @return nameWrappedArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getNameWrappedArray() {
return nameWrappedArray;
}
public void setNameWrappedArray(List<Integer> nameWrappedArray) {
this.nameWrappedArray = nameWrappedArray;
}
public XmlItem prefixString(String prefixString) {
this.prefixString = prefixString;
return this;
}
/**
* Get prefixString
* @return prefixString
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixString() {
return prefixString;
}
public void setPrefixString(String prefixString) {
this.prefixString = prefixString;
}
public XmlItem prefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
return this;
}
/**
* Get prefixNumber
* @return prefixNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNumber() {
return prefixNumber;
}
public void setPrefixNumber(BigDecimal prefixNumber) {
this.prefixNumber = prefixNumber;
}
public XmlItem prefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
return this;
}
/**
* Get prefixInteger
* @return prefixInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixInteger() {
return prefixInteger;
}
public void setPrefixInteger(Integer prefixInteger) {
this.prefixInteger = prefixInteger;
}
public XmlItem prefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
return this;
}
/**
* Get prefixBoolean
* @return prefixBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixBoolean() {
return prefixBoolean;
}
public void setPrefixBoolean(Boolean prefixBoolean) {
this.prefixBoolean = prefixBoolean;
}
public XmlItem prefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
return this;
}
public XmlItem addPrefixArrayItem(Integer prefixArrayItem) {
if (this.prefixArray == null) {
this.prefixArray = new ArrayList<Integer>();
}
this.prefixArray.add(prefixArrayItem);
return this;
}
/**
* Get prefixArray
* @return prefixArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getPrefixArray() {
return prefixArray;
}
public void setPrefixArray(List<Integer> prefixArray) {
this.prefixArray = prefixArray;
}
public XmlItem prefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
return this;
}
public XmlItem addPrefixWrappedArrayItem(Integer prefixWrappedArrayItem) {
if (this.prefixWrappedArray == null) {
this.prefixWrappedArray = new ArrayList<Integer>();
}
this.prefixWrappedArray.add(prefixWrappedArrayItem);
return this;
}
/**
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getPrefixWrappedArray() {
return prefixWrappedArray;
}
public void setPrefixWrappedArray(List<Integer> prefixWrappedArray) {
this.prefixWrappedArray = prefixWrappedArray;
}
public XmlItem namespaceString(String namespaceString) {
this.namespaceString = namespaceString;
return this;
}
/**
* Get namespaceString
* @return namespaceString
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getNamespaceString() {
return namespaceString;
}
public void setNamespaceString(String namespaceString) {
this.namespaceString = namespaceString;
}
public XmlItem namespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
return this;
}
/**
* Get namespaceNumber
* @return namespaceNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
}
public void setNamespaceNumber(BigDecimal namespaceNumber) {
this.namespaceNumber = namespaceNumber;
}
public XmlItem namespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
return this;
}
/**
* Get namespaceInteger
* @return namespaceInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getNamespaceInteger() {
return namespaceInteger;
}
public void setNamespaceInteger(Integer namespaceInteger) {
this.namespaceInteger = namespaceInteger;
}
public XmlItem namespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
return this;
}
/**
* Get namespaceBoolean
* @return namespaceBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
}
public void setNamespaceBoolean(Boolean namespaceBoolean) {
this.namespaceBoolean = namespaceBoolean;
}
public XmlItem namespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
return this;
}
public XmlItem addNamespaceArrayItem(Integer namespaceArrayItem) {
if (this.namespaceArray == null) {
this.namespaceArray = new ArrayList<Integer>();
}
this.namespaceArray.add(namespaceArrayItem);
return this;
}
/**
* Get namespaceArray
* @return namespaceArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getNamespaceArray() {
return namespaceArray;
}
public void setNamespaceArray(List<Integer> namespaceArray) {
this.namespaceArray = namespaceArray;
}
public XmlItem namespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
return this;
}
public XmlItem addNamespaceWrappedArrayItem(Integer namespaceWrappedArrayItem) {
if (this.namespaceWrappedArray == null) {
this.namespaceWrappedArray = new ArrayList<Integer>();
}
this.namespaceWrappedArray.add(namespaceWrappedArrayItem);
return this;
}
/**
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getNamespaceWrappedArray() {
return namespaceWrappedArray;
}
public void setNamespaceWrappedArray(List<Integer> namespaceWrappedArray) {
this.namespaceWrappedArray = namespaceWrappedArray;
}
public XmlItem prefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
return this;
}
/**
* Get prefixNsString
* @return prefixNsString
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "string", value = "")
public String getPrefixNsString() {
return prefixNsString;
}
public void setPrefixNsString(String prefixNsString) {
this.prefixNsString = prefixNsString;
}
public XmlItem prefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
return this;
}
/**
* Get prefixNsNumber
* @return prefixNsNumber
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "1.234", value = "")
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
}
public void setPrefixNsNumber(BigDecimal prefixNsNumber) {
this.prefixNsNumber = prefixNsNumber;
}
public XmlItem prefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
return this;
}
/**
* Get prefixNsInteger
* @return prefixNsInteger
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "-2", value = "")
public Integer getPrefixNsInteger() {
return prefixNsInteger;
}
public void setPrefixNsInteger(Integer prefixNsInteger) {
this.prefixNsInteger = prefixNsInteger;
}
public XmlItem prefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
return this;
}
/**
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "true", value = "")
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
}
public void setPrefixNsBoolean(Boolean prefixNsBoolean) {
this.prefixNsBoolean = prefixNsBoolean;
}
public XmlItem prefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
return this;
}
public XmlItem addPrefixNsArrayItem(Integer prefixNsArrayItem) {
if (this.prefixNsArray == null) {
this.prefixNsArray = new ArrayList<Integer>();
}
this.prefixNsArray.add(prefixNsArrayItem);
return this;
}
/**
* Get prefixNsArray
* @return prefixNsArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getPrefixNsArray() {
return prefixNsArray;
}
public void setPrefixNsArray(List<Integer> prefixNsArray) {
this.prefixNsArray = prefixNsArray;
}
public XmlItem prefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
return this;
}
public XmlItem addPrefixNsWrappedArrayItem(Integer prefixNsWrappedArrayItem) {
if (this.prefixNsWrappedArray == null) {
this.prefixNsWrappedArray = new ArrayList<Integer>();
}
this.prefixNsWrappedArray.add(prefixNsWrappedArrayItem);
return this;
}
/**
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public List<Integer> getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
}
public void setPrefixNsWrappedArray(List<Integer> prefixNsWrappedArray) {
this.prefixNsWrappedArray = prefixNsWrappedArray;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
XmlItem xmlItem = (XmlItem) o;
return Objects.equals(this.attributeString, xmlItem.attributeString) &&
Objects.equals(this.attributeNumber, xmlItem.attributeNumber) &&
Objects.equals(this.attributeInteger, xmlItem.attributeInteger) &&
Objects.equals(this.attributeBoolean, xmlItem.attributeBoolean) &&
Objects.equals(this.wrappedArray, xmlItem.wrappedArray) &&
Objects.equals(this.nameString, xmlItem.nameString) &&
Objects.equals(this.nameNumber, xmlItem.nameNumber) &&
Objects.equals(this.nameInteger, xmlItem.nameInteger) &&
Objects.equals(this.nameBoolean, xmlItem.nameBoolean) &&
Objects.equals(this.nameArray, xmlItem.nameArray) &&
Objects.equals(this.nameWrappedArray, xmlItem.nameWrappedArray) &&
Objects.equals(this.prefixString, xmlItem.prefixString) &&
Objects.equals(this.prefixNumber, xmlItem.prefixNumber) &&
Objects.equals(this.prefixInteger, xmlItem.prefixInteger) &&
Objects.equals(this.prefixBoolean, xmlItem.prefixBoolean) &&
Objects.equals(this.prefixArray, xmlItem.prefixArray) &&
Objects.equals(this.prefixWrappedArray, xmlItem.prefixWrappedArray) &&
Objects.equals(this.namespaceString, xmlItem.namespaceString) &&
Objects.equals(this.namespaceNumber, xmlItem.namespaceNumber) &&
Objects.equals(this.namespaceInteger, xmlItem.namespaceInteger) &&
Objects.equals(this.namespaceBoolean, xmlItem.namespaceBoolean) &&
Objects.equals(this.namespaceArray, xmlItem.namespaceArray) &&
Objects.equals(this.namespaceWrappedArray, xmlItem.namespaceWrappedArray) &&
Objects.equals(this.prefixNsString, xmlItem.prefixNsString) &&
Objects.equals(this.prefixNsNumber, xmlItem.prefixNsNumber) &&
Objects.equals(this.prefixNsInteger, xmlItem.prefixNsInteger) &&
Objects.equals(this.prefixNsBoolean, xmlItem.prefixNsBoolean) &&
Objects.equals(this.prefixNsArray, xmlItem.prefixNsArray) &&
Objects.equals(this.prefixNsWrappedArray, xmlItem.prefixNsWrappedArray);
}
@Override
public int hashCode() {
return Objects.hash(attributeString, attributeNumber, attributeInteger, attributeBoolean, wrappedArray, nameString, nameNumber, nameInteger, nameBoolean, nameArray, nameWrappedArray, prefixString, prefixNumber, prefixInteger, prefixBoolean, prefixArray, prefixWrappedArray, namespaceString, namespaceNumber, namespaceInteger, namespaceBoolean, namespaceArray, namespaceWrappedArray, prefixNsString, prefixNsNumber, prefixNsInteger, prefixNsBoolean, prefixNsArray, prefixNsWrappedArray);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class XmlItem {\n");
sb.append(" attributeString: ").append(toIndentedString(attributeString)).append("\n");
sb.append(" attributeNumber: ").append(toIndentedString(attributeNumber)).append("\n");
sb.append(" attributeInteger: ").append(toIndentedString(attributeInteger)).append("\n");
sb.append(" attributeBoolean: ").append(toIndentedString(attributeBoolean)).append("\n");
sb.append(" wrappedArray: ").append(toIndentedString(wrappedArray)).append("\n");
sb.append(" nameString: ").append(toIndentedString(nameString)).append("\n");
sb.append(" nameNumber: ").append(toIndentedString(nameNumber)).append("\n");
sb.append(" nameInteger: ").append(toIndentedString(nameInteger)).append("\n");
sb.append(" nameBoolean: ").append(toIndentedString(nameBoolean)).append("\n");
sb.append(" nameArray: ").append(toIndentedString(nameArray)).append("\n");
sb.append(" nameWrappedArray: ").append(toIndentedString(nameWrappedArray)).append("\n");
sb.append(" prefixString: ").append(toIndentedString(prefixString)).append("\n");
sb.append(" prefixNumber: ").append(toIndentedString(prefixNumber)).append("\n");
sb.append(" prefixInteger: ").append(toIndentedString(prefixInteger)).append("\n");
sb.append(" prefixBoolean: ").append(toIndentedString(prefixBoolean)).append("\n");
sb.append(" prefixArray: ").append(toIndentedString(prefixArray)).append("\n");
sb.append(" prefixWrappedArray: ").append(toIndentedString(prefixWrappedArray)).append("\n");
sb.append(" namespaceString: ").append(toIndentedString(namespaceString)).append("\n");
sb.append(" namespaceNumber: ").append(toIndentedString(namespaceNumber)).append("\n");
sb.append(" namespaceInteger: ").append(toIndentedString(namespaceInteger)).append("\n");
sb.append(" namespaceBoolean: ").append(toIndentedString(namespaceBoolean)).append("\n");
sb.append(" namespaceArray: ").append(toIndentedString(namespaceArray)).append("\n");
sb.append(" namespaceWrappedArray: ").append(toIndentedString(namespaceWrappedArray)).append("\n");
sb.append(" prefixNsString: ").append(toIndentedString(prefixNsString)).append("\n");
sb.append(" prefixNsNumber: ").append(toIndentedString(prefixNsNumber)).append("\n");
sb.append(" prefixNsInteger: ").append(toIndentedString(prefixNsInteger)).append("\n");
sb.append(" prefixNsBoolean: ").append(toIndentedString(prefixNsBoolean)).append("\n");
sb.append(" prefixNsArray: ").append(toIndentedString(prefixNsArray)).append("\n");
sb.append(" prefixNsWrappedArray: ").append(toIndentedString(prefixNsWrappedArray)).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,39 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for AnotherFakeApi
*/
public class AnotherFakeApiTest {
private AnotherFakeApi api;
@Before
public void setup() {
api = new ApiClient().createService(AnotherFakeApi.class);
}
/**
* To test special tags
*
* To test special tags
*/
@Test
public void testSpecialTagsTest() {
Client client = null;
// Client response = api.testSpecialTags(client);
// TODO: test validations
}
}

View File

@ -1,216 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.math.BigDecimal;
import org.openapitools.client.model.Client;
import org.joda.time.DateTime;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.joda.time.LocalDate;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.User;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FakeApi
*/
public class FakeApiTest {
private FakeApi api;
@Before
public void setup() {
api = new ApiClient().createService(FakeApi.class);
}
/**
*
*
* Test serialization of outer boolean types
*/
@Test
public void fakeOuterBooleanSerializeTest() {
Boolean body = null;
// Boolean response = api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*/
@Test
public void fakeOuterCompositeSerializeTest() {
OuterComposite outerComposite = null;
// OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*/
@Test
public void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
// BigDecimal response = api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*/
@Test
public void fakeOuterStringSerializeTest() {
String body = null;
// String response = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
*
*
* For this test, the body for this request much reference a schema named &#x60;File&#x60;.
*/
@Test
public void testBodyWithFileSchemaTest() {
FileSchemaTestClass fileSchemaTestClass = null;
// api.testBodyWithFileSchema(fileSchemaTestClass);
// TODO: test validations
}
/**
*
*
*
*/
@Test
public void testBodyWithQueryParamsTest() {
String query = null;
User user = null;
// api.testBodyWithQueryParams(query, user);
// TODO: test validations
}
/**
* To test \&quot;client\&quot; model
*
* To test \&quot;client\&quot; model
*/
@Test
public void testClientModelTest() {
Client client = null;
// Client response = api.testClientModel(client);
// TODO: test validations
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*/
@Test
public void testEndpointParametersTest() {
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
File binary = null;
LocalDate date = null;
DateTime dateTime = null;
String password = null;
String paramCallback = null;
// api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
/**
* To test enum parameters
*
* To test enum parameters
*/
@Test
public void testEnumParametersTest() {
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
// api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString);
// TODO: test validations
}
/**
* Fake endpoint to test group parameters (optional)
*
* Fake endpoint to test group parameters (optional)
*/
@Test
public void testGroupParametersTest() {
Integer requiredStringGroup = null;
Boolean requiredBooleanGroup = null;
Long requiredInt64Group = null;
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
// api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*/
@Test
public void testInlineAdditionalPropertiesTest() {
Map<String, String> requestBody = null;
// api.testInlineAdditionalProperties(requestBody);
// TODO: test validations
}
/**
* test json serialization of form data
*
*
*/
@Test
public void testJsonFormDataTest() {
String param = null;
String param2 = null;
// api.testJsonFormData(param, param2);
// TODO: test validations
}
}

View File

@ -1,39 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FakeClassnameTags123Api
*/
public class FakeClassnameTags123ApiTest {
private FakeClassnameTags123Api api;
@Before
public void setup() {
api = new ApiClient().createService(FakeClassnameTags123Api.class);
}
/**
* To test class name in snake case
*
* To test class name in snake case
*/
@Test
public void testClassnameTest() {
Client client = null;
// Client response = api.testClassname(client);
// TODO: test validations
}
}

View File

@ -1,137 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.io.File;
import org.openapitools.client.model.ModelApiResponse;
import org.openapitools.client.model.Pet;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for PetApi
*/
public class PetApiTest {
private PetApi api;
@Before
public void setup() {
api = new ApiClient().createService(PetApi.class);
}
/**
* Add a new pet to the store
*
*
*/
@Test
public void addPetTest() {
Pet pet = null;
// api.addPet(pet);
// TODO: test validations
}
/**
* Deletes a pet
*
*
*/
@Test
public void deletePetTest() {
Long petId = null;
String apiKey = null;
// api.deletePet(petId, apiKey);
// TODO: test validations
}
/**
* Finds Pets by status
*
* Multiple status values can be provided with comma separated strings
*/
@Test
public void findPetsByStatusTest() {
List<String> status = null;
// List<Pet> response = api.findPetsByStatus(status);
// TODO: test validations
}
/**
* Finds Pets by tags
*
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*/
@Test
public void findPetsByTagsTest() {
List<String> tags = null;
// List<Pet> response = api.findPetsByTags(tags);
// TODO: test validations
}
/**
* Find pet by ID
*
* Returns a single pet
*/
@Test
public void getPetByIdTest() {
Long petId = null;
// Pet response = api.getPetById(petId);
// TODO: test validations
}
/**
* Update an existing pet
*
*
*/
@Test
public void updatePetTest() {
Pet pet = null;
// api.updatePet(pet);
// TODO: test validations
}
/**
* Updates a pet in the store with form data
*
*
*/
@Test
public void updatePetWithFormTest() {
Long petId = null;
String name = null;
String status = null;
// api.updatePetWithForm(petId, name, status);
// TODO: test validations
}
/**
* uploads an image
*
*
*/
@Test
public void uploadFileTest() {
Long petId = null;
String additionalMetadata = null;
File file = null;
// ModelApiResponse response = api.uploadFile(petId, additionalMetadata, file);
// TODO: test validations
}
}

View File

@ -1,77 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Order;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for StoreApi
*/
public class StoreApiTest {
private StoreApi api;
@Before
public void setup() {
api = new ApiClient().createService(StoreApi.class);
}
/**
* Delete purchase order by ID
*
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
*/
@Test
public void deleteOrderTest() {
String orderId = null;
// api.deleteOrder(orderId);
// TODO: test validations
}
/**
* Returns pet inventories by status
*
* Returns a map of status codes to quantities
*/
@Test
public void getInventoryTest() {
// Map<String, Integer> response = api.getInventory();
// TODO: test validations
}
/**
* Find purchase order by ID
*
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
*/
@Test
public void getOrderByIdTest() {
Long orderId = null;
// Order response = api.getOrderById(orderId);
// TODO: test validations
}
/**
* Place an order for a pet
*
*
*/
@Test
public void placeOrderTest() {
Order order = null;
// Order response = api.placeOrder(order);
// TODO: test validations
}
}

View File

@ -1,131 +0,0 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.User;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for UserApi
*/
public class UserApiTest {
private UserApi api;
@Before
public void setup() {
api = new ApiClient().createService(UserApi.class);
}
/**
* Create user
*
* This can only be done by the logged in user.
*/
@Test
public void createUserTest() {
User user = null;
// api.createUser(user);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*/
@Test
public void createUsersWithArrayInputTest() {
List<User> user = null;
// api.createUsersWithArrayInput(user);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*/
@Test
public void createUsersWithListInputTest() {
List<User> user = null;
// api.createUsersWithListInput(user);
// TODO: test validations
}
/**
* Delete user
*
* This can only be done by the logged in user.
*/
@Test
public void deleteUserTest() {
String username = null;
// api.deleteUser(username);
// TODO: test validations
}
/**
* Get user by user name
*
*
*/
@Test
public void getUserByNameTest() {
String username = null;
// User response = api.getUserByName(username);
// TODO: test validations
}
/**
* Logs user into the system
*
*
*/
@Test
public void loginUserTest() {
String username = null;
String password = null;
// String response = api.loginUser(username, password);
// TODO: test validations
}
/**
* Logs out current logged in user session
*
*
*/
@Test
public void logoutUserTest() {
// api.logoutUser();
// TODO: test validations
}
/**
* Updated user
*
* This can only be done by the logged in user.
*/
@Test
public void updateUserTest() {
String username = null;
User user = null;
// api.updateUser(username, user);
// TODO: test validations
}
}

View File

@ -1,53 +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: \" \\
*
* OpenAPI spec version: 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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AdditionalPropertiesAnyType
*/
public class AdditionalPropertiesAnyTypeTest {
private final AdditionalPropertiesAnyType model = new AdditionalPropertiesAnyType();
/**
* Model tests for AdditionalPropertiesAnyType
*/
@Test
public void testAdditionalPropertiesAnyType() {
// TODO: test AdditionalPropertiesAnyType
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@ -1,54 +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: \" \\
*
* OpenAPI spec version: 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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AdditionalPropertiesArray
*/
public class AdditionalPropertiesArrayTest {
private final AdditionalPropertiesArray model = new AdditionalPropertiesArray();
/**
* Model tests for AdditionalPropertiesArray
*/
@Test
public void testAdditionalPropertiesArray() {
// TODO: test AdditionalPropertiesArray
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@ -1,53 +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: \" \\
*
* OpenAPI spec version: 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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AdditionalPropertiesBoolean
*/
public class AdditionalPropertiesBooleanTest {
private final AdditionalPropertiesBoolean model = new AdditionalPropertiesBoolean();
/**
* Model tests for AdditionalPropertiesBoolean
*/
@Test
public void testAdditionalPropertiesBoolean() {
// TODO: test AdditionalPropertiesBoolean
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@ -1,62 +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: \" \\
*
* OpenAPI spec version: 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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AdditionalPropertiesClass
*/
public class AdditionalPropertiesClassTest {
private final AdditionalPropertiesClass model = new AdditionalPropertiesClass();
/**
* Model tests for AdditionalPropertiesClass
*/
@Test
public void testAdditionalPropertiesClass() {
// TODO: test AdditionalPropertiesClass
}
/**
* Test the property 'mapProperty'
*/
@Test
public void mapPropertyTest() {
// TODO: test mapProperty
}
/**
* Test the property 'mapOfMapProperty'
*/
@Test
public void mapOfMapPropertyTest() {
// TODO: test mapOfMapProperty
}
}

View File

@ -1,53 +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: \" \\
*
* OpenAPI spec version: 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.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for AdditionalPropertiesInteger
*/
public class AdditionalPropertiesIntegerTest {
private final AdditionalPropertiesInteger model = new AdditionalPropertiesInteger();
/**
* Model tests for AdditionalPropertiesInteger
*/
@Test
public void testAdditionalPropertiesInteger() {
// TODO: test AdditionalPropertiesInteger
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

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