diff --git a/bin/jaxrs-spec-petstore-server-interface.sh b/bin/jaxrs-spec-petstore-server-interface.sh index 3b28a0972f5..d47718f2788 100755 --- a/bin/jaxrs-spec-petstore-server-interface.sh +++ b/bin/jaxrs-spec-petstore-server-interface.sh @@ -28,6 +28,7 @@ fi export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface -DhideGenerationTimestamp=true +-DserializableModel=true -DinterfaceOnly=true" java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server.sh b/bin/jaxrs-spec-petstore-server.sh index 9482e1a8972..5350bab881c 100755 --- a/bin/jaxrs-spec-petstore-server.sh +++ b/bin/jaxrs-spec-petstore-server.sh @@ -27,6 +27,7 @@ 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 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l jaxrs-spec -o samples/server/petstore/jaxrs-spec --DhideGenerationTimestamp=true" +-DhideGenerationTimestamp=true +-DserializableModel=true" java $JAVA_OPTS -jar $executable $ags diff --git a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache index 6dd72bcb4e9..3fb7e3cfb9d 100644 --- a/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache +++ b/modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/model.mustache @@ -2,6 +2,9 @@ package {{package}}; {{#imports}}import {{import}}; {{/imports}} +{{#serializableModel}} +import java.io.Serializable; +{{/serializableModel}} {{#useBeanValidation}} import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RestApplication.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RestApplication.java new file mode 100644 index 00000000000..2561172aea9 --- /dev/null +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/api/RestApplication.java @@ -0,0 +1,9 @@ +package io.swagger.api; + +import javax.ws.rs.ApplicationPath; +import javax.ws.rs.core.Application; + +@ApplicationPath("/") +public class RestApplication extends Application { + +} diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 17c61771f7c..820bb4a2f18 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapProperty = new HashMap(); private @Valid Map> mapOfMapProperty = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java index cc18f7fa3a5..f7aef656d44 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Animal.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -10,7 +11,7 @@ import java.util.Objects; -public class Animal { +public class Animal implements Serializable { private @Valid String className = null; private @Valid String color = "red"; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java index a730cb5ffc7..ca03cafd3ef 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/AnimalFarm.java @@ -3,6 +3,7 @@ import io.swagger.model.Animal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class AnimalFarm extends ArrayList { +public class AnimalFarm extends ArrayList implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 874660a2ef0..558c55d50e1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -3,6 +3,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 2a3980fbd37..780c9bf0df8 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -3,6 +3,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java index ec75158891a..f6ef76af0d6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ArrayTest.java @@ -3,6 +3,7 @@ import io.swagger.model.ReadOnlyFirst; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayTest { +public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList(); private @Valid List> arrayArrayOfInteger = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java index 25bbfd84e38..385c622b0ba 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Capitalization.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Capitalization { +public class Capitalization implements Serializable { private @Valid String smallCamel = null; private @Valid String capitalCamel = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java index fc259678da3..f334fcd1914 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Cat.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Cat extends Animal { +public class Cat extends Animal implements Serializable { private @Valid Boolean declawed = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java index df544c396db..5cee21d0404 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Category.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Category { +public class Category implements Serializable { private @Valid Long id = null; private @Valid String name = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java index ec28d98861d..faa4cf796cb 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ClassModel.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model with \"_class\" property") -public class ClassModel { +public class ClassModel implements Serializable { private @Valid String propertyClass = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java index 57bcea24a47..55a8b4e31c0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Client.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Client { +public class Client implements Serializable { private @Valid String client = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java index 529d49d8ce2..e55012815c2 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Dog.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Dog extends Animal { +public class Dog extends Animal implements Serializable { private @Valid String breed = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java index a3bbcc6cd6b..afb80283457 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumArrays.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -10,7 +11,7 @@ import java.util.Objects; -public class EnumArrays { +public class EnumArrays implements Serializable { public enum JustSymbolEnum { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java index 4b694360886..13cf0a338e7 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumClass.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java index 4f7283cdbf3..277fcf88e8d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/EnumTest.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.OuterEnum; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class EnumTest { +public class EnumTest implements Serializable { public enum EnumStringEnum { diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java index faead8afb01..64d0e10f9a1 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/FormatTest.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.UUID; import org.joda.time.LocalDate; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; -public class FormatTest { +public class FormatTest implements Serializable { private @Valid Integer integer = null; private @Valid Integer int32 = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index c07f245e60a..bef66ba21ee 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class HasOnlyReadOnly { +public class HasOnlyReadOnly implements Serializable { private @Valid String bar = null; private @Valid String foo = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java index 638058f9216..ff256f599d4 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MapTest.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class MapTest { +public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0b277958156..d72ca2af084 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -14,7 +15,7 @@ import java.util.Objects; -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid = null; private @Valid Date dateTime = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java index 53d4313dfd1..aedda176fb2 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Model200Response.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model name starting with number") -public class Model200Response { +public class Model200Response implements Serializable { private @Valid Integer name = null; private @Valid String propertyClass = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java index b21d4f89017..da860040d95 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class ModelApiResponse { +public class ModelApiResponse implements Serializable { private @Valid Integer code = null; private @Valid String type = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java index 3e77fb415c7..1e17a101c64 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing reserved words") -public class ModelReturn { +public class ModelReturn implements Serializable { private @Valid Integer _return = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java index 775320ca04f..1c189b6e01d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Name.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model name same as property name") -public class Name { +public class Name implements Serializable { private @Valid Integer name = null; private @Valid Integer snakeCase = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java index 631daa797cc..edff615a50d 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class NumberOnly { +public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java index 344d5055c08..d7042477807 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Date; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Order { +public class Order implements Serializable { private @Valid Long id = null; private @Valid Long petId = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java index 28aa1476f3d..c038e105892 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class OuterComposite { +public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber = null; private @Valid String myString = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java index eb4b2679ebe..d682c3f5080 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java index cd025d3bc8b..5bad5ba12d6 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Pet.java @@ -4,6 +4,7 @@ import io.swagger.model.Tag; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; -public class Pet { +public class Pet implements Serializable { private @Valid Long id = null; private @Valid Category category = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 115bbdef056..0617b6904ea 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class ReadOnlyFirst { +public class ReadOnlyFirst implements Serializable { private @Valid String bar = null; private @Valid String baz = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java index 08fe6d01869..9afe1f14834 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class SpecialModelName { +public class SpecialModelName implements Serializable { private @Valid Long specialPropertyName = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java index bd9f74287cd..35c70dd8bbd 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/Tag.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Tag { +public class Tag implements Serializable { private @Valid Long id = null; private @Valid String name = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java index c872137dcad..ad92725cb41 100644 --- a/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec-interface/src/gen/java/io/swagger/model/User.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class User { +public class User implements Serializable { private @Valid Long id = null; private @Valid String username = null; diff --git a/samples/server/petstore/jaxrs-spec-interface/swagger.json b/samples/server/petstore/jaxrs-spec-interface/swagger.json index 6812fe6e0e8..5b53d7108d0 100644 --- a/samples/server/petstore/jaxrs-spec-interface/swagger.json +++ b/samples/server/petstore/jaxrs-spec-interface/swagger.json @@ -108,8 +108,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" }, "collectionFormat" : "csv" } ], @@ -680,8 +680,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_form_string", @@ -699,8 +699,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_header_string", @@ -718,8 +718,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_query_string", diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java index 17c61771f7c..820bb4a2f18 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AdditionalPropertiesClass.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class AdditionalPropertiesClass { +public class AdditionalPropertiesClass implements Serializable { private @Valid Map mapProperty = new HashMap(); private @Valid Map> mapOfMapProperty = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java index cc18f7fa3a5..f7aef656d44 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Animal.java @@ -2,6 +2,7 @@ import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -10,7 +11,7 @@ import java.util.Objects; -public class Animal { +public class Animal implements Serializable { private @Valid String className = null; private @Valid String color = "red"; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java index a730cb5ffc7..ca03cafd3ef 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/AnimalFarm.java @@ -3,6 +3,7 @@ import io.swagger.model.Animal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class AnimalFarm extends ArrayList { +public class AnimalFarm extends ArrayList implements Serializable { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java index 874660a2ef0..558c55d50e1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfArrayOfNumberOnly.java @@ -3,6 +3,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayOfArrayOfNumberOnly { +public class ArrayOfArrayOfNumberOnly implements Serializable { private @Valid List> arrayArrayNumber = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java index 2a3980fbd37..780c9bf0df8 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayOfNumberOnly.java @@ -3,6 +3,7 @@ import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayOfNumberOnly { +public class ArrayOfNumberOnly implements Serializable { private @Valid List arrayNumber = new ArrayList(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java index ec75158891a..f6ef76af0d6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ArrayTest.java @@ -3,6 +3,7 @@ import io.swagger.model.ReadOnlyFirst; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class ArrayTest { +public class ArrayTest implements Serializable { private @Valid List arrayOfString = new ArrayList(); private @Valid List> arrayArrayOfInteger = new ArrayList>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java index 25bbfd84e38..385c622b0ba 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Capitalization.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Capitalization { +public class Capitalization implements Serializable { private @Valid String smallCamel = null; private @Valid String capitalCamel = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java index fc259678da3..f334fcd1914 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Cat.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Cat extends Animal { +public class Cat extends Animal implements Serializable { private @Valid Boolean declawed = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java index df544c396db..5cee21d0404 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Category.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Category { +public class Category implements Serializable { private @Valid Long id = null; private @Valid String name = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java index ec28d98861d..faa4cf796cb 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ClassModel.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model with \"_class\" property") -public class ClassModel { +public class ClassModel implements Serializable { private @Valid String propertyClass = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java index 57bcea24a47..55a8b4e31c0 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Client.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Client { +public class Client implements Serializable { private @Valid String client = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java index 529d49d8ce2..e55012815c2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Dog.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.Animal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Dog extends Animal { +public class Dog extends Animal implements Serializable { private @Valid String breed = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java index a3bbcc6cd6b..afb80283457 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumArrays.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -10,7 +11,7 @@ import java.util.Objects; -public class EnumArrays { +public class EnumArrays implements Serializable { public enum JustSymbolEnum { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java index 4b694360886..13cf0a338e7 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumClass.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java index 4f7283cdbf3..277fcf88e8d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/EnumTest.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.model.OuterEnum; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class EnumTest { +public class EnumTest implements Serializable { public enum EnumStringEnum { diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java index faead8afb01..64d0e10f9a1 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/FormatTest.java @@ -4,6 +4,7 @@ import java.util.Date; import java.util.UUID; import org.joda.time.LocalDate; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; -public class FormatTest { +public class FormatTest implements Serializable { private @Valid Integer integer = null; private @Valid Integer int32 = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java index c07f245e60a..bef66ba21ee 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/HasOnlyReadOnly.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class HasOnlyReadOnly { +public class HasOnlyReadOnly implements Serializable { private @Valid String bar = null; private @Valid String foo = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java index 638058f9216..ff256f599d4 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MapTest.java @@ -3,6 +3,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -11,7 +12,7 @@ import java.util.Objects; -public class MapTest { +public class MapTest implements Serializable { private @Valid Map> mapMapOfString = new HashMap>(); diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java index 0b277958156..d72ca2af084 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import java.util.UUID; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -14,7 +15,7 @@ import java.util.Objects; -public class MixedPropertiesAndAdditionalPropertiesClass { +public class MixedPropertiesAndAdditionalPropertiesClass implements Serializable { private @Valid UUID uuid = null; private @Valid Date dateTime = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java index 53d4313dfd1..aedda176fb2 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Model200Response.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model name starting with number") -public class Model200Response { +public class Model200Response implements Serializable { private @Valid Integer name = null; private @Valid String propertyClass = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java index b21d4f89017..da860040d95 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelApiResponse.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class ModelApiResponse { +public class ModelApiResponse implements Serializable { private @Valid Integer code = null; private @Valid String type = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java index 3e77fb415c7..1e17a101c64 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ModelReturn.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing reserved words") -public class ModelReturn { +public class ModelReturn implements Serializable { private @Valid Integer _return = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java index 775320ca04f..1c189b6e01d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Name.java @@ -1,6 +1,7 @@ package io.swagger.model; import io.swagger.annotations.ApiModel; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; @ApiModel(description = "Model for testing model name same as property name") -public class Name { +public class Name implements Serializable { private @Valid Integer name = null; private @Valid Integer snakeCase = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java index 631daa797cc..edff615a50d 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/NumberOnly.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class NumberOnly { +public class NumberOnly implements Serializable { private @Valid BigDecimal justNumber = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java index 344d5055c08..d7042477807 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Order.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.util.Date; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class Order { +public class Order implements Serializable { private @Valid Long id = null; private @Valid Long petId = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java index 28aa1476f3d..c038e105892 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterComposite.java @@ -1,6 +1,7 @@ package io.swagger.model; import java.math.BigDecimal; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -9,7 +10,7 @@ import java.util.Objects; -public class OuterComposite { +public class OuterComposite implements Serializable { private @Valid BigDecimal myNumber = null; private @Valid String myString = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java index eb4b2679ebe..d682c3f5080 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/OuterEnum.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java index cd025d3bc8b..5bad5ba12d6 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Pet.java @@ -4,6 +4,7 @@ import io.swagger.model.Tag; import java.util.ArrayList; import java.util.List; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -12,7 +13,7 @@ import java.util.Objects; -public class Pet { +public class Pet implements Serializable { private @Valid Long id = null; private @Valid Category category = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java index 115bbdef056..0617b6904ea 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/ReadOnlyFirst.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class ReadOnlyFirst { +public class ReadOnlyFirst implements Serializable { private @Valid String bar = null; private @Valid String baz = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java index 08fe6d01869..9afe1f14834 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/SpecialModelName.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class SpecialModelName { +public class SpecialModelName implements Serializable { private @Valid Long specialPropertyName = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java index bd9f74287cd..35c70dd8bbd 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/Tag.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class Tag { +public class Tag implements Serializable { private @Valid Long id = null; private @Valid String name = null; diff --git a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java index c872137dcad..ad92725cb41 100644 --- a/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java +++ b/samples/server/petstore/jaxrs-spec/src/gen/java/io/swagger/model/User.java @@ -1,5 +1,6 @@ package io.swagger.model; +import java.io.Serializable; import javax.validation.constraints.*; import javax.validation.Valid; @@ -8,7 +9,7 @@ import java.util.Objects; -public class User { +public class User implements Serializable { private @Valid Long id = null; private @Valid String username = null; diff --git a/samples/server/petstore/jaxrs-spec/swagger.json b/samples/server/petstore/jaxrs-spec/swagger.json index 6812fe6e0e8..5b53d7108d0 100644 --- a/samples/server/petstore/jaxrs-spec/swagger.json +++ b/samples/server/petstore/jaxrs-spec/swagger.json @@ -108,8 +108,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "available", - "enum" : [ "available", "pending", "sold" ] + "enum" : [ "available", "pending", "sold" ], + "default" : "available" }, "collectionFormat" : "csv" } ], @@ -680,8 +680,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_form_string", @@ -699,8 +699,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_header_string", @@ -718,8 +718,8 @@ "type" : "array", "items" : { "type" : "string", - "default" : "$", - "enum" : [ ">", "$" ] + "enum" : [ ">", "$" ], + "default" : "$" } }, { "name" : "enum_query_string",