[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:
Jan
2019-10-01 18:13:00 +02:00
committed by William Cheng
parent 31827f5f35
commit baa53cbf57
96 changed files with 404 additions and 123 deletions

View File

@@ -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
)
)

View File

@@ -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
)
)

View File

@@ -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
)
)
{
/**

View File

@@ -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
)
)
{
/**

View File

@@ -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
)
)

View File

@@ -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
)
)