[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

@@ -13,6 +13,7 @@ package org.openapitools.client.models
import com.squareup.moshi.Json
import java.io.Serializable
/**
* Describes the result of uploading an image resource
* @param code
@@ -27,5 +28,7 @@ data class ApiResponse (
val type: kotlin.String? = null,
@Json(name = "message")
val message: kotlin.String? = null
)
)
: Serializable

View File

@@ -13,6 +13,7 @@ package org.openapitools.client.models
import com.squareup.moshi.Json
import java.io.Serializable
/**
* A category for a pet
* @param id
@@ -24,5 +25,7 @@ data class Category (
val id: kotlin.Long? = null,
@Json(name = "name")
val name: kotlin.String? = null
)
)
: Serializable

View File

@@ -13,6 +13,7 @@ package org.openapitools.client.models
import com.squareup.moshi.Json
import java.io.Serializable
/**
* An order for a pets from the pet store
* @param id
@@ -37,7 +38,9 @@ data class Order (
val status: Order.Status? = null,
@Json(name = "complete")
val complete: kotlin.Boolean? = null
)
)
: Serializable
{
/**

View File

@@ -15,6 +15,7 @@ import org.openapitools.client.models.Category
import org.openapitools.client.models.Tag
import com.squareup.moshi.Json
import java.io.Serializable
/**
* A pet for sale in the pet store
* @param id
@@ -39,7 +40,9 @@ data class Pet (
/* pet status in the store */
@Json(name = "status")
val status: Pet.Status? = null
)
)
: Serializable
{
/**

View File

@@ -13,6 +13,7 @@ package org.openapitools.client.models
import com.squareup.moshi.Json
import java.io.Serializable
/**
* A tag for a pet
* @param id
@@ -24,5 +25,7 @@ data class Tag (
val id: kotlin.Long? = null,
@Json(name = "name")
val name: kotlin.String? = null
)
)
: Serializable

View File

@@ -13,6 +13,7 @@ package org.openapitools.client.models
import com.squareup.moshi.Json
import java.io.Serializable
/**
* A User who is purchasing from the pet store
* @param id
@@ -43,5 +44,7 @@ data class User (
/* User Status */
@Json(name = "userStatus")
val userStatus: kotlin.Int? = null
)
)
: Serializable