mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
parent
0368f4e031
commit
861e8f0656
@ -14,7 +14,7 @@
|
||||
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
|
||||
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}},
|
||||
{{/-last}}{{/optionalVars}}
|
||||
) {{/discriminator}}{{#parent}}: {{{.}}}{{/parent}}{
|
||||
) {{/discriminator}}{{#parent}}: {{{.}}}{{#serializableModel}}, Serializable{{/serializableModel}}{{/parent}}{{#serializableModel}}: Serializable{{/serializableModel}}{
|
||||
{{#discriminator}}
|
||||
{{#requiredVars}}
|
||||
{{>interfaceReqVar}}
|
||||
@ -33,4 +33,9 @@
|
||||
@JsonProperty({{{value}}}) {{{name}}}({{{value}}}){{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||
}
|
||||
{{/isEnum}}{{/vars}}{{/hasEnums}}
|
||||
{{#serializableModel}}
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
{{/serializableModel}}
|
||||
}
|
||||
|
@ -3,6 +3,9 @@ package {{package}}
|
||||
import java.util.Objects
|
||||
{{#imports}}import {{import}}
|
||||
{{/imports}}
|
||||
{{#serializableModel}}
|
||||
import java.io.Serializable
|
||||
{{/serializableModel}}
|
||||
{{#useBeanValidation}}
|
||||
import {{javaxPackage}}.validation.constraints.DecimalMax
|
||||
import {{javaxPackage}}.validation.constraints.DecimalMin
|
||||
|
@ -184,6 +184,7 @@ public class KotlinSpringServerCodegenTest {
|
||||
codegen.setServiceImplementation(true);
|
||||
codegen.setUseBeanValidation(false);
|
||||
codegen.setReactive(false);
|
||||
codegen.setSerializableModel(true);
|
||||
codegen.processOpts();
|
||||
|
||||
Assert.assertEquals(codegen.modelPackage(), "xx.yyyyyyyy.model");
|
||||
@ -206,6 +207,8 @@ public class KotlinSpringServerCodegenTest {
|
||||
Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.USE_BEANVALIDATION), false);
|
||||
Assert.assertFalse(codegen.isReactive());
|
||||
Assert.assertEquals(codegen.additionalProperties().get(KotlinSpringServerCodegen.REACTIVE), false);
|
||||
Assert.assertTrue(codegen.isSerializableModel());
|
||||
Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.SERIALIZABLE_MODEL), true);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ -747,4 +750,35 @@ public class KotlinSpringServerCodegenTest {
|
||||
"@Parameter(description = \"image to upload\") @Valid @RequestPart(\"image\", required = false) image: org.springframework.core.io.Resource?");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void generateSerializableModel() throws Exception {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||
|
||||
KotlinSpringServerCodegen codegen = new KotlinSpringServerCodegen();
|
||||
codegen.setOutputDir(output.getAbsolutePath());
|
||||
codegen.additionalProperties().put(CodegenConstants.SERIALIZABLE_MODEL, true);
|
||||
|
||||
ClientOptInput input = new ClientOptInput()
|
||||
.openAPI(TestUtils.parseSpec("src/test/resources/3_0/kotlin/petstore.yaml"))
|
||||
.config(codegen);
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true");
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_TESTS, "false");
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.MODEL_DOCS, "false");
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.APIS, "false");
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.SUPPORTING_FILES, "false");
|
||||
|
||||
generator.opts(input).generate();
|
||||
|
||||
assertFileContains(
|
||||
Paths.get(outputPath + "/src/main/kotlin/org/openapitools/model/Pet.kt"),
|
||||
"import java.io.Serializable",
|
||||
") : Serializable{",
|
||||
"private const val serialVersionUID: kotlin.Long = 1"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -23,7 +24,10 @@ data class Category(
|
||||
|
||||
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class ModelApiResponse(
|
||||
@get:JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -35,7 +36,7 @@ data class Order(
|
||||
@get:JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -48,5 +49,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -40,7 +41,7 @@ data class Pet(
|
||||
|
||||
@Deprecated(message = "")
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -53,5 +54,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -22,7 +23,10 @@ data class Tag(
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -40,7 +41,10 @@ data class User(
|
||||
@get:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -23,7 +24,10 @@ data class Category(
|
||||
|
||||
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class ModelApiResponse(
|
||||
@get:JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -35,7 +36,7 @@ data class Order(
|
||||
@get:JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -48,5 +49,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -40,7 +41,7 @@ data class Pet(
|
||||
|
||||
@Deprecated(message = "")
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -53,5 +54,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -22,7 +23,10 @@ data class Tag(
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import jakarta.validation.constraints.DecimalMax
|
||||
import jakarta.validation.constraints.DecimalMin
|
||||
import jakarta.validation.constraints.Email
|
||||
@ -40,7 +41,10 @@ data class User(
|
||||
@get:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Category(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("name") var name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -29,7 +30,10 @@ data class ModelApiResponse(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("message") var message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -42,7 +43,7 @@ data class Order(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("complete") var complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -55,5 +56,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -46,7 +47,7 @@ data class Pet(
|
||||
|
||||
@Schema(example = "null", description = "pet status in the store")
|
||||
@get:JsonProperty("status") var status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -59,5 +60,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Tag(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("name") var name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -49,7 +50,10 @@ data class User(
|
||||
|
||||
@Schema(example = "null", description = "User Status")
|
||||
@get:JsonProperty("userStatus") var userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -29,7 +30,10 @@ data class ModelApiResponse(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -42,7 +43,7 @@ data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -55,5 +56,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -46,7 +47,7 @@ data class Pet(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -59,5 +60,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -49,7 +50,10 @@ data class User(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "User Status")
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Category(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -29,7 +30,10 @@ data class ModelApiResponse(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -42,7 +43,7 @@ data class Order(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -55,5 +56,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -46,7 +47,7 @@ data class Pet(
|
||||
|
||||
@Schema(example = "null", description = "pet status in the store")
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -59,5 +60,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Tag(
|
||||
|
||||
@Schema(example = "null", description = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -49,7 +50,10 @@ data class User(
|
||||
|
||||
@Schema(example = "null", description = "User Status")
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Category(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -29,7 +30,10 @@ data class ModelApiResponse(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -42,7 +43,7 @@ data class Order(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -55,5 +56,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -46,7 +47,7 @@ data class Pet(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "pet status in the store")
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -59,5 +60,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class Tag(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -49,7 +50,10 @@ data class User(
|
||||
|
||||
@ApiModelProperty(example = "null", value = "User Status")
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -22,7 +23,10 @@ data class Category(
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -25,7 +26,10 @@ data class ModelApiResponse(
|
||||
@get:JsonProperty("type") val type: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("message") val message: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.openapitools.model
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -35,7 +36,7 @@ data class Order(
|
||||
@get:JsonProperty("status") val status: Order.Status? = null,
|
||||
|
||||
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
@ -48,5 +49,8 @@ data class Order(
|
||||
@JsonProperty("delivered") delivered("delivered")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@ import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonValue
|
||||
import org.openapitools.model.Category
|
||||
import org.openapitools.model.Tag
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -39,7 +40,7 @@ data class Pet(
|
||||
@get:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
|
||||
|
||||
@get:JsonProperty("status") val status: Pet.Status? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@ -52,5 +53,8 @@ data class Pet(
|
||||
@JsonProperty("sold") sold("sold")
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -22,7 +23,10 @@ data class Tag(
|
||||
@get:JsonProperty("id") val id: kotlin.Long? = null,
|
||||
|
||||
@get:JsonProperty("name") val name: kotlin.String? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,7 @@ package org.openapitools.model
|
||||
|
||||
import java.util.Objects
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import java.io.Serializable
|
||||
import javax.validation.constraints.DecimalMax
|
||||
import javax.validation.constraints.DecimalMin
|
||||
import javax.validation.constraints.Email
|
||||
@ -40,7 +41,10 @@ data class User(
|
||||
@get:JsonProperty("phone") val phone: kotlin.String? = null,
|
||||
|
||||
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
) : Serializable{
|
||||
|
||||
companion object {
|
||||
private const val serialVersionUID: kotlin.Long = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user