forked from loafle/openapi-generator-original
[kotlin-client][kotlin-server] feature: allow creation of kotlin data classes that implement java.io.Serializable (#3997)
* feat: allow creation of kotlin data classes that implement java.io.Serializable, by adding the config option serializableModel=(true|false) * docs: add markdown docu for new configOption serializableModel * fix: do not use parcelize in script * update kotlin samples * add the option, update the doc
This commit is contained in:
@@ -25,5 +25,7 @@ data class ApiResponse (
|
||||
@SerialName(value = "code") val code: kotlin.Int? = null,
|
||||
@SerialName(value = "type") val type: kotlin.String? = null,
|
||||
@SerialName(value = "message") val message: kotlin.String? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -23,5 +23,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
data class Category (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "name") val name: kotlin.String? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,9 @@ data class Order (
|
||||
/* Order Status */
|
||||
@SerialName(value = "status") val status: Order.Status? = null,
|
||||
@SerialName(value = "complete") val complete: kotlin.Boolean? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@@ -34,7 +34,9 @@ data class Pet (
|
||||
@SerialName(value = "tags") val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@SerialName(value = "status") val status: Pet.Status? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
{
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,5 +23,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
data class Tag (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "name") val name: kotlin.String? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -36,5 +36,7 @@ data class User (
|
||||
@SerialName(value = "phone") val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@SerialName(value = "userStatus") val userStatus: kotlin.Int? = null
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user