forked from loafle/openapi-generator-original
Merge branch 'jfiala-jaxrs_beanval_final_4091'
This commit is contained in:
commit
fd7d251241
@ -1,6 +1,7 @@
|
||||
package io.swagger.codegen.languages;
|
||||
|
||||
import io.swagger.codegen.*;
|
||||
import io.swagger.codegen.languages.features.BeanValidationFeatures;
|
||||
import io.swagger.models.Operation;
|
||||
import io.swagger.models.Path;
|
||||
import io.swagger.models.Swagger;
|
||||
@ -10,7 +11,7 @@ import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen {
|
||||
public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen implements BeanValidationFeatures {
|
||||
/**
|
||||
* Name of the sub-directory in "src/main/resource" where to find the
|
||||
* Mustache template for the JAX-RS Codegen.
|
||||
@ -19,6 +20,9 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
protected String implFolder = "src/main/java";
|
||||
protected String testResourcesFolder = "src/test/resources";
|
||||
protected String title = "Swagger Server";
|
||||
|
||||
protected boolean useBeanValidation = true;
|
||||
|
||||
static Logger LOGGER = LoggerFactory.getLogger(AbstractJavaJAXRSServerCodegen.class);
|
||||
|
||||
public AbstractJavaJAXRSServerCodegen()
|
||||
@ -40,6 +44,8 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
cliOptions.add(new CliOption(CodegenConstants.IMPL_FOLDER, CodegenConstants.IMPL_FOLDER_DESC));
|
||||
cliOptions.add(new CliOption("title", "a title describing the application"));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -60,6 +66,15 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
if (additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {
|
||||
implFolder = (String) additionalProperties.get(CodegenConstants.IMPL_FOLDER);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||
}
|
||||
|
||||
if (useBeanValidation) {
|
||||
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -204,4 +219,9 @@ public abstract class AbstractJavaJAXRSServerCodegen extends AbstractJavaCodegen
|
||||
private String implFileFolder(String output) {
|
||||
return outputFolder + "/" + output + "/" + apiPackage().replace('.', '/');
|
||||
}
|
||||
|
||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||
this.useBeanValidation = useBeanValidation;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,8 +28,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
|
||||
protected boolean useJaxbAnnotations = true;
|
||||
|
||||
protected boolean useBeanValidation = false;
|
||||
|
||||
protected boolean generateSpringApplication = false;
|
||||
|
||||
protected boolean useSpringAnnotationConfig = false;
|
||||
@ -84,7 +82,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_JAXB_ANNOTATIONS, "Use JAXB annotations for XML"));
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
cliOptions.add(CliOption.newBoolean(GENERATE_SPRING_APPLICATION, "Generate Spring application"));
|
||||
cliOptions.add(CliOption.newBoolean(USE_SPRING_ANNOTATION_CONFIG, "Use Spring Annotation Config"));
|
||||
|
||||
@ -121,11 +118,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
this.setUseJaxbAnnotations(useJaxbAnnotationsProp);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||
boolean useBeanValidationProp = convertPropertyToBooleanAndWriteBack(USE_BEANVALIDATION);
|
||||
this.setUseBeanValidation(useBeanValidationProp);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(ADD_CONSUMES_PRODUCES_JSON)) {
|
||||
this.setAddConsumesProducesJson(convertPropertyToBooleanAndWriteBack(ADD_CONSUMES_PRODUCES_JSON));
|
||||
}
|
||||
@ -224,10 +216,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
return "Generates a Java JAXRS Server application based on Apache CXF framework.";
|
||||
}
|
||||
|
||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||
this.useBeanValidation = useBeanValidation;
|
||||
}
|
||||
|
||||
public void setGenerateSpringApplication(boolean generateSpringApplication) {
|
||||
this.generateSpringApplication = generateSpringApplication;
|
||||
}
|
||||
|
@ -21,9 +21,8 @@ import io.swagger.models.Swagger;
|
||||
import io.swagger.models.properties.Property;
|
||||
import io.swagger.util.Json;
|
||||
|
||||
public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen implements BeanValidationFeatures
|
||||
public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
{
|
||||
protected boolean useBeanValidation = true;
|
||||
|
||||
public JavaJAXRSSpecServerCodegen()
|
||||
{
|
||||
@ -71,8 +70,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen i
|
||||
library.setEnum(supportedLibraries);
|
||||
|
||||
cliOptions.add(library);
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -80,14 +77,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen i
|
||||
{
|
||||
super.processOpts();
|
||||
|
||||
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||
}
|
||||
|
||||
if (useBeanValidation) {
|
||||
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||
}
|
||||
|
||||
supportingFiles.clear(); // Don't need extra files provided by AbstractJAX-RS & Java Codegen
|
||||
writeOptional(outputFolder, new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||
|
||||
@ -159,9 +148,4 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen i
|
||||
{
|
||||
return "Generates a Java JAXRS Server according to JAXRS 2.0 specification.";
|
||||
}
|
||||
|
||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||
this.useBeanValidation = useBeanValidation;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,11 +9,10 @@ import java.util.*;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen implements BeanValidationFeatures {
|
||||
public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
|
||||
|
||||
protected static final String LIBRARY_JERSEY1 = "jersey1";
|
||||
protected static final String LIBRARY_JERSEY2 = "jersey2";
|
||||
protected boolean useBeanValidation = true;
|
||||
|
||||
/**
|
||||
* Default library template to use. (Default:{@value #DEFAULT_LIBRARY})
|
||||
@ -47,7 +46,6 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen impl
|
||||
|
||||
cliOptions.add(library);
|
||||
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1/2 library."));
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -88,14 +86,6 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen impl
|
||||
setLibrary(DEFAULT_LIBRARY);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||
}
|
||||
|
||||
if (useBeanValidation) {
|
||||
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||
}
|
||||
|
||||
if ( additionalProperties.containsKey(CodegenConstants.IMPL_FOLDER)) {
|
||||
implFolder = (String) additionalProperties.get(CodegenConstants.IMPL_FOLDER);
|
||||
}
|
||||
@ -172,8 +162,4 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen impl
|
||||
co.baseName = basePath;
|
||||
}
|
||||
|
||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||
this.useBeanValidation = useBeanValidation;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -10,9 +10,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
|
||||
public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen implements JbossFeature, BeanValidationFeatures {
|
||||
public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen implements JbossFeature {
|
||||
|
||||
protected boolean useBeanValidation = true;
|
||||
protected boolean generateJbossDeploymentDescriptor = true;
|
||||
|
||||
public JavaResteasyServerCodegen() {
|
||||
@ -37,7 +36,6 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
|
||||
|
||||
embeddedTemplateDir = templateDir = "JavaJaxRS" + File.separator + "resteasy";
|
||||
|
||||
cliOptions.add(CliOption.newBoolean(USE_BEANVALIDATION, "Use BeanValidation API annotations"));
|
||||
cliOptions.add(
|
||||
CliOption.newBoolean(GENERATE_JBOSS_DEPLOYMENT_DESCRIPTOR, "Generate Jboss Deployment Descriptor"));
|
||||
}
|
||||
@ -62,14 +60,6 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
|
||||
this.setGenerateJbossDeploymentDescriptor(generateJbossDeploymentDescriptorProp);
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
|
||||
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
|
||||
}
|
||||
|
||||
if (useBeanValidation) {
|
||||
writePropertyBack(USE_BEANVALIDATION, useBeanValidation);
|
||||
}
|
||||
|
||||
writeOptional(outputFolder, new SupportingFile("pom.mustache", "", "pom.xml"));
|
||||
writeOptional(outputFolder, new SupportingFile("gradle.mustache", "", "build.gradle"));
|
||||
writeOptional(outputFolder, new SupportingFile("settingsGradle.mustache", "", "settings.gradle"));
|
||||
@ -226,10 +216,6 @@ public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen im
|
||||
return objs;
|
||||
}
|
||||
|
||||
public void setUseBeanValidation(boolean useBeanValidation) {
|
||||
this.useBeanValidation = useBeanValidation;
|
||||
}
|
||||
|
||||
public void setGenerateJbossDeploymentDescriptor(boolean generateJbossDeploymentDescriptor) {
|
||||
this.generateJbossDeploymentDescriptor = generateJbossDeploymentDescriptor;
|
||||
}
|
||||
|
@ -32,21 +32,22 @@
|
||||
{{^minItems}}
|
||||
{{#maxItems}}
|
||||
@Size(max={{maxItems}})
|
||||
{{/maxItems}}
|
||||
{{/minItems}}
|
||||
{{/maxItems}}
|
||||
{{/minItems}}
|
||||
{{! check for integer / number=decimal type}}
|
||||
{{#isInteger}}
|
||||
{{#minimum}}
|
||||
{{#isInteger}}
|
||||
@Min({{minimum}})
|
||||
{{/isInteger}}
|
||||
{{#isLong}}
|
||||
@Min({{minimum}})
|
||||
{{/isLong}}
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
{{#isInteger}}
|
||||
@Max({{maximum}})
|
||||
{{/isInteger}}
|
||||
{{#isLong}}
|
||||
@Max({{maximum}})
|
||||
{{/isLong}}
|
||||
{{/maximum}}
|
||||
{{/isInteger}}
|
||||
{{^isInteger}}
|
||||
{{#minimum}}
|
||||
@DecimalMin("{{minimum}}")
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
@DecimalMax("{{maximum}}")
|
||||
{{/maximum}}
|
||||
{{/isInteger}}
|
@ -32,11 +32,22 @@
|
||||
{{^minItems}}
|
||||
{{#maxItems}}
|
||||
@Size(max={{maxItems}})
|
||||
{{/maxItems}}
|
||||
{{/minItems}}
|
||||
{{/maxItems}}
|
||||
{{/minItems}}
|
||||
{{! check for integer / number=decimal type}}
|
||||
{{#isInteger}}
|
||||
{{#minimum}}
|
||||
@Min({{minimum}})
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
@Max({{maximum}})
|
||||
{{/maximum}}
|
||||
{{/isInteger}}
|
||||
{{^isInteger}}
|
||||
{{#minimum}}
|
||||
@DecimalMin("{{minimum}}")
|
||||
{{/minimum}}
|
||||
{{#maximum}}
|
||||
@DecimalMax("{{maximum}}")
|
||||
{{/maximum}}
|
||||
{{/isInteger}}
|
@ -16,6 +16,7 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.jaxrs.PATCH;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Path("/")
|
||||
@Api(value = "/", description = "")
|
||||
@ -40,6 +41,6 @@ public interface FakeApi {
|
||||
@Consumes({ "*/*" })
|
||||
@Produces({ "*/*" })
|
||||
@ApiOperation(value = "To test enum parameters", tags={ "fake" })
|
||||
public void testEnumParameters(@Multipart(value = "enumFormStringArray", required = false) List<String> enumFormStringArray, @Multipart(value = "enumFormString", required = false) String enumFormString, @HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array")List<String> enumQueryStringArray, @QueryParam("enum_query_string")String enumQueryString, @QueryParam("enum_query_integer")Integer enumQueryInteger, @Multipart(value = "enumQueryDouble", required = false) Double enumQueryDouble);
|
||||
public void testEnumParameters(@Multipart(value = "enumFormStringArray", required = false) List<String> enumFormStringArray, @Multipart(value = "enumFormString", required = false) String enumFormString, @HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray, @HeaderParam("enum_header_string") String enumHeaderString, @QueryParam("enum_query_string_array") List<String> enumQueryStringArray, @QueryParam("enum_query_string") String enumQueryString, @QueryParam("enum_query_integer") Integer enumQueryInteger, @Multipart(value = "enumQueryDouble", required = false) Double enumQueryDouble);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.jaxrs.PATCH;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Path("/")
|
||||
@Api(value = "/", description = "")
|
||||
@ -38,13 +39,13 @@ public interface PetApi {
|
||||
@Path("/pet/findByStatus")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@ApiOperation(value = "Finds Pets by status", tags={ "pet", })
|
||||
public List<Pet> findPetsByStatus(@QueryParam("status")List<String> status);
|
||||
public List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
|
||||
|
||||
@GET
|
||||
@Path("/pet/findByTags")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@ApiOperation(value = "Finds Pets by tags", tags={ "pet", })
|
||||
public List<Pet> findPetsByTags(@QueryParam("tags")List<String> tags);
|
||||
public List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
|
||||
|
||||
@GET
|
||||
@Path("/pet/{petId}")
|
||||
|
@ -15,6 +15,7 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.jaxrs.PATCH;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Path("/")
|
||||
@Api(value = "/", description = "")
|
||||
|
@ -15,6 +15,7 @@ import org.apache.cxf.jaxrs.ext.multipart.*;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.jaxrs.PATCH;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Path("/")
|
||||
@Api(value = "/", description = "")
|
||||
@ -54,7 +55,7 @@ public interface UserApi {
|
||||
@Path("/user/login")
|
||||
@Produces({ "application/xml", "application/json" })
|
||||
@ApiOperation(value = "Logs user into the system", tags={ "user", })
|
||||
public String loginUser(@QueryParam("username")String username, @QueryParam("password")String password);
|
||||
public String loginUser(@QueryParam("username") @NotNull String username, @QueryParam("password") @NotNull String password);
|
||||
|
||||
@GET
|
||||
@Path("/user/logout")
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -27,9 +28,21 @@ public class AdditionalPropertiesClass {
|
||||
public Map<String, String> getMapProperty() {
|
||||
return mapProperty;
|
||||
}
|
||||
|
||||
public void setMapProperty(Map<String, String> mapProperty) {
|
||||
this.mapProperty = mapProperty;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||
this.mapProperty = mapProperty;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||
this.mapProperty.put(key, mapPropertyItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapOfMapProperty
|
||||
* @return mapOfMapProperty
|
||||
@ -37,10 +50,22 @@ public class AdditionalPropertiesClass {
|
||||
public Map<String, Map<String, String>> getMapOfMapProperty() {
|
||||
return mapOfMapProperty;
|
||||
}
|
||||
|
||||
public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
this.mapOfMapProperty = mapOfMapProperty;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass mapOfMapProperty(Map<String, Map<String, String>> mapOfMapProperty) {
|
||||
this.mapOfMapProperty = mapOfMapProperty;
|
||||
return this;
|
||||
}
|
||||
|
||||
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -23,12 +24,20 @@ public class Animal {
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@NotNull
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Animal className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
@ -36,10 +45,17 @@ public class Animal {
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Animal color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import io.swagger.model.Animal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -25,10 +26,22 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
public List<List<BigDecimal>> getArrayArrayNumber() {
|
||||
return arrayArrayNumber;
|
||||
}
|
||||
|
||||
public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
this.arrayArrayNumber = arrayArrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
|
||||
this.arrayArrayNumber.add(arrayArrayNumberItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -25,10 +26,22 @@ public class ArrayOfNumberOnly {
|
||||
public List<BigDecimal> getArrayNumber() {
|
||||
return arrayNumber;
|
||||
}
|
||||
|
||||
public void setArrayNumber(List<BigDecimal> arrayNumber) {
|
||||
this.arrayNumber = arrayNumber;
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
this.arrayNumber = arrayNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
|
||||
this.arrayNumber.add(arrayNumberItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import io.swagger.model.ReadOnlyFirst;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -29,9 +30,21 @@ public class ArrayTest {
|
||||
public List<String> getArrayOfString() {
|
||||
return arrayOfString;
|
||||
}
|
||||
|
||||
public void setArrayOfString(List<String> arrayOfString) {
|
||||
this.arrayOfString = arrayOfString;
|
||||
}
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
this.arrayOfString = arrayOfString;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
|
||||
this.arrayOfString.add(arrayOfStringItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayArrayOfInteger
|
||||
* @return arrayArrayOfInteger
|
||||
@ -39,9 +52,21 @@ public class ArrayTest {
|
||||
public List<List<Long>> getArrayArrayOfInteger() {
|
||||
return arrayArrayOfInteger;
|
||||
}
|
||||
|
||||
public void setArrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
|
||||
this.arrayArrayOfInteger = arrayArrayOfInteger;
|
||||
}
|
||||
|
||||
public ArrayTest arrayArrayOfInteger(List<List<Long>> arrayArrayOfInteger) {
|
||||
this.arrayArrayOfInteger = arrayArrayOfInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
|
||||
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayArrayOfModel
|
||||
* @return arrayArrayOfModel
|
||||
@ -49,10 +74,22 @@ public class ArrayTest {
|
||||
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
|
||||
return arrayArrayOfModel;
|
||||
}
|
||||
|
||||
public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
|
||||
this.arrayArrayOfModel = arrayArrayOfModel;
|
||||
}
|
||||
|
||||
public ArrayTest arrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {
|
||||
this.arrayArrayOfModel = arrayArrayOfModel;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
|
||||
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -32,9 +33,16 @@ public class Capitalization {
|
||||
public String getSmallCamel() {
|
||||
return smallCamel;
|
||||
}
|
||||
|
||||
public void setSmallCamel(String smallCamel) {
|
||||
this.smallCamel = smallCamel;
|
||||
}
|
||||
|
||||
public Capitalization smallCamel(String smallCamel) {
|
||||
this.smallCamel = smallCamel;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get capitalCamel
|
||||
* @return capitalCamel
|
||||
@ -42,9 +50,16 @@ public class Capitalization {
|
||||
public String getCapitalCamel() {
|
||||
return capitalCamel;
|
||||
}
|
||||
|
||||
public void setCapitalCamel(String capitalCamel) {
|
||||
this.capitalCamel = capitalCamel;
|
||||
}
|
||||
|
||||
public Capitalization capitalCamel(String capitalCamel) {
|
||||
this.capitalCamel = capitalCamel;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get smallSnake
|
||||
* @return smallSnake
|
||||
@ -52,9 +67,16 @@ public class Capitalization {
|
||||
public String getSmallSnake() {
|
||||
return smallSnake;
|
||||
}
|
||||
|
||||
public void setSmallSnake(String smallSnake) {
|
||||
this.smallSnake = smallSnake;
|
||||
}
|
||||
|
||||
public Capitalization smallSnake(String smallSnake) {
|
||||
this.smallSnake = smallSnake;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get capitalSnake
|
||||
* @return capitalSnake
|
||||
@ -62,9 +84,16 @@ public class Capitalization {
|
||||
public String getCapitalSnake() {
|
||||
return capitalSnake;
|
||||
}
|
||||
|
||||
public void setCapitalSnake(String capitalSnake) {
|
||||
this.capitalSnake = capitalSnake;
|
||||
}
|
||||
|
||||
public Capitalization capitalSnake(String capitalSnake) {
|
||||
this.capitalSnake = capitalSnake;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scAETHFlowPoints
|
||||
* @return scAETHFlowPoints
|
||||
@ -72,9 +101,16 @@ public class Capitalization {
|
||||
public String getScAETHFlowPoints() {
|
||||
return scAETHFlowPoints;
|
||||
}
|
||||
|
||||
public void setScAETHFlowPoints(String scAETHFlowPoints) {
|
||||
this.scAETHFlowPoints = scAETHFlowPoints;
|
||||
}
|
||||
|
||||
public Capitalization scAETHFlowPoints(String scAETHFlowPoints) {
|
||||
this.scAETHFlowPoints = scAETHFlowPoints;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Name of the pet
|
||||
* @return ATT_NAME
|
||||
@ -82,10 +118,17 @@ public class Capitalization {
|
||||
public String getATTNAME() {
|
||||
return ATT_NAME;
|
||||
}
|
||||
|
||||
public void setATTNAME(String ATT_NAME) {
|
||||
this.ATT_NAME = ATT_NAME;
|
||||
}
|
||||
|
||||
public Capitalization ATT_NAME(String ATT_NAME) {
|
||||
this.ATT_NAME = ATT_NAME;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.model.Animal;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -23,10 +24,17 @@ public class Cat extends Animal {
|
||||
public Boolean getDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -24,10 +25,17 @@ public class ClassModel {
|
||||
public String getPropertyClass() {
|
||||
return propertyClass;
|
||||
}
|
||||
|
||||
public void setPropertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
}
|
||||
|
||||
public ClassModel propertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -22,10 +23,17 @@ public class Client {
|
||||
public String getClient() {
|
||||
return client;
|
||||
}
|
||||
|
||||
public void setClient(String client) {
|
||||
this.client = client;
|
||||
}
|
||||
|
||||
public Client client(String client) {
|
||||
this.client = client;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.model.Animal;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -23,10 +24,17 @@ public class Dog extends Animal {
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -92,9 +93,16 @@ public enum ArrayEnumEnum {
|
||||
public JustSymbolEnum getJustSymbol() {
|
||||
return justSymbol;
|
||||
}
|
||||
|
||||
public void setJustSymbol(JustSymbolEnum justSymbol) {
|
||||
this.justSymbol = justSymbol;
|
||||
}
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
this.justSymbol = justSymbol;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get arrayEnum
|
||||
* @return arrayEnum
|
||||
@ -102,10 +110,22 @@ public enum ArrayEnumEnum {
|
||||
public List<ArrayEnumEnum> getArrayEnum() {
|
||||
return arrayEnum;
|
||||
}
|
||||
|
||||
public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {
|
||||
this.arrayEnum = arrayEnum;
|
||||
}
|
||||
|
||||
public EnumArrays arrayEnum(List<ArrayEnumEnum> arrayEnum) {
|
||||
this.arrayEnum = arrayEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
|
||||
this.arrayEnum.add(arrayEnumItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.model.OuterEnum;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -128,9 +129,16 @@ public enum EnumNumberEnum {
|
||||
public EnumStringEnum getEnumString() {
|
||||
return enumString;
|
||||
}
|
||||
|
||||
public void setEnumString(EnumStringEnum enumString) {
|
||||
this.enumString = enumString;
|
||||
}
|
||||
|
||||
public EnumTest enumString(EnumStringEnum enumString) {
|
||||
this.enumString = enumString;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enumInteger
|
||||
* @return enumInteger
|
||||
@ -138,9 +146,16 @@ public enum EnumNumberEnum {
|
||||
public EnumIntegerEnum getEnumInteger() {
|
||||
return enumInteger;
|
||||
}
|
||||
|
||||
public void setEnumInteger(EnumIntegerEnum enumInteger) {
|
||||
this.enumInteger = enumInteger;
|
||||
}
|
||||
|
||||
public EnumTest enumInteger(EnumIntegerEnum enumInteger) {
|
||||
this.enumInteger = enumInteger;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enumNumber
|
||||
* @return enumNumber
|
||||
@ -148,9 +163,16 @@ public enum EnumNumberEnum {
|
||||
public EnumNumberEnum getEnumNumber() {
|
||||
return enumNumber;
|
||||
}
|
||||
|
||||
public void setEnumNumber(EnumNumberEnum enumNumber) {
|
||||
this.enumNumber = enumNumber;
|
||||
}
|
||||
|
||||
public EnumTest enumNumber(EnumNumberEnum enumNumber) {
|
||||
this.enumNumber = enumNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get outerEnum
|
||||
* @return outerEnum
|
||||
@ -158,10 +180,17 @@ public enum EnumNumberEnum {
|
||||
public OuterEnum getOuterEnum() {
|
||||
return outerEnum;
|
||||
}
|
||||
|
||||
public void setOuterEnum(OuterEnum outerEnum) {
|
||||
this.outerEnum = outerEnum;
|
||||
}
|
||||
|
||||
public EnumTest outerEnum(OuterEnum outerEnum) {
|
||||
this.outerEnum = outerEnum;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.LocalDate;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -47,24 +48,42 @@ public class FormatTest {
|
||||
* maximum: 100
|
||||
* @return integer
|
||||
**/
|
||||
@Min(10)
|
||||
@Max(100)
|
||||
public Integer getInteger() {
|
||||
return integer;
|
||||
}
|
||||
|
||||
public void setInteger(Integer integer) {
|
||||
this.integer = integer;
|
||||
}
|
||||
|
||||
public FormatTest integer(Integer integer) {
|
||||
this.integer = integer;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get int32
|
||||
* minimum: 20
|
||||
* maximum: 200
|
||||
* @return int32
|
||||
**/
|
||||
@Min(20)
|
||||
@Max(200)
|
||||
public Integer getInt32() {
|
||||
return int32;
|
||||
}
|
||||
|
||||
public void setInt32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
}
|
||||
|
||||
public FormatTest int32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get int64
|
||||
* @return int64
|
||||
@ -72,65 +91,116 @@ public class FormatTest {
|
||||
public Long getInt64() {
|
||||
return int64;
|
||||
}
|
||||
|
||||
public void setInt64(Long int64) {
|
||||
this.int64 = int64;
|
||||
}
|
||||
|
||||
public FormatTest int64(Long int64) {
|
||||
this.int64 = int64;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get number
|
||||
* minimum: 32.1
|
||||
* maximum: 543.2
|
||||
* @return number
|
||||
**/
|
||||
@NotNull
|
||||
@DecimalMin("32.1")
|
||||
@DecimalMax("543.2")
|
||||
public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
public FormatTest number(BigDecimal number) {
|
||||
this.number = number;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get _float
|
||||
* minimum: 54.3
|
||||
* maximum: 987.6
|
||||
* @return _float
|
||||
**/
|
||||
@DecimalMin("54.3")
|
||||
@DecimalMax("987.6")
|
||||
public Float getFloat() {
|
||||
return _float;
|
||||
}
|
||||
|
||||
public void setFloat(Float _float) {
|
||||
this._float = _float;
|
||||
}
|
||||
|
||||
public FormatTest _float(Float _float) {
|
||||
this._float = _float;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get _double
|
||||
* minimum: 67.8
|
||||
* maximum: 123.4
|
||||
* @return _double
|
||||
**/
|
||||
@DecimalMin("67.8")
|
||||
@DecimalMax("123.4")
|
||||
public Double getDouble() {
|
||||
return _double;
|
||||
}
|
||||
|
||||
public void setDouble(Double _double) {
|
||||
this._double = _double;
|
||||
}
|
||||
|
||||
public FormatTest _double(Double _double) {
|
||||
this._double = _double;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get string
|
||||
* @return string
|
||||
**/
|
||||
@Pattern(regexp="/[a-z]/i")
|
||||
public String getString() {
|
||||
return string;
|
||||
}
|
||||
|
||||
public void setString(String string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
public FormatTest string(String string) {
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get _byte
|
||||
* @return _byte
|
||||
**/
|
||||
@NotNull
|
||||
public byte[] getByte() {
|
||||
return _byte;
|
||||
}
|
||||
|
||||
public void setByte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
}
|
||||
|
||||
public FormatTest _byte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get binary
|
||||
* @return binary
|
||||
@ -138,19 +208,34 @@ public class FormatTest {
|
||||
public byte[] getBinary() {
|
||||
return binary;
|
||||
}
|
||||
|
||||
public void setBinary(byte[] binary) {
|
||||
this.binary = binary;
|
||||
}
|
||||
|
||||
public FormatTest binary(byte[] binary) {
|
||||
this.binary = binary;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get date
|
||||
* @return date
|
||||
**/
|
||||
@NotNull
|
||||
public LocalDate getDate() {
|
||||
return date;
|
||||
}
|
||||
|
||||
public void setDate(LocalDate date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
public FormatTest date(LocalDate date) {
|
||||
this.date = date;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dateTime
|
||||
* @return dateTime
|
||||
@ -158,9 +243,16 @@ public class FormatTest {
|
||||
public javax.xml.datatype.XMLGregorianCalendar getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public FormatTest dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get uuid
|
||||
* @return uuid
|
||||
@ -168,20 +260,36 @@ public class FormatTest {
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public FormatTest uuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get password
|
||||
* @return password
|
||||
**/
|
||||
@NotNull
|
||||
@Size(min=10,max=64)
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public FormatTest password(String password) {
|
||||
this.password = password;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -24,9 +25,8 @@ public class HasOnlyReadOnly {
|
||||
public String getBar() {
|
||||
return bar;
|
||||
}
|
||||
public void setBar(String bar) {
|
||||
this.bar = bar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get foo
|
||||
* @return foo
|
||||
@ -34,9 +34,8 @@ public class HasOnlyReadOnly {
|
||||
public String getFoo() {
|
||||
return foo;
|
||||
}
|
||||
public void setFoo(String foo) {
|
||||
this.foo = foo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
@ -3,6 +3,7 @@ package io.swagger.model;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -60,9 +61,21 @@ public enum InnerEnum {
|
||||
public Map<String, Map<String, String>> getMapMapOfString() {
|
||||
return mapMapOfString;
|
||||
}
|
||||
|
||||
public void setMapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
}
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
this.mapMapOfString = mapMapOfString;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
|
||||
this.mapMapOfString.put(key, mapMapOfStringItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get mapOfEnumString
|
||||
* @return mapOfEnumString
|
||||
@ -70,10 +83,22 @@ public enum InnerEnum {
|
||||
public Map<String, InnerEnum> getMapOfEnumString() {
|
||||
return mapOfEnumString;
|
||||
}
|
||||
|
||||
public void setMapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
|
||||
this.mapOfEnumString = mapOfEnumString;
|
||||
}
|
||||
|
||||
public MapTest mapOfEnumString(Map<String, InnerEnum> mapOfEnumString) {
|
||||
this.mapOfEnumString = mapOfEnumString;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
|
||||
this.mapOfEnumString.put(key, mapOfEnumStringItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -4,6 +4,7 @@ import io.swagger.model.Animal;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -30,9 +31,16 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
public String getUuid() {
|
||||
return uuid;
|
||||
}
|
||||
|
||||
public void setUuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(String uuid) {
|
||||
this.uuid = uuid;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get dateTime
|
||||
* @return dateTime
|
||||
@ -40,9 +48,16 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
public javax.xml.datatype.XMLGregorianCalendar getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
|
||||
public void setDateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass dateTime(javax.xml.datatype.XMLGregorianCalendar dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get map
|
||||
* @return map
|
||||
@ -50,10 +65,22 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
public Map<String, Animal> getMap() {
|
||||
return map;
|
||||
}
|
||||
|
||||
public void setMap(Map<String, Animal> map) {
|
||||
this.map = map;
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass map(Map<String, Animal> map) {
|
||||
this.map = map;
|
||||
return this;
|
||||
}
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
|
||||
this.map.put(key, mapItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -26,9 +27,16 @@ public class Model200Response {
|
||||
public Integer getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(Integer name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Model200Response name(Integer name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get propertyClass
|
||||
* @return propertyClass
|
||||
@ -36,10 +44,17 @@ public class Model200Response {
|
||||
public String getPropertyClass() {
|
||||
return propertyClass;
|
||||
}
|
||||
|
||||
public void setPropertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
}
|
||||
|
||||
public Model200Response propertyClass(String propertyClass) {
|
||||
this.propertyClass = propertyClass;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -24,10 +25,17 @@ public class ModelReturn {
|
||||
public Integer getReturn() {
|
||||
return _return;
|
||||
}
|
||||
|
||||
public void setReturn(Integer _return) {
|
||||
this._return = _return;
|
||||
}
|
||||
|
||||
public ModelReturn _return(Integer _return) {
|
||||
this._return = _return;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -27,12 +28,20 @@ public class Name {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@NotNull
|
||||
public Integer getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(Integer name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Name name(Integer name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get snakeCase
|
||||
* @return snakeCase
|
||||
@ -40,9 +49,8 @@ public class Name {
|
||||
public Integer getSnakeCase() {
|
||||
return snakeCase;
|
||||
}
|
||||
public void setSnakeCase(Integer snakeCase) {
|
||||
this.snakeCase = snakeCase;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get property
|
||||
* @return property
|
||||
@ -50,9 +58,16 @@ public class Name {
|
||||
public String getProperty() {
|
||||
return property;
|
||||
}
|
||||
|
||||
public void setProperty(String property) {
|
||||
this.property = property;
|
||||
}
|
||||
|
||||
public Name property(String property) {
|
||||
this.property = property;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get _123Number
|
||||
* @return _123Number
|
||||
@ -60,9 +75,8 @@ public class Name {
|
||||
public Integer get123Number() {
|
||||
return _123Number;
|
||||
}
|
||||
public void set123Number(Integer _123Number) {
|
||||
this._123Number = _123Number;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -23,10 +24,17 @@ public class NumberOnly {
|
||||
public BigDecimal getJustNumber() {
|
||||
return justNumber;
|
||||
}
|
||||
|
||||
public void setJustNumber(BigDecimal justNumber) {
|
||||
this.justNumber = justNumber;
|
||||
}
|
||||
|
||||
public NumberOnly justNumber(BigDecimal justNumber) {
|
||||
this.justNumber = justNumber;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
@ -4,6 +4,7 @@ import io.swagger.model.Category;
|
||||
import io.swagger.model.Tag;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -100,6 +101,7 @@ public enum StatusEnum {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@ -117,6 +119,7 @@ public enum StatusEnum {
|
||||
* Get photoUrls
|
||||
* @return photoUrls
|
||||
**/
|
||||
@NotNull
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -24,9 +25,8 @@ public class ReadOnlyFirst {
|
||||
public String getBar() {
|
||||
return bar;
|
||||
}
|
||||
public void setBar(String bar) {
|
||||
this.bar = bar;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get baz
|
||||
* @return baz
|
||||
@ -34,10 +34,17 @@ public class ReadOnlyFirst {
|
||||
public String getBaz() {
|
||||
return baz;
|
||||
}
|
||||
|
||||
public void setBaz(String baz) {
|
||||
this.baz = baz;
|
||||
}
|
||||
|
||||
public ReadOnlyFirst baz(String baz) {
|
||||
this.baz = baz;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
@ -22,10 +23,17 @@ public class SpecialModelName {
|
||||
public Long getSpecialPropertyName() {
|
||||
return specialPropertyName;
|
||||
}
|
||||
|
||||
public void setSpecialPropertyName(Long specialPropertyName) {
|
||||
this.specialPropertyName = specialPropertyName;
|
||||
}
|
||||
|
||||
public SpecialModelName specialPropertyName(Long specialPropertyName) {
|
||||
this.specialPropertyName = specialPropertyName;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package io.swagger.model;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
|
@ -138,6 +138,14 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</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>
|
||||
<repositories>
|
||||
<repository>
|
||||
|
@ -108,8 +108,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"enum" : [ "available", "pending", "sold" ],
|
||||
"default" : "available"
|
||||
"default" : "available",
|
||||
"enum" : [ "available", "pending", "sold" ]
|
||||
},
|
||||
"collectionFormat" : "csv"
|
||||
} ],
|
||||
@ -650,8 +650,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_form_string",
|
||||
@ -669,8 +669,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_header_string",
|
||||
@ -688,8 +688,8 @@
|
||||
"type" : "array",
|
||||
"items" : {
|
||||
"type" : "string",
|
||||
"enum" : [ ">", "$" ],
|
||||
"default" : "$"
|
||||
"default" : "$",
|
||||
"enum" : [ ">", "$" ]
|
||||
}
|
||||
}, {
|
||||
"name" : "enum_query_string",
|
||||
|
Loading…
x
Reference in New Issue
Block a user