forked from loafle/openapi-generator-original
[kotlin-client][jackson] Add support for unknown default enum value (#17404)
* [kotlin-client][jackson] Enable @JsonEnumDefaultValue * Update samples
This commit is contained in:
parent
e20466bffe
commit
1105759a6f
@ -6,3 +6,4 @@ additionalProperties:
|
||||
serializationLibrary: jackson
|
||||
artifactId: kotlin-petstore-jackson
|
||||
enumPropertyNaming: UPPERCASE
|
||||
enumUnknownDefaultCase: "true"
|
||||
|
@ -7,6 +7,9 @@ import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
{{/moshi}}
|
||||
{{#jackson}}
|
||||
{{#enumUnknownDefaultCase}}
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
{{/enumUnknownDefaultCase}}
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
{{#discriminator}}
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes
|
||||
@ -114,7 +117,7 @@ import {{packageName}}.infrastructure.ITransformForStorage
|
||||
@SerializedName(value = {{#lambda.doublequote}}{{{value}}}{{/lambda.doublequote}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
@JsonProperty(value = {{#lambda.doublequote}}{{{value}}}{{/lambda.doublequote}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||
@JsonProperty(value = {{#lambda.doublequote}}{{{value}}}{{/lambda.doublequote}}) {{#enumUnknownDefaultCase}}{{#-last}}@JsonEnumDefaultValue {{/-last}}{{/enumUnknownDefaultCase}}{{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||
{{/jackson}}
|
||||
{{#kotlinx_serialization}}
|
||||
@SerialName(value = {{#lambda.doublequote}}{{{value}}}{{/lambda.doublequote}}) {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
|
||||
|
@ -28,6 +28,9 @@ import kotlinx.datetime.Instant
|
||||
import java.util.UUID
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
{{#enumUnknownDefaultCase}}
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
{{/enumUnknownDefaultCase}}
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -104,6 +107,9 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
{{#enumUnknownDefaultCase}}
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
{{/enumUnknownDefaultCase}}
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
{{/jackson}}
|
||||
{{#kotlinx_serialization}}
|
||||
|
@ -193,7 +193,7 @@ class PetApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = A
|
||||
enum class StatusFindPetsByStatus(val value: kotlin.String) {
|
||||
@JsonProperty(value = "available") AVAILABLE("available"),
|
||||
@JsonProperty(value = "pending") PENDING("pending"),
|
||||
@JsonProperty(value = "sold") SOLD("sold")
|
||||
@JsonProperty(value = "sold") SOLD("sold"),
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -10,5 +11,6 @@ object Serializer {
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -56,12 +57,13 @@ data class Order (
|
||||
/**
|
||||
* Order Status
|
||||
*
|
||||
* Values: PLACED,APPROVED,DELIVERED
|
||||
* Values: PLACED,APPROVED,DELIVERED,UNKNOWN_DEFAULT_OPEN_API
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@JsonProperty(value = "placed") PLACED("placed"),
|
||||
@JsonProperty(value = "approved") APPROVED("approved"),
|
||||
@JsonProperty(value = "delivered") DELIVERED("delivered");
|
||||
@JsonProperty(value = "delivered") DELIVERED("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -58,12 +59,13 @@ data class Pet (
|
||||
/**
|
||||
* pet status in the store
|
||||
*
|
||||
* Values: AVAILABLE,PENDING,SOLD
|
||||
* Values: AVAILABLE,PENDING,SOLD,UNKNOWN_DEFAULT_OPEN_API
|
||||
*/
|
||||
enum class Status(val value: kotlin.String) {
|
||||
@JsonProperty(value = "available") AVAILABLE("available"),
|
||||
@JsonProperty(value = "pending") PENDING("pending"),
|
||||
@JsonProperty(value = "sold") SOLD("sold");
|
||||
@JsonProperty(value = "sold") SOLD("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -10,5 +11,6 @@ object Serializer {
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -62,7 +63,7 @@ data class Order (
|
||||
@JsonProperty(value = "placed") placed("placed"),
|
||||
@JsonProperty(value = "approved") approved("approved"),
|
||||
@JsonProperty(value = "delivered") delivered("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -65,7 +66,7 @@ data class Pet (
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -62,7 +63,7 @@ data class Order (
|
||||
@JsonProperty(value = "placed") placed("placed"),
|
||||
@JsonProperty(value = "approved") approved("approved"),
|
||||
@JsonProperty(value = "delivered") delivered("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -64,7 +65,7 @@ data class Pet (
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -10,5 +11,6 @@ object Serializer {
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -62,7 +63,7 @@ data class Order (
|
||||
@JsonProperty(value = "placed") placed("placed"),
|
||||
@JsonProperty(value = "approved") approved("approved"),
|
||||
@JsonProperty(value = "delivered") delivered("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -65,7 +66,7 @@ data class Pet (
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -10,5 +11,6 @@ object Serializer {
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -62,7 +63,7 @@ data class Order (
|
||||
@JsonProperty(value = "placed") placed("placed"),
|
||||
@JsonProperty(value = "approved") approved("approved"),
|
||||
@JsonProperty(value = "delivered") delivered("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -65,7 +66,7 @@ data class Pet (
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@ -10,5 +11,6 @@ object Serializer {
|
||||
val jacksonObjectMapper: ObjectMapper = jacksonObjectMapper()
|
||||
.findAndRegisterModules()
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE, true)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -62,7 +63,7 @@ data class Order (
|
||||
@JsonProperty(value = "placed") placed("placed"),
|
||||
@JsonProperty(value = "approved") approved("approved"),
|
||||
@JsonProperty(value = "delivered") delivered("delivered"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ package org.openapitools.client.models
|
||||
import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
@ -65,7 +66,7 @@ data class Pet (
|
||||
@JsonProperty(value = "available") available("available"),
|
||||
@JsonProperty(value = "pending") pending("pending"),
|
||||
@JsonProperty(value = "sold") sold("sold"),
|
||||
@JsonProperty(value = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
@JsonProperty(value = "unknown_default_open_api") @JsonEnumDefaultValue unknownDefaultOpenApi("unknown_default_open_api");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
@ -16,6 +16,7 @@
|
||||
package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user