fix: Template contains unconditional ": Serializable" which creates wrong derive clause on data classes which have a parent as well as are serializable. (#19283)

This commit is contained in:
Dieter Eickstaedt 2024-08-01 15:18:46 +02:00 committed by GitHub
parent 7f551bb9a0
commit 484b87f22a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
92 changed files with 92 additions and 92 deletions

View File

@ -17,7 +17,7 @@
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>dataClassOptVar}}{{^-last}},
{{/-last}}{{/optionalVars}}
) {{/discriminator}}{{#parent}}: {{{.}}}{{#serializableModel}}, Serializable{{/serializableModel}}{{/parent}}{{#serializableModel}}: Serializable{{/serializableModel}}{
) {{/discriminator}}{{#parent}}: {{{.}}}{{#serializableModel}}, Serializable{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}: Serializable{{/serializableModel}}{{/parent}}{
{{#discriminator}}
{{#requiredVars}}
{{>interfaceReqVar}}

View File

@ -24,7 +24,7 @@ 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{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -26,7 +26,7 @@ data class ModelApiResponse(
@get:JsonProperty("type") val type: kotlin.String? = null,
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -37,7 +37,7 @@ data class Order(
@get:JsonProperty("status") val status: Order.Status? = null,
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -42,7 +42,7 @@ data class Pet(
@Deprecated(message = "")
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -23,7 +23,7 @@ data class Tag(
@get:JsonProperty("id") val id: kotlin.Long? = null,
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -41,7 +41,7 @@ data class User(
@get:JsonProperty("phone") val phone: kotlin.String? = null,
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -21,7 +21,7 @@ data class Annotation(
@Schema(example = "null", description = "")
@get:JsonProperty("id") val id: java.util.UUID? = null
) {
) {
}

View File

@ -78,7 +78,7 @@ data class AnyOfUserOrPet(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: AnyOfUserOrPet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -78,7 +78,7 @@ data class AnyOfUserOrPetOrArrayString(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: AnyOfUserOrPetOrArrayString.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -26,7 +26,7 @@ data class Category(
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -78,7 +78,7 @@ data class UserOrPet(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: UserOrPet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -78,7 +78,7 @@ data class UserOrPetOrArrayString(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: UserOrPetOrArrayString.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -24,7 +24,7 @@ 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{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -26,7 +26,7 @@ data class ModelApiResponse(
@get:JsonProperty("type") val type: kotlin.String? = null,
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -37,7 +37,7 @@ data class Order(
@get:JsonProperty("status") val status: Order.Status? = null,
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -42,7 +42,7 @@ data class Pet(
@Deprecated(message = "")
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -23,7 +23,7 @@ data class Tag(
@get:JsonProperty("id") val id: kotlin.Long? = null,
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -41,7 +41,7 @@ data class User(
@get:JsonProperty("phone") val phone: kotlin.String? = null,
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -42,7 +42,7 @@ data class Apa(
@Schema(example = "null", description = "")
@get:JsonProperty("gepa") val gepa: java.math.BigDecimal? = null
) {
) {
}

View File

@ -26,7 +26,7 @@ data class Category(
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -26,7 +26,7 @@ data class Category(
@get:Pattern(regexp="^[a-zA-Z0-9]+[a-zA-Z0-9\\.\\-_]*[a-zA-Z0-9]+$")
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@Deprecated(message = "")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -26,7 +26,7 @@ data class ApiError(
@field:Valid
@get:JsonProperty("reasonCode") val reasonCode: ReasonCode? = null
) {
) {
/**
*

View File

@ -26,7 +26,7 @@ data class Category(
@Schema(example = "null", description = "")
@get:JsonProperty("name") var name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -30,7 +30,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") var message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -44,7 +44,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") var complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@get:JsonProperty("status") var status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -26,7 +26,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") var name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -50,7 +50,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") var userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -21,7 +21,7 @@ data class MultipartMixedRequestMarker(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -25,7 +25,7 @@ data class Category(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -47,7 +47,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -28,7 +28,7 @@ data class Cat(
@Schema(example = "null", description = "")
@get:JsonProperty("color") override val color: kotlin.String? = "red"
) : Animal{
) : Animal{
}

View File

@ -25,7 +25,7 @@ data class Category(
@Schema(example = "null", description = "")
@get:JsonProperty("id") val id: kotlin.Long? = null
) {
) {
}

View File

@ -21,7 +21,7 @@ data class Client(
@Schema(example = "null", description = "")
@get:JsonProperty("client") val client: kotlin.String? = null
) {
) {
}

View File

@ -28,7 +28,7 @@ data class Dog(
@Schema(example = "null", description = "")
@get:JsonProperty("color") override val color: kotlin.String? = "red"
) : Animal{
) : Animal{
}

View File

@ -21,7 +21,7 @@ data class Foo(
@Schema(example = "null", description = "")
@get:JsonProperty("bar") val bar: kotlin.String? = "bar"
) {
) {
}

View File

@ -23,7 +23,7 @@ data class FooGetDefaultResponse(
@field:Valid
@Schema(example = "null", description = "")
@get:JsonProperty("string") val string: Foo? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -47,7 +47,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -25,7 +25,7 @@ data class Category(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -29,7 +29,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) {
) {
}

View File

@ -43,7 +43,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) {
) {
/**
* Order Status

View File

@ -47,7 +47,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) {
) {
/**
* pet status in the store

View File

@ -25,7 +25,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) {
) {
}

View File

@ -49,7 +49,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) {
) {
}

View File

@ -26,7 +26,7 @@ data class Category(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -30,7 +30,7 @@ data class ModelApiResponse(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -44,7 +44,7 @@ data class Order(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@ApiModelProperty(example = "null", value = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -26,7 +26,7 @@ data class Tag(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -50,7 +50,7 @@ data class User(
@ApiModelProperty(example = "null", value = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -26,7 +26,7 @@ data class Category(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -30,7 +30,7 @@ data class ModelApiResponse(
@Schema(example = "null", description = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -44,7 +44,7 @@ data class Order(
@Schema(example = "null", description = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@Schema(example = "null", description = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -26,7 +26,7 @@ data class Tag(
@Schema(example = "null", description = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -50,7 +50,7 @@ data class User(
@Schema(example = "null", description = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -26,7 +26,7 @@ data class Category(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -30,7 +30,7 @@ data class ModelApiResponse(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -44,7 +44,7 @@ data class Order(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -48,7 +48,7 @@ data class Pet(
@ApiModelProperty(example = "null", value = "pet status in the store")
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -26,7 +26,7 @@ data class Tag(
@ApiModelProperty(example = "null", value = "")
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -50,7 +50,7 @@ data class User(
@ApiModelProperty(example = "null", value = "User Status")
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -23,7 +23,7 @@ data class Category(
@get:JsonProperty("id") val id: kotlin.Long? = null,
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -26,7 +26,7 @@ data class ModelApiResponse(
@get:JsonProperty("type") val type: kotlin.String? = null,
@get:JsonProperty("message") val message: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -37,7 +37,7 @@ data class Order(
@get:JsonProperty("status") val status: Order.Status? = null,
@get:JsonProperty("complete") val complete: kotlin.Boolean? = false
) : Serializable{
) : Serializable{
/**
* Order Status

View File

@ -41,7 +41,7 @@ data class Pet(
@get:JsonProperty("tags") val tags: kotlin.collections.List<Tag>? = null,
@get:JsonProperty("status") val status: Pet.Status? = null
) : Serializable{
) : Serializable{
/**
* pet status in the store

View File

@ -23,7 +23,7 @@ data class Tag(
@get:JsonProperty("id") val id: kotlin.Long? = null,
@get:JsonProperty("name") val name: kotlin.String? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1

View File

@ -41,7 +41,7 @@ data class User(
@get:JsonProperty("phone") val phone: kotlin.String? = null,
@get:JsonProperty("userStatus") val userStatus: kotlin.Int? = null
) : Serializable{
) : Serializable{
companion object {
private const val serialVersionUID: kotlin.Long = 1