forked from loafle/openapi-generator-original
[Spring] Adds feature useOptional (#5968)
* Adds Valid annotation for request body (#4847) If useBeanValidation is active, this change will add Valid annotation to ReqeustBody * Adds generated samples for bean vaildation in spring boot (#4847) * Adds feature option (#3819) When you enable the feature useOptional the JavaSpring generator will use type Optional for non required parameters. * Adds generated sample for #3819 * Adds generated sample for #3819 * Reverts commit for bean validation * Adds generated sample for #3819 * Reverts commit for bean validation * Fix alignment * update spring samples * update pom.xml to include spring use optional samples * update artifactId to "spring-boot-beanvalidation" * rpelace tab with 4-space * check mvn task result
This commit is contained in:
parent
e50a4cca36
commit
ecf924e78f
1
.gitignore
vendored
1
.gitignore
vendored
@ -78,6 +78,7 @@ samples/client/petstore/java/default/build/
|
|||||||
samples/client/petstore/scala/build/
|
samples/client/petstore/scala/build/
|
||||||
samples/client/petstore/java/resttemplate/hello.txt
|
samples/client/petstore/java/resttemplate/hello.txt
|
||||||
samples/client/petstore/java/retrofit2/hello.txt
|
samples/client/petstore/java/retrofit2/hello.txt
|
||||||
|
samples/client/petstore/java/feign/hello.txt
|
||||||
|
|
||||||
#PHP
|
#PHP
|
||||||
samples/client/petstore/php/SwaggerClient-php/composer.lock
|
samples/client/petstore/php/SwaggerClient-php/composer.lock
|
||||||
|
@ -9,3 +9,4 @@
|
|||||||
./bin/spring-mvc-petstore-server.sh
|
./bin/spring-mvc-petstore-server.sh
|
||||||
./bin/springboot-petstore-server-beanvalidation.sh
|
./bin/springboot-petstore-server-beanvalidation.sh
|
||||||
./bin/springboot-petstore-server-implicitHeaders.sh
|
./bin/springboot-petstore-server-implicitHeaders.sh
|
||||||
|
./bin/springboot-petstore-server-useOptional.sh
|
||||||
|
4
bin/springboot-petstore-server-useOptional.json
Normal file
4
bin/springboot-petstore-server-useOptional.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"artifactId": "spring-boot-useoptional",
|
||||||
|
"useOptional": true
|
||||||
|
}
|
34
bin/springboot-petstore-server-useOptional.sh
Executable file
34
bin/springboot-petstore-server-useOptional.sh
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
SCRIPT="$0"
|
||||||
|
|
||||||
|
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/swagger-codegen-cli/target/swagger-codegen-cli.jar"
|
||||||
|
|
||||||
|
if [ ! -f "$executable" ]
|
||||||
|
then
|
||||||
|
mvn clean package
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if you've executed sbt assembly previously it will use that instead.
|
||||||
|
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||||
|
ags="$@ generate -t modules/swagger-codegen/src/main/resources/JavaSpring -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional -DhideGenerationTimestamp=true"
|
||||||
|
|
||||||
|
echo "Removing files and folders under samples/server/petstore/springboot-useoptional/src/main"
|
||||||
|
rm -rf samples/server/petstore/springboot-useoptional/src/main
|
||||||
|
find samples/server/petstore/springboot-useoptional -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
|
||||||
|
java $JAVA_OPTS -jar $executable $ags
|
12
circle.yml
12
circle.yml
@ -32,14 +32,18 @@ dependencies:
|
|||||||
|
|
||||||
test:
|
test:
|
||||||
override:
|
override:
|
||||||
# test with jdk8
|
## test with jdk8
|
||||||
- java -version
|
- java -version
|
||||||
- mvn -q clean verify -Psamples
|
- mvn -q clean verify -Psamples
|
||||||
# test with jdk7
|
# skip the rest if previous mvn task fails
|
||||||
|
- if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
## test with jdk7
|
||||||
- sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
- sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
|
||||||
- java -version
|
- java -version
|
||||||
- mvn -q clean verify -Psamples
|
- mvn -q clean verify -Psamples
|
||||||
# docker: build generator image and push to Docker Hub
|
# skip the rest if previous mvn task fails
|
||||||
|
- if [ $? -ne 0 ]; then exit 1; fi
|
||||||
|
## docker: build generator image and push to Docker Hub
|
||||||
- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
|
- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_GENERATOR_IMAGE_NAME ./modules/swagger-generator && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_GENERATOR_IMAGE_NAME:latest $DOCKER_GENERATOR_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_GENERATOR_IMAGE_NAME; fi; fi
|
||||||
# docker: build cli image and push to Docker Hub
|
## docker: build cli image and push to Docker Hub
|
||||||
- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
|
- if [ $DOCKER_HUB_USERNAME ]; then docker login --email=$DOCKER_HUB_EMAIL --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD && docker build --rm=false -t $DOCKER_CODEGEN_CLI_IMAGE_NAME ./modules/swagger-codegen-cli && if [ ! -z "$CIRCLE_TAG" ]; then docker tag $DOCKER_CODEGEN_CLI_IMAGE_NAME:latest $DOCKER_CODEGEN_CLI_IMAGE_NAME:$CIRCLE_TAG; fi && if [ ! -z "$CIRCLE_TAG" ] || [ "$CIRCLE_BRANCH" = "master" ]; then docker push $DOCKER_CODEGEN_CLI_IMAGE_NAME; fi; fi
|
||||||
|
@ -4,6 +4,7 @@ import com.samskivert.mustache.Mustache;
|
|||||||
import com.samskivert.mustache.Template;
|
import com.samskivert.mustache.Template;
|
||||||
import io.swagger.codegen.*;
|
import io.swagger.codegen.*;
|
||||||
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||||
|
import io.swagger.codegen.languages.features.OptionalFeatures;
|
||||||
import io.swagger.models.Operation;
|
import io.swagger.models.Operation;
|
||||||
import io.swagger.models.Path;
|
import io.swagger.models.Path;
|
||||||
import io.swagger.models.Swagger;
|
import io.swagger.models.Swagger;
|
||||||
@ -15,7 +16,8 @@ import java.util.*;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
|
||||||
|
|
||||||
public class SpringCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
|
public class SpringCodegen extends AbstractJavaCodegen
|
||||||
|
implements BeanValidationFeatures, OptionalFeatures {
|
||||||
public static final String DEFAULT_LIBRARY = "spring-boot";
|
public static final String DEFAULT_LIBRARY = "spring-boot";
|
||||||
public static final String TITLE = "title";
|
public static final String TITLE = "title";
|
||||||
public static final String CONFIG_PACKAGE = "configPackage";
|
public static final String CONFIG_PACKAGE = "configPackage";
|
||||||
@ -43,6 +45,7 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
protected boolean useTags = false;
|
protected boolean useTags = false;
|
||||||
protected boolean useBeanValidation = true;
|
protected boolean useBeanValidation = true;
|
||||||
protected boolean implicitHeaders = false;
|
protected boolean implicitHeaders = false;
|
||||||
|
protected boolean useOptional = false;
|
||||||
|
|
||||||
public SpringCodegen() {
|
public SpringCodegen() {
|
||||||
super();
|
super();
|
||||||
@ -72,6 +75,8 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
cliOptions.add(CliOption.newBoolean(USE_TAGS, "use tags for creating interface and controller classnames"));
|
cliOptions.add(CliOption.newBoolean(USE_TAGS, "use tags for creating interface and controller classnames"));
|
||||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||||
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Use of @ApiImplicitParams for headers."));
|
cliOptions.add(CliOption.newBoolean(IMPLICIT_HEADERS, "Use of @ApiImplicitParams for headers."));
|
||||||
|
cliOptions.add(CliOption.newBoolean(USE_OPTIONAL,
|
||||||
|
"Use Optional container for optional parameters"));
|
||||||
|
|
||||||
supportedLibraries.put(DEFAULT_LIBRARY, "Spring-boot Server application using the SpringFox integration.");
|
supportedLibraries.put(DEFAULT_LIBRARY, "Spring-boot Server application using the SpringFox integration.");
|
||||||
supportedLibraries.put(SPRING_MVC_LIBRARY, "Spring-MVC Server application using the SpringFox integration.");
|
supportedLibraries.put(SPRING_MVC_LIBRARY, "Spring-MVC Server application using the SpringFox integration.");
|
||||||
@ -154,11 +159,14 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (additionalProperties.containsKey(USE_OPTIONAL)) {
|
||||||
|
this.setUseOptional(convertPropertyToBoolean(USE_OPTIONAL));
|
||||||
|
}
|
||||||
|
|
||||||
if (useBeanValidation) {
|
if (useBeanValidation) {
|
||||||
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (additionalProperties.containsKey(IMPLICIT_HEADERS)) {
|
if (additionalProperties.containsKey(IMPLICIT_HEADERS)) {
|
||||||
this.setImplicitHeaders(Boolean.valueOf(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
this.setImplicitHeaders(Boolean.valueOf(additionalProperties.get(IMPLICIT_HEADERS).toString()));
|
||||||
}
|
}
|
||||||
@ -166,6 +174,10 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
typeMapping.put("file", "Resource");
|
typeMapping.put("file", "Resource");
|
||||||
importMapping.put("Resource", "org.springframework.core.io.Resource");
|
importMapping.put("Resource", "org.springframework.core.io.Resource");
|
||||||
|
|
||||||
|
if (useOptional) {
|
||||||
|
writePropertyBack(USE_OPTIONAL, useOptional);
|
||||||
|
}
|
||||||
|
|
||||||
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
supportingFiles.add(new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||||
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
|
||||||
|
|
||||||
@ -613,4 +625,8 @@ public class SpringCodegen extends AbstractJavaCodegen implements BeanValidation
|
|||||||
this.useBeanValidation = useBeanValidation;
|
this.useBeanValidation = useBeanValidation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setUseOptional(boolean useOptional) {
|
||||||
|
this.useOptional = useOptional;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
package io.swagger.codegen.languages.features;
|
||||||
|
|
||||||
|
public interface OptionalFeatures {
|
||||||
|
|
||||||
|
// Language supports generating Optional Types
|
||||||
|
String USE_OPTIONAL = "useOptional";
|
||||||
|
|
||||||
|
void setUseOptional(boolean useOptional);
|
||||||
|
|
||||||
|
}
|
@ -23,6 +23,9 @@ import org.springframework.web.bind.annotation.RequestPart;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
{{#useOptional}}
|
||||||
|
import java.util.Optional;
|
||||||
|
{{/useOptional}}
|
||||||
{{#async}}
|
{{#async}}
|
||||||
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
|
import java.util.concurrent.{{^jdk8}}Callable{{/jdk8}}{{#jdk8}}CompletableFuture{{/jdk8}};
|
||||||
{{/async}}
|
{{/async}}
|
||||||
|
@ -19,6 +19,9 @@ import org.springframework.web.bind.annotation.RequestPart;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
{{#useOptional}}
|
||||||
|
import java.util.Optional;
|
||||||
|
{{/useOptional}}
|
||||||
{{#async}}
|
{{#async}}
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
{{/async}}{{/jdk8-no-delegate}}
|
{{/async}}{{/jdk8-no-delegate}}
|
||||||
|
@ -1 +1 @@
|
|||||||
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{{dataType}}} {{paramName}}{{/isHeaderParam}}
|
{{#isHeaderParam}}@ApiParam(value = "{{{description}}}" {{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @RequestHeader(value="{{baseName}}", required={{#required}}true{{/required}}{{^required}}false{{/required}}) {{>optionalDataType}} {{paramName}}{{/isHeaderParam}}
|
@ -0,0 +1 @@
|
|||||||
|
{{#useOptional}}{{#required}}{{{dataType}}}{{/required}}{{^required}}Optional<{{{dataType}}}>{{/required}}{{/useOptional}}{{^useOptional}}{{{dataType}}}{{/useOptional}}
|
@ -1 +1 @@
|
|||||||
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathVariable("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}}
|
{{#isPathParam}}{{#useBeanValidation}}{{>beanValidationPathParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}},required=true{{/required}}{{#allowableValues}}, allowableValues="{{{allowableValues}}}"{{/allowableValues}} {{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathVariable("{{baseName}}") {{>optionalDataType}} {{paramName}}{{/isPathParam}}
|
@ -1 +1 @@
|
|||||||
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isQueryParam}}
|
{{#isQueryParam}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}@ApiParam(value = "{{{description}}}"{{#required}}, required = true{{/required}}{{#allowableValues}}, allowableValues = "{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{#-last}}{{/-last}}{{/values}}"{{/allowableValues}}{{#defaultValue}}, defaultValue = "{{{defaultValue}}}"{{/defaultValue}}) @RequestParam(value = "{{baseName}}"{{#required}}, required = true{{/required}}{{^required}}, required = false{{/required}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{>optionalDataType}} {{paramName}}{{/isQueryParam}}
|
@ -20,6 +20,7 @@ public class SpringOptionsProvider extends JavaOptionsProvider {
|
|||||||
public static final String USE_TAGS = "useTags";
|
public static final String USE_TAGS = "useTags";
|
||||||
public static final String USE_BEANVALIDATION = "false";
|
public static final String USE_BEANVALIDATION = "false";
|
||||||
public static final String IMPLICIT_HEADERS = "false";
|
public static final String IMPLICIT_HEADERS = "false";
|
||||||
|
public static final String USE_OPTIONAL = "false";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getLanguage() {
|
public String getLanguage() {
|
||||||
@ -42,6 +43,7 @@ public class SpringOptionsProvider extends JavaOptionsProvider {
|
|||||||
options.put(SpringCodegen.USE_TAGS, USE_TAGS);
|
options.put(SpringCodegen.USE_TAGS, USE_TAGS);
|
||||||
options.put(SpringCodegen.USE_BEANVALIDATION, USE_BEANVALIDATION);
|
options.put(SpringCodegen.USE_BEANVALIDATION, USE_BEANVALIDATION);
|
||||||
options.put(SpringCodegen.IMPLICIT_HEADERS, IMPLICIT_HEADERS);
|
options.put(SpringCodegen.IMPLICIT_HEADERS, IMPLICIT_HEADERS);
|
||||||
|
options.put(SpringCodegen.USE_OPTIONAL, USE_OPTIONAL);
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ import io.swagger.codegen.CodegenConfig;
|
|||||||
import io.swagger.codegen.java.JavaClientOptionsTest;
|
import io.swagger.codegen.java.JavaClientOptionsTest;
|
||||||
import io.swagger.codegen.languages.SpringCodegen;
|
import io.swagger.codegen.languages.SpringCodegen;
|
||||||
import io.swagger.codegen.options.SpringOptionsProvider;
|
import io.swagger.codegen.options.SpringOptionsProvider;
|
||||||
|
|
||||||
import mockit.Expectations;
|
import mockit.Expectations;
|
||||||
import mockit.Tested;
|
import mockit.Tested;
|
||||||
|
|
||||||
@ -74,6 +73,9 @@ public class SpringOptionsTest extends JavaClientOptionsTest {
|
|||||||
times = 1;
|
times = 1;
|
||||||
clientCodegen.setImplicitHeaders(Boolean.valueOf(SpringOptionsProvider.IMPLICIT_HEADERS));
|
clientCodegen.setImplicitHeaders(Boolean.valueOf(SpringOptionsProvider.IMPLICIT_HEADERS));
|
||||||
times = 1;
|
times = 1;
|
||||||
|
clientCodegen.setUseOptional(
|
||||||
|
Boolean.valueOf(SpringOptionsProvider.USE_OPTIONAL));
|
||||||
|
times = 1;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -710,6 +710,18 @@
|
|||||||
<module>samples/server/petstore/spring-mvc</module>
|
<module>samples/server/petstore/spring-mvc</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>springboot-useoptional</id>
|
||||||
|
<activation>
|
||||||
|
<property>
|
||||||
|
<name>env</name>
|
||||||
|
<value>java</value>
|
||||||
|
</property>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
|
<module>samples/server/petstore/springboot-useoptional</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>springboot-beanvalidation</id>
|
<id>springboot-beanvalidation</id>
|
||||||
<activation>
|
<activation>
|
||||||
@ -821,6 +833,7 @@
|
|||||||
<module>samples/client/petstore/spring-cloud</module>
|
<module>samples/client/petstore/spring-cloud</module>
|
||||||
<module>samples/server/petstore/springboot</module>
|
<module>samples/server/petstore/springboot</module>
|
||||||
<module>samples/server/petstore/springboot-beanvalidation</module>
|
<module>samples/server/petstore/springboot-beanvalidation</module>
|
||||||
|
<module>samples/server/petstore/springboot-useoptional</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf</module>
|
<module>samples/server/petstore/jaxrs-cxf</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
<module>samples/server/petstore/jaxrs-cxf-annotated-base-path</module>
|
||||||
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
<module>samples/server/petstore/jaxrs-cxf-cdi</module>
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,23 @@
|
|||||||
|
# Swagger Codegen Ignore
|
||||||
|
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
||||||
|
|
||||||
|
# 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 Swagger Codgen 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
|
@ -0,0 +1 @@
|
|||||||
|
2.2.3-SNAPSHOT
|
18
samples/server/petstore/springboot-useoptional/README.md
Normal file
18
samples/server/petstore/springboot-useoptional/README.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
# Swagger generated server
|
||||||
|
|
||||||
|
Spring Boot Server
|
||||||
|
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project.
|
||||||
|
By using the [OpenAPI-Spec](https://github.com/swagger-api/swagger-core), you can easily generate a server stub.
|
||||||
|
This is an example of building a swagger-enabled server in Java using the SpringBoot framework.
|
||||||
|
|
||||||
|
The underlying library integrating swagger to SpringBoot is [springfox](https://github.com/springfox/springfox)
|
||||||
|
|
||||||
|
Start your server as an simple java application
|
||||||
|
|
||||||
|
You can view the api documentation in swagger-ui by pointing to
|
||||||
|
http://localhost:8080/
|
||||||
|
|
||||||
|
Change default port value in application.properties
|
73
samples/server/petstore/springboot-useoptional/pom.xml
Normal file
73
samples/server/petstore/springboot-useoptional/pom.xml
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
<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>io.swagger</groupId>
|
||||||
|
<artifactId>spring-boot-useoptional</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
<name>spring-boot-useoptional</name>
|
||||||
|
<version>1.0.0</version>
|
||||||
|
<properties>
|
||||||
|
<java.version>1.7</java.version>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
<springfox-version>2.6.1</springfox-version>
|
||||||
|
</properties>
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>1.4.7.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
<build>
|
||||||
|
<sourceDirectory>src/main/java</sourceDirectory>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
<!--SpringFox dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger2</artifactId>
|
||||||
|
<version>${springfox-version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>io.springfox</groupId>
|
||||||
|
<artifactId>springfox-swagger-ui</artifactId>
|
||||||
|
<version>${springfox-version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||||
|
<artifactId>jackson-datatype-joda</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<!-- Bean Validation API support -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.validation</groupId>
|
||||||
|
<artifactId>validation-api</artifactId>
|
||||||
|
<version>1.1.0.Final</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
@ -0,0 +1,20 @@
|
|||||||
|
package io.swagger;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.util.ISO8601DateFormat;
|
||||||
|
import com.fasterxml.jackson.databind.util.ISO8601Utils;
|
||||||
|
|
||||||
|
import java.text.FieldPosition;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
public class RFC3339DateFormat extends ISO8601DateFormat {
|
||||||
|
|
||||||
|
// Same as ISO8601DateFormat but serializing milliseconds.
|
||||||
|
@Override
|
||||||
|
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
|
||||||
|
String value = ISO8601Utils.format(date, true);
|
||||||
|
toAppendTo.append(value);
|
||||||
|
return toAppendTo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
package io.swagger;
|
||||||
|
|
||||||
|
import org.springframework.boot.CommandLineRunner;
|
||||||
|
import org.springframework.boot.ExitCodeGenerator;
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@EnableSwagger2
|
||||||
|
@ComponentScan(basePackages = "io.swagger")
|
||||||
|
public class Swagger2SpringBoot implements CommandLineRunner {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(String... arg0) throws Exception {
|
||||||
|
if (arg0.length > 0 && arg0[0].equals("exitcode")) {
|
||||||
|
throw new ExitException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Exception {
|
||||||
|
new SpringApplication(Swagger2SpringBoot.class).run(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
class ExitException extends RuntimeException implements ExitCodeGenerator {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getExitCode() {
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiException extends Exception{
|
||||||
|
private int code;
|
||||||
|
public ApiException (int code, String msg) {
|
||||||
|
super(msg);
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import javax.servlet.*;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
|
||||||
|
public class ApiOriginFilter implements javax.servlet.Filter {
|
||||||
|
@Override
|
||||||
|
public void doFilter(ServletRequest request, ServletResponse response,
|
||||||
|
FilterChain chain) throws IOException, ServletException {
|
||||||
|
HttpServletResponse res = (HttpServletResponse) response;
|
||||||
|
res.addHeader("Access-Control-Allow-Origin", "*");
|
||||||
|
res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
|
||||||
|
res.addHeader("Access-Control-Allow-Headers", "Content-Type");
|
||||||
|
chain.doFilter(request, response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void init(FilterConfig filterConfig) throws ServletException {
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,69 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlTransient;
|
||||||
|
|
||||||
|
|
||||||
|
@javax.xml.bind.annotation.XmlRootElement
|
||||||
|
public class ApiResponseMessage {
|
||||||
|
public static final int ERROR = 1;
|
||||||
|
public static final int WARNING = 2;
|
||||||
|
public static final int INFO = 3;
|
||||||
|
public static final int OK = 4;
|
||||||
|
public static final int TOO_BUSY = 5;
|
||||||
|
|
||||||
|
int code;
|
||||||
|
String type;
|
||||||
|
String message;
|
||||||
|
|
||||||
|
public ApiResponseMessage(){}
|
||||||
|
|
||||||
|
public ApiResponseMessage(int code, String message){
|
||||||
|
this.code = code;
|
||||||
|
switch(code){
|
||||||
|
case ERROR:
|
||||||
|
setType("error");
|
||||||
|
break;
|
||||||
|
case WARNING:
|
||||||
|
setType("warning");
|
||||||
|
break;
|
||||||
|
case INFO:
|
||||||
|
setType("info");
|
||||||
|
break;
|
||||||
|
case OK:
|
||||||
|
setType("ok");
|
||||||
|
break;
|
||||||
|
case TOO_BUSY:
|
||||||
|
setType("too busy");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
setType("unknown");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlTransient
|
||||||
|
public int getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(int code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMessage(String message) {
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,105 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program (2.2.3-SNAPSHOT).
|
||||||
|
* https://github.com/swagger-api/swagger-codegen
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import io.swagger.model.Client;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
import io.swagger.model.OuterComposite;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Api(value = "fake", description = "the fake API")
|
||||||
|
public interface FakeApi {
|
||||||
|
|
||||||
|
@ApiOperation(value = "", notes = "Test serialization of outer boolean types", response = Boolean.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "Output boolean", response = Boolean.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake/outer/boolean",
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Boolean> fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody Boolean body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "", notes = "Test serialization of object with outer number type", response = OuterComposite.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "Output composite", response = OuterComposite.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake/outer/composite",
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "", notes = "Test serialization of outer number types", response = BigDecimal.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "Output number", response = BigDecimal.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake/outer/number",
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<BigDecimal> fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid @RequestBody BigDecimal body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "", notes = "Test serialization of outer string types", response = String.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "Output string", response = String.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake/outer/string",
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<String> fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid @RequestBody String body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "To test \"client\" model", notes = "To test \"client\" model", response = Client.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Client.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake",
|
||||||
|
produces = { "application/json" },
|
||||||
|
consumes = { "application/json" },
|
||||||
|
method = RequestMethod.PATCH)
|
||||||
|
ResponseEntity<Client> testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", notes = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", response = Void.class, authorizations = {
|
||||||
|
@Authorization(value = "http_basic_test")
|
||||||
|
}, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake",
|
||||||
|
produces = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||||
|
consumes = { "application/xml; charset=utf-8", "application/json; charset=utf-8" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,@ApiParam(value = "None") @RequestPart(value="binary", required=false) byte[] binary,@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) DateTime dateTime,@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "To test enum parameters", notes = "To test enum parameters", response = Void.class, tags={ "fake", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid request", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "Not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/fake",
|
||||||
|
produces = { "*/*" },
|
||||||
|
consumes = { "*/*" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) Optional<List<String>> enumHeaderStringArray,@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) Optional<String> enumHeaderString,@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) Optional<List<String>> enumQueryStringArray,@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") Optional<String> enumQueryString,@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Optional<Integer> enumQueryInteger,@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,87 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import io.swagger.model.Client;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
import io.swagger.model.OuterComposite;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class FakeApiController implements FakeApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResponseEntity<Boolean> fakeOuterBooleanSerialize(@ApiParam(value = "Input boolean as post body" ) @Valid @RequestBody Boolean body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Boolean>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<OuterComposite> fakeOuterCompositeSerialize(@ApiParam(value = "Input composite as post body" ) @Valid @RequestBody OuterComposite body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<OuterComposite>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<BigDecimal> fakeOuterNumberSerialize(@ApiParam(value = "Input number as post body" ) @Valid @RequestBody BigDecimal body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<BigDecimal>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<String> fakeOuterStringSerialize(@ApiParam(value = "Input string as post body" ) @Valid @RequestBody String body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<String>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Client> testClientModel(@ApiParam(value = "client model" ,required=true ) @Valid @RequestBody Client body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Client>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> testEndpointParameters(@ApiParam(value = "None", required=true) @RequestPart(value="number", required=true) BigDecimal number,
|
||||||
|
@ApiParam(value = "None", required=true) @RequestPart(value="double", required=true) Double _double,
|
||||||
|
@ApiParam(value = "None", required=true) @RequestPart(value="pattern_without_delimiter", required=true) String patternWithoutDelimiter,
|
||||||
|
@ApiParam(value = "None", required=true) @RequestPart(value="byte", required=true) byte[] _byte,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="integer", required=false) Integer integer,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="int32", required=false) Integer int32,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="int64", required=false) Long int64,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="float", required=false) Float _float,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="string", required=false) String string,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="binary", required=false) byte[] binary,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="date", required=false) LocalDate date,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="dateTime", required=false) DateTime dateTime,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="password", required=false) String password,
|
||||||
|
@ApiParam(value = "None") @RequestPart(value="callback", required=false) String paramCallback) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> testEnumParameters(@ApiParam(value = "Form parameter enum test (string array)", allowableValues=">, $") @RequestPart(value="enum_form_string_array", required=false) List<String> enumFormStringArray,
|
||||||
|
@ApiParam(value = "Form parameter enum test (string)", allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestPart(value="enum_form_string", required=false) String enumFormString,
|
||||||
|
@ApiParam(value = "Header parameter enum test (string array)" , allowableValues=">, $") @RequestHeader(value="enum_header_string_array", required=false) Optional<List<String>> enumHeaderStringArray,
|
||||||
|
@ApiParam(value = "Header parameter enum test (string)" , allowableValues="_abc, -efg, (xyz)", defaultValue="-efg") @RequestHeader(value="enum_header_string", required=false) Optional<String> enumHeaderString,
|
||||||
|
@ApiParam(value = "Query parameter enum test (string array)", allowableValues = ">, $") @RequestParam(value = "enum_query_string_array", required = false) Optional<List<String>> enumQueryStringArray,
|
||||||
|
@ApiParam(value = "Query parameter enum test (string)", allowableValues = "_abc, -efg, (xyz)", defaultValue = "-efg") @RequestParam(value = "enum_query_string", required = false, defaultValue="-efg") Optional<String> enumQueryString,
|
||||||
|
@ApiParam(value = "Query parameter enum test (double)", allowableValues = "1, -2") @RequestParam(value = "enum_query_integer", required = false) Optional<Integer> enumQueryInteger,
|
||||||
|
@ApiParam(value = "Query parameter enum test (double)", allowableValues="1.1, -1.2") @RequestPart(value="enum_query_double", required=false) Double enumQueryDouble) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
|
||||||
|
public class NotFoundException extends ApiException {
|
||||||
|
private int code;
|
||||||
|
public NotFoundException (int code, String msg) {
|
||||||
|
super(code, msg);
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,157 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program (2.2.3-SNAPSHOT).
|
||||||
|
* https://github.com/swagger-api/swagger-codegen
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import io.swagger.model.ModelApiResponse;
|
||||||
|
import io.swagger.model.Pet;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Api(value = "pet", description = "the pet API")
|
||||||
|
public interface PetApi {
|
||||||
|
|
||||||
|
@ApiOperation(value = "Add a new pet to the store", notes = "", response = Void.class, authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
consumes = { "application/json", "application/xml" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Deletes a pet", notes = "", response = Void.class, authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid pet value", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.DELETE)
|
||||||
|
ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) Optional<String> apiKey);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Finds Pets by status", notes = "Multiple status values can be provided with comma separated strings", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid status value", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/findByStatus",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<List<Pet>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Finds Pets by tags", notes = "Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.", response = Pet.class, responseContainer = "List", authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid tag value", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/findByTags",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<List<Pet>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Find pet by ID", notes = "Returns a single pet", response = Pet.class, authorizations = {
|
||||||
|
@Authorization(value = "api_key")
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Pet.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Update an existing pet", notes = "", response = Void.class, authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "Pet not found", response = Void.class),
|
||||||
|
@ApiResponse(code = 405, message = "Validation exception", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
consumes = { "application/json", "application/xml" },
|
||||||
|
method = RequestMethod.PUT)
|
||||||
|
ResponseEntity<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Updates a pet in the store with form data", notes = "", response = Void.class, authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 405, message = "Invalid input", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/{petId}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
consumes = { "application/x-www-form-urlencoded" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "uploads an image", notes = "", response = ModelApiResponse.class, authorizations = {
|
||||||
|
@Authorization(value = "petstore_auth", scopes = {
|
||||||
|
@AuthorizationScope(scope = "write:pets", description = "modify pets in your account"),
|
||||||
|
@AuthorizationScope(scope = "read:pets", description = "read your pets")
|
||||||
|
})
|
||||||
|
}, tags={ "pet", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = ModelApiResponse.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/pet/{petId}/uploadImage",
|
||||||
|
produces = { "application/json" },
|
||||||
|
consumes = { "multipart/form-data" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import io.swagger.model.ModelApiResponse;
|
||||||
|
import io.swagger.model.Pet;
|
||||||
|
import org.springframework.core.io.Resource;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PetApiController implements PetApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResponseEntity<Void> addPet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> deletePet(@ApiParam(value = "Pet id to delete",required=true ) @PathVariable("petId") Long petId,
|
||||||
|
@ApiParam(value = "" ) @RequestHeader(value="api_key", required=false) Optional<String> apiKey) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<List<Pet>> findPetsByStatus( @NotNull@ApiParam(value = "Status values that need to be considered for filter", required = true, allowableValues = "available, pending, sold") @RequestParam(value = "status", required = true) List<String> status) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<List<Pet>> findPetsByTags( @NotNull@ApiParam(value = "Tags to filter by", required = true) @RequestParam(value = "tags", required = true) List<String> tags) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<List<Pet>>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Pet> getPetById(@ApiParam(value = "ID of pet to return",required=true ) @PathVariable("petId") Long petId) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Pet>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> updatePet(@ApiParam(value = "Pet object that needs to be added to the store" ,required=true ) @Valid @RequestBody Pet body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> updatePetWithForm(@ApiParam(value = "ID of pet that needs to be updated",required=true ) @PathVariable("petId") Long petId,
|
||||||
|
@ApiParam(value = "Updated name of the pet") @RequestPart(value="name", required=false) String name,
|
||||||
|
@ApiParam(value = "Updated status of the pet") @RequestPart(value="status", required=false) String status) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<ModelApiResponse> uploadFile(@ApiParam(value = "ID of pet to update",required=true ) @PathVariable("petId") Long petId,
|
||||||
|
@ApiParam(value = "Additional data to pass to server") @RequestPart(value="additionalMetadata", required=false) String additionalMetadata,
|
||||||
|
@ApiParam(value = "file detail") @RequestPart("file") MultipartFile file) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<ModelApiResponse>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,75 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program (2.2.3-SNAPSHOT).
|
||||||
|
* https://github.com/swagger-api/swagger-codegen
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import io.swagger.model.Order;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Api(value = "store", description = "the store API")
|
||||||
|
public interface StoreApi {
|
||||||
|
|
||||||
|
@ApiOperation(value = "Delete purchase order by ID", notes = "For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors", response = Void.class, tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/store/order/{order_id}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.DELETE)
|
||||||
|
ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Returns pet inventories by status", notes = "Returns a map of status codes to quantities", response = Integer.class, responseContainer = "Map", authorizations = {
|
||||||
|
@Authorization(value = "api_key")
|
||||||
|
}, tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Integer.class, responseContainer = "Map") })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/store/inventory",
|
||||||
|
produces = { "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<Map<String, Integer>> getInventory();
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Find purchase order by ID", notes = "For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions", response = Order.class, tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid ID supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "Order not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/store/order/{order_id}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<Order> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Place an order for a pet", notes = "", response = Order.class, tags={ "store", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Order.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid Order", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/store/order",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,49 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import io.swagger.model.Order;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class StoreApiController implements StoreApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResponseEntity<Void> deleteOrder(@ApiParam(value = "ID of the order that needs to be deleted",required=true ) @PathVariable("order_id") String orderId) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Map<String, Integer>> getInventory() {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Map<String, Integer>>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Order> getOrderById( @Min(1) @Max(5)@ApiParam(value = "ID of pet that needs to be fetched",required=true ) @PathVariable("order_id") Long orderId) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Order>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Order> placeOrder(@ApiParam(value = "order placed for purchasing the pet" ,required=true ) @Valid @RequestBody Order body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Order>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,114 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program (2.2.3-SNAPSHOT).
|
||||||
|
* https://github.com/swagger-api/swagger-codegen
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*/
|
||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import io.swagger.model.User;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Api(value = "user", description = "the user API")
|
||||||
|
public interface UserApi {
|
||||||
|
|
||||||
|
@ApiOperation(value = "Create user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/createWithArray",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Creates list of users with given input array", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/createWithList",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.POST)
|
||||||
|
ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Delete user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/{username}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.DELETE)
|
||||||
|
ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Get user by user name", notes = "", response = User.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = User.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/{username}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Logs user into the system", notes = "", response = String.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = String.class),
|
||||||
|
@ApiResponse(code = 400, message = "Invalid username/password supplied", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/login",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<String> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username, @NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password);
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Logs out current logged in user session", notes = "", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 200, message = "successful operation", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/logout",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.GET)
|
||||||
|
ResponseEntity<Void> logoutUser();
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "Updated user", notes = "This can only be done by the logged in user.", response = Void.class, tags={ "user", })
|
||||||
|
@ApiResponses(value = {
|
||||||
|
@ApiResponse(code = 400, message = "Invalid user supplied", response = Void.class),
|
||||||
|
@ApiResponse(code = 404, message = "User not found", response = Void.class) })
|
||||||
|
|
||||||
|
@RequestMapping(value = "/user/{username}",
|
||||||
|
produces = { "application/xml", "application/json" },
|
||||||
|
method = RequestMethod.PUT)
|
||||||
|
ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody User body);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,71 @@
|
|||||||
|
package io.swagger.api;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import io.swagger.model.User;
|
||||||
|
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestHeader;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RequestPart;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class UserApiController implements UserApi {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResponseEntity<Void> createUser(@ApiParam(value = "Created user object" ,required=true ) @Valid @RequestBody User body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> createUsersWithArrayInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> createUsersWithListInput(@ApiParam(value = "List of user object" ,required=true ) @Valid @RequestBody List<User> body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> deleteUser(@ApiParam(value = "The name that needs to be deleted",required=true ) @PathVariable("username") String username) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<User> getUserByName(@ApiParam(value = "The name that needs to be fetched. Use user1 for testing. ",required=true ) @PathVariable("username") String username) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<User>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<String> loginUser( @NotNull@ApiParam(value = "The user name for login", required = true) @RequestParam(value = "username", required = true) String username,
|
||||||
|
@NotNull@ApiParam(value = "The password for login in clear text", required = true) @RequestParam(value = "password", required = true) String password) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<String>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> logoutUser() {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResponseEntity<Void> updateUser(@ApiParam(value = "name that need to be deleted",required=true ) @PathVariable("username") String username,
|
||||||
|
@ApiParam(value = "Updated user object" ,required=true ) @Valid @RequestBody User body) {
|
||||||
|
// do some magic!
|
||||||
|
return new ResponseEntity<Void>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package io.swagger.configuration;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Home redirection to swagger api documentation
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class HomeController {
|
||||||
|
@RequestMapping(value = "/")
|
||||||
|
public String index() {
|
||||||
|
System.out.println("swagger-ui.html");
|
||||||
|
return "redirect:swagger-ui.html";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,40 @@
|
|||||||
|
package io.swagger.configuration;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.service.ApiInfo;
|
||||||
|
import springfox.documentation.service.Contact;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class SwaggerDocumentationConfig {
|
||||||
|
|
||||||
|
ApiInfo apiInfo() {
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
.title("Swagger Petstore")
|
||||||
|
.description("This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\")
|
||||||
|
.license("Apache 2.0")
|
||||||
|
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||||
|
.termsOfServiceUrl("")
|
||||||
|
.version("1.0.0")
|
||||||
|
.contact(new Contact("","", "apiteam@swagger.io"))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Docket customImplementation(){
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.select()
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("io.swagger.api"))
|
||||||
|
.build()
|
||||||
|
.directModelSubstitute(org.joda.time.LocalDate.class, java.sql.Date.class)
|
||||||
|
.directModelSubstitute(org.joda.time.DateTime.class, java.util.Date.class)
|
||||||
|
.apiInfo(apiInfo());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,123 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AdditionalPropertiesClass
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class AdditionalPropertiesClass {
|
||||||
|
@JsonProperty("map_property")
|
||||||
|
private Map<String, String> mapProperty = null;
|
||||||
|
|
||||||
|
@JsonProperty("map_of_map_property")
|
||||||
|
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
||||||
|
|
||||||
|
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||||
|
this.mapProperty = mapProperty;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||||
|
if (this.mapProperty == null) {
|
||||||
|
this.mapProperty = new HashMap<String, String>();
|
||||||
|
}
|
||||||
|
this.mapProperty.put(key, mapPropertyItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get mapProperty
|
||||||
|
* @return mapProperty
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public Map<String, String> getMapProperty() {
|
||||||
|
return mapProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapProperty(Map<String, String> mapProperty) {
|
||||||
|
this.mapProperty = mapProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||||
|
this.mapOfMapProperty = mapOfMapProperty;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||||
|
if (this.mapOfMapProperty == null) {
|
||||||
|
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
|
||||||
|
}
|
||||||
|
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get mapOfMapProperty
|
||||||
|
* @return mapOfMapProperty
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
||||||
|
return mapOfMapProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||||
|
this.mapOfMapProperty = mapOfMapProperty;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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.mapProperty, additionalPropertiesClass.mapProperty) &&
|
||||||
|
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(mapProperty, mapOfMapProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AdditionalPropertiesClass {\n");
|
||||||
|
|
||||||
|
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
|
||||||
|
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,111 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Animal
|
||||||
|
*/
|
||||||
|
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true )
|
||||||
|
@JsonSubTypes({
|
||||||
|
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||||
|
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||||
|
})
|
||||||
|
|
||||||
|
public class Animal {
|
||||||
|
@JsonProperty("className")
|
||||||
|
private String className = null;
|
||||||
|
|
||||||
|
@JsonProperty("color")
|
||||||
|
private String color = "red";
|
||||||
|
|
||||||
|
public Animal className(String className) {
|
||||||
|
this.className = className;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get className
|
||||||
|
* @return className
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import io.swagger.model.Animal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* AnimalFarm
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class AnimalFarm extends ArrayList<Animal> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(java.lang.Object o) {
|
||||||
|
if (this == o) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (o == null || getClass() != o.getClass()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(super.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("class AnimalFarm {\n");
|
||||||
|
sb.append(" ").append(toIndentedString(super.toString())).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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ArrayOfArrayOfNumberOnly
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ArrayOfArrayOfNumberOnly {
|
||||||
|
@JsonProperty("ArrayArrayNumber")
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,90 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ArrayOfNumberOnly
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ArrayOfNumberOnly {
|
||||||
|
@JsonProperty("ArrayNumber")
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,157 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.ReadOnlyFirst;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ArrayTest
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ArrayTest {
|
||||||
|
@JsonProperty("array_of_string")
|
||||||
|
private List<String> arrayOfString = null;
|
||||||
|
|
||||||
|
@JsonProperty("array_array_of_integer")
|
||||||
|
private List<List<Long>> arrayArrayOfInteger = null;
|
||||||
|
|
||||||
|
@JsonProperty("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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,203 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Capitalization
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Capitalization {
|
||||||
|
@JsonProperty("smallCamel")
|
||||||
|
private String smallCamel = null;
|
||||||
|
|
||||||
|
@JsonProperty("CapitalCamel")
|
||||||
|
private String capitalCamel = null;
|
||||||
|
|
||||||
|
@JsonProperty("small_Snake")
|
||||||
|
private String smallSnake = null;
|
||||||
|
|
||||||
|
@JsonProperty("Capital_Snake")
|
||||||
|
private String capitalSnake = null;
|
||||||
|
|
||||||
|
@JsonProperty("SCA_ETH_Flow_Points")
|
||||||
|
private String scAETHFlowPoints = null;
|
||||||
|
|
||||||
|
@JsonProperty("ATT_NAME")
|
||||||
|
private String ATT_NAME = null;
|
||||||
|
|
||||||
|
public Capitalization smallCamel(String smallCamel) {
|
||||||
|
this.smallCamel = smallCamel;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get smallCamel
|
||||||
|
* @return smallCamel
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cat
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Cat extends Animal {
|
||||||
|
@JsonProperty("declawed")
|
||||||
|
private Boolean declawed = null;
|
||||||
|
|
||||||
|
public Cat declawed(Boolean declawed) {
|
||||||
|
this.declawed = declawed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get declawed
|
||||||
|
* @return declawed
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Category
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Category {
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Long id = null;
|
||||||
|
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
|
public Category id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@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(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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for testing model with \"_class\" property
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||||
|
|
||||||
|
public class ClassModel {
|
||||||
|
@JsonProperty("_class")
|
||||||
|
private String propertyClass = null;
|
||||||
|
|
||||||
|
public ClassModel propertyClass(String propertyClass) {
|
||||||
|
this.propertyClass = propertyClass;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get propertyClass
|
||||||
|
* @return propertyClass
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Client
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Client {
|
||||||
|
@JsonProperty("client")
|
||||||
|
private String client = null;
|
||||||
|
|
||||||
|
public Client client(String client) {
|
||||||
|
this.client = client;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get client
|
||||||
|
* @return client
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.Animal;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dog
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Dog extends Animal {
|
||||||
|
@JsonProperty("breed")
|
||||||
|
private String breed = null;
|
||||||
|
|
||||||
|
public Dog breed(String breed) {
|
||||||
|
this.breed = breed;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get breed
|
||||||
|
* @return breed
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,176 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EnumArrays
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EnumArrays {
|
||||||
|
/**
|
||||||
|
* Gets or Sets justSymbol
|
||||||
|
*/
|
||||||
|
public enum JustSymbolEnum {
|
||||||
|
GREATER_THAN_OR_EQUAL_TO(">="),
|
||||||
|
|
||||||
|
DOLLAR("$");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
JustSymbolEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static JustSymbolEnum fromValue(String text) {
|
||||||
|
for (JustSymbolEnum b : JustSymbolEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("just_symbol")
|
||||||
|
private JustSymbolEnum justSymbol = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets arrayEnum
|
||||||
|
*/
|
||||||
|
public enum ArrayEnumEnum {
|
||||||
|
FISH("fish"),
|
||||||
|
|
||||||
|
CRAB("crab");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
ArrayEnumEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static ArrayEnumEnum fromValue(String text) {
|
||||||
|
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("array_enum")
|
||||||
|
private List<ArrayEnumEnum> arrayEnum = null;
|
||||||
|
|
||||||
|
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||||
|
this.justSymbol = justSymbol;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get justSymbol
|
||||||
|
* @return justSymbol
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets EnumClass
|
||||||
|
*/
|
||||||
|
public enum EnumClass {
|
||||||
|
|
||||||
|
_ABC("_abc"),
|
||||||
|
|
||||||
|
_EFG("-efg"),
|
||||||
|
|
||||||
|
_XYZ_("(xyz)");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
EnumClass(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static EnumClass fromValue(String text) {
|
||||||
|
for (EnumClass b : EnumClass.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,251 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.OuterEnum;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* EnumTest
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class EnumTest {
|
||||||
|
/**
|
||||||
|
* Gets or Sets enumString
|
||||||
|
*/
|
||||||
|
public enum EnumStringEnum {
|
||||||
|
UPPER("UPPER"),
|
||||||
|
|
||||||
|
LOWER("lower"),
|
||||||
|
|
||||||
|
EMPTY("");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
EnumStringEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static EnumStringEnum fromValue(String text) {
|
||||||
|
for (EnumStringEnum b : EnumStringEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("enum_string")
|
||||||
|
private EnumStringEnum enumString = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets enumInteger
|
||||||
|
*/
|
||||||
|
public enum EnumIntegerEnum {
|
||||||
|
NUMBER_1(1),
|
||||||
|
|
||||||
|
NUMBER_MINUS_1(-1);
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
EnumIntegerEnum(Integer value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static EnumIntegerEnum fromValue(String text) {
|
||||||
|
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("enum_integer")
|
||||||
|
private EnumIntegerEnum enumInteger = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets enumNumber
|
||||||
|
*/
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static EnumNumberEnum fromValue(String text) {
|
||||||
|
for (EnumNumberEnum b : EnumNumberEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("enum_number")
|
||||||
|
private EnumNumberEnum enumNumber = null;
|
||||||
|
|
||||||
|
@JsonProperty("outerEnum")
|
||||||
|
private OuterEnum outerEnum = null;
|
||||||
|
|
||||||
|
public EnumTest enumString(EnumStringEnum enumString) {
|
||||||
|
this.enumString = enumString;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get enumString
|
||||||
|
* @return enumString
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public EnumStringEnum getEnumString() {
|
||||||
|
return enumString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnumString(EnumStringEnum enumString) {
|
||||||
|
this.enumString = enumString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||||
|
this.enumInteger = enumInteger;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get enumInteger
|
||||||
|
* @return enumInteger
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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.enumInteger, enumTest.enumInteger) &&
|
||||||
|
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
|
||||||
|
Objects.equals(this.outerEnum, enumTest.outerEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(enumString, 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(" 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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,400 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.UUID;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import org.joda.time.LocalDate;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FormatTest
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class FormatTest {
|
||||||
|
@JsonProperty("integer")
|
||||||
|
private Integer integer = null;
|
||||||
|
|
||||||
|
@JsonProperty("int32")
|
||||||
|
private Integer int32 = null;
|
||||||
|
|
||||||
|
@JsonProperty("int64")
|
||||||
|
private Long int64 = null;
|
||||||
|
|
||||||
|
@JsonProperty("number")
|
||||||
|
private BigDecimal number = null;
|
||||||
|
|
||||||
|
@JsonProperty("float")
|
||||||
|
private Float _float = null;
|
||||||
|
|
||||||
|
@JsonProperty("double")
|
||||||
|
private Double _double = null;
|
||||||
|
|
||||||
|
@JsonProperty("string")
|
||||||
|
private String string = null;
|
||||||
|
|
||||||
|
@JsonProperty("byte")
|
||||||
|
private byte[] _byte = null;
|
||||||
|
|
||||||
|
@JsonProperty("binary")
|
||||||
|
private byte[] binary = null;
|
||||||
|
|
||||||
|
@JsonProperty("date")
|
||||||
|
private LocalDate date = null;
|
||||||
|
|
||||||
|
@JsonProperty("dateTime")
|
||||||
|
private DateTime dateTime = null;
|
||||||
|
|
||||||
|
@JsonProperty("uuid")
|
||||||
|
private UUID uuid = null;
|
||||||
|
|
||||||
|
@JsonProperty("password")
|
||||||
|
private String password = null;
|
||||||
|
|
||||||
|
public FormatTest integer(Integer integer) {
|
||||||
|
this.integer = integer;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get integer
|
||||||
|
* minimum: 10
|
||||||
|
* maximum: 100
|
||||||
|
* @return integer
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Min(10) @Max(100)
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Min(20) @Max(200)
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@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 = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
@DecimalMin("32.1") @DecimalMax("543.2")
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@DecimalMin("54.3") @DecimalMax("987.6")
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@DecimalMin("67.8") @DecimalMax("123.4")
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Pattern(regexp="/[a-z]/i")
|
||||||
|
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 = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
|
public byte[] getByte() {
|
||||||
|
return _byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setByte(byte[] _byte) {
|
||||||
|
this._byte = _byte;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormatTest binary(byte[] binary) {
|
||||||
|
this.binary = binary;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get binary
|
||||||
|
* @return binary
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public byte[] getBinary() {
|
||||||
|
return binary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBinary(byte[] binary) {
|
||||||
|
this.binary = binary;
|
||||||
|
}
|
||||||
|
|
||||||
|
public FormatTest date(LocalDate date) {
|
||||||
|
this.date = date;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get date
|
||||||
|
* @return date
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
@Size(min=10,max=64)
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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) &&
|
||||||
|
Objects.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);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, uuid, password);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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("}");
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* HasOnlyReadOnly
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class HasOnlyReadOnly {
|
||||||
|
@JsonProperty("bar")
|
||||||
|
private String bar = null;
|
||||||
|
|
||||||
|
@JsonProperty("foo")
|
||||||
|
private String foo = null;
|
||||||
|
|
||||||
|
public HasOnlyReadOnly bar(String bar) {
|
||||||
|
this.bar = bar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get bar
|
||||||
|
* @return bar
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public String getBar() {
|
||||||
|
return bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBar(String bar) {
|
||||||
|
this.bar = bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HasOnlyReadOnly foo(String foo) {
|
||||||
|
this.foo = foo;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get foo
|
||||||
|
* @return foo
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public String getFoo() {
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFoo(String foo) {
|
||||||
|
this.foo = 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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,155 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MapTest
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class MapTest {
|
||||||
|
@JsonProperty("map_map_of_string")
|
||||||
|
private Map<String, Map<String, String>> mapMapOfString = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets inner
|
||||||
|
*/
|
||||||
|
public enum InnerEnum {
|
||||||
|
UPPER("UPPER"),
|
||||||
|
|
||||||
|
LOWER("lower");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
InnerEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static InnerEnum fromValue(String text) {
|
||||||
|
for (InnerEnum b : InnerEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("map_of_enum_string")
|
||||||
|
private Map<String, InnerEnum> mapOfEnumString = 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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public Map<String, InnerEnum> getMapOfEnumString() {
|
||||||
|
return mapOfEnumString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
|
||||||
|
this.mapOfEnumString = mapOfEnumString;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@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);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(mapMapOfString, mapOfEnumString);
|
||||||
|
}
|
||||||
|
|
||||||
|
@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("}");
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,145 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.Animal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.UUID;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MixedPropertiesAndAdditionalPropertiesClass
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||||
|
@JsonProperty("uuid")
|
||||||
|
private UUID uuid = null;
|
||||||
|
|
||||||
|
@JsonProperty("dateTime")
|
||||||
|
private DateTime dateTime = null;
|
||||||
|
|
||||||
|
@JsonProperty("map")
|
||||||
|
private Map<String, Animal> map = null;
|
||||||
|
|
||||||
|
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||||
|
this.uuid = uuid;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get uuid
|
||||||
|
* @return uuid
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for testing model name starting with number
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Model for testing model name starting with number")
|
||||||
|
|
||||||
|
public class Model200Response {
|
||||||
|
@JsonProperty("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
@JsonProperty("class")
|
||||||
|
private String propertyClass = null;
|
||||||
|
|
||||||
|
public Model200Response name(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,128 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ModelApiResponse
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ModelApiResponse {
|
||||||
|
@JsonProperty("code")
|
||||||
|
private Integer code = null;
|
||||||
|
|
||||||
|
@JsonProperty("type")
|
||||||
|
private String type = null;
|
||||||
|
|
||||||
|
@JsonProperty("message")
|
||||||
|
private String message = null;
|
||||||
|
|
||||||
|
public ModelApiResponse code(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get code
|
||||||
|
* @return code
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,79 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for testing reserved words
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Model for testing reserved words")
|
||||||
|
|
||||||
|
public class ModelReturn {
|
||||||
|
@JsonProperty("return")
|
||||||
|
private Integer _return = null;
|
||||||
|
|
||||||
|
public ModelReturn _return(Integer _return) {
|
||||||
|
this._return = _return;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get _return
|
||||||
|
* @return _return
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,155 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model for testing model name same as property name
|
||||||
|
*/
|
||||||
|
@ApiModel(description = "Model for testing model name same as property name")
|
||||||
|
|
||||||
|
public class Name {
|
||||||
|
@JsonProperty("name")
|
||||||
|
private Integer name = null;
|
||||||
|
|
||||||
|
@JsonProperty("snake_case")
|
||||||
|
private Integer snakeCase = null;
|
||||||
|
|
||||||
|
@JsonProperty("property")
|
||||||
|
private String property = null;
|
||||||
|
|
||||||
|
@JsonProperty("123Number")
|
||||||
|
private Integer _123Number = null;
|
||||||
|
|
||||||
|
public Name name(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
* @return name
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(required = true, value = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(Integer name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Name snakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get snakeCase
|
||||||
|
* @return snakeCase
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getSnakeCase() {
|
||||||
|
return snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSnakeCase(Integer snakeCase) {
|
||||||
|
this.snakeCase = snakeCase;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Name property(String property) {
|
||||||
|
this.property = property;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get property
|
||||||
|
* @return property
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public String getProperty() {
|
||||||
|
return property;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProperty(String property) {
|
||||||
|
this.property = property;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Name _123Number(Integer _123Number) {
|
||||||
|
this._123Number = _123Number;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get _123Number
|
||||||
|
* @return _123Number
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public Integer get123Number() {
|
||||||
|
return _123Number;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void set123Number(Integer _123Number) {
|
||||||
|
this._123Number = _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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,80 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NumberOnly
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class NumberOnly {
|
||||||
|
@JsonProperty("JustNumber")
|
||||||
|
private BigDecimal justNumber = null;
|
||||||
|
|
||||||
|
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||||
|
this.justNumber = justNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get justNumber
|
||||||
|
* @return justNumber
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,239 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import org.joda.time.DateTime;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Order {
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Long id = null;
|
||||||
|
|
||||||
|
@JsonProperty("petId")
|
||||||
|
private Long petId = null;
|
||||||
|
|
||||||
|
@JsonProperty("quantity")
|
||||||
|
private Integer quantity = null;
|
||||||
|
|
||||||
|
@JsonProperty("shipDate")
|
||||||
|
private DateTime shipDate = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order Status
|
||||||
|
*/
|
||||||
|
public enum StatusEnum {
|
||||||
|
PLACED("placed"),
|
||||||
|
|
||||||
|
APPROVED("approved"),
|
||||||
|
|
||||||
|
DELIVERED("delivered");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
StatusEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static StatusEnum fromValue(String text) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("status")
|
||||||
|
private StatusEnum status = null;
|
||||||
|
|
||||||
|
@JsonProperty("complete")
|
||||||
|
private Boolean complete = false;
|
||||||
|
|
||||||
|
public Order id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,130 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OuterComposite
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class OuterComposite {
|
||||||
|
@JsonProperty("my_number")
|
||||||
|
private BigDecimal myNumber = null;
|
||||||
|
|
||||||
|
@JsonProperty("my_string")
|
||||||
|
private String myString = null;
|
||||||
|
|
||||||
|
@JsonProperty("my_boolean")
|
||||||
|
private Boolean myBoolean = null;
|
||||||
|
|
||||||
|
public OuterComposite myNumber(BigDecimal myNumber) {
|
||||||
|
this.myNumber = myNumber;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get myNumber
|
||||||
|
* @return myNumber
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets OuterEnum
|
||||||
|
*/
|
||||||
|
public enum OuterEnum {
|
||||||
|
|
||||||
|
PLACED("placed"),
|
||||||
|
|
||||||
|
APPROVED("approved"),
|
||||||
|
|
||||||
|
DELIVERED("delivered");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
OuterEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static OuterEnum fromValue(String text) {
|
||||||
|
for (OuterEnum b : OuterEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,258 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.model.Category;
|
||||||
|
import io.swagger.model.Tag;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Pet
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Pet {
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Long id = null;
|
||||||
|
|
||||||
|
@JsonProperty("category")
|
||||||
|
private Category category = null;
|
||||||
|
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
|
@JsonProperty("photoUrls")
|
||||||
|
private List<String> photoUrls = new ArrayList<String>();
|
||||||
|
|
||||||
|
@JsonProperty("tags")
|
||||||
|
private List<Tag> tags = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pet status in the store
|
||||||
|
*/
|
||||||
|
public enum StatusEnum {
|
||||||
|
AVAILABLE("available"),
|
||||||
|
|
||||||
|
PENDING("pending"),
|
||||||
|
|
||||||
|
SOLD("sold");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
StatusEnum(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@JsonValue
|
||||||
|
public String toString() {
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonCreator
|
||||||
|
public static StatusEnum fromValue(String text) {
|
||||||
|
for (StatusEnum b : StatusEnum.values()) {
|
||||||
|
if (String.valueOf(b.value).equals(text)) {
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("status")
|
||||||
|
private StatusEnum status = null;
|
||||||
|
|
||||||
|
public Pet id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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 = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Pet photoUrls(List<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 = "")
|
||||||
|
@NotNull
|
||||||
|
|
||||||
|
|
||||||
|
public List<String> getPhotoUrls() {
|
||||||
|
return photoUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPhotoUrls(List<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
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
@Valid
|
||||||
|
|
||||||
|
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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ReadOnlyFirst
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class ReadOnlyFirst {
|
||||||
|
@JsonProperty("bar")
|
||||||
|
private String bar = null;
|
||||||
|
|
||||||
|
@JsonProperty("baz")
|
||||||
|
private String baz = null;
|
||||||
|
|
||||||
|
public ReadOnlyFirst bar(String bar) {
|
||||||
|
this.bar = bar;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get bar
|
||||||
|
* @return bar
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(readOnly = true, value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public String getBar() {
|
||||||
|
return bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBar(String bar) {
|
||||||
|
this.bar = bar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReadOnlyFirst baz(String baz) {
|
||||||
|
this.baz = baz;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get baz
|
||||||
|
* @return baz
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SpecialModelName
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class SpecialModelName {
|
||||||
|
@JsonProperty("$special[property.name]")
|
||||||
|
private Long specialPropertyName = null;
|
||||||
|
|
||||||
|
public SpecialModelName specialPropertyName(Long specialPropertyName) {
|
||||||
|
this.specialPropertyName = specialPropertyName;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get specialPropertyName
|
||||||
|
* @return specialPropertyName
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
|
||||||
|
|
||||||
|
public Long getSpecialPropertyName() {
|
||||||
|
return specialPropertyName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSpecialPropertyName(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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,103 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tag
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class Tag {
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Long id = null;
|
||||||
|
|
||||||
|
@JsonProperty("name")
|
||||||
|
private String name = null;
|
||||||
|
|
||||||
|
public Tag id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,253 @@
|
|||||||
|
package io.swagger.model;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class User {
|
||||||
|
@JsonProperty("id")
|
||||||
|
private Long id = null;
|
||||||
|
|
||||||
|
@JsonProperty("username")
|
||||||
|
private String username = null;
|
||||||
|
|
||||||
|
@JsonProperty("firstName")
|
||||||
|
private String firstName = null;
|
||||||
|
|
||||||
|
@JsonProperty("lastName")
|
||||||
|
private String lastName = null;
|
||||||
|
|
||||||
|
@JsonProperty("email")
|
||||||
|
private String email = null;
|
||||||
|
|
||||||
|
@JsonProperty("password")
|
||||||
|
private String password = null;
|
||||||
|
|
||||||
|
@JsonProperty("phone")
|
||||||
|
private String phone = null;
|
||||||
|
|
||||||
|
@JsonProperty("userStatus")
|
||||||
|
private Integer userStatus = null;
|
||||||
|
|
||||||
|
public User id(Long id) {
|
||||||
|
this.id = id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id
|
||||||
|
* @return id
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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
|
||||||
|
**/
|
||||||
|
@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 ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
|||||||
|
springfox.documentation.swagger.v2.path=/api-docs
|
||||||
|
server.contextPath=/v2
|
||||||
|
server.port=80
|
||||||
|
spring.jackson.date-format=io.swagger.RFC3339DateFormat
|
||||||
|
spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false
|
@ -220,7 +220,7 @@ public class FormatTest {
|
|||||||
@ApiModelProperty(required = true, value = "")
|
@ApiModelProperty(required = true, value = "")
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|
||||||
|
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
|
||||||
public byte[] getByte() {
|
public byte[] getByte() {
|
||||||
return _byte;
|
return _byte;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user