[kotlin][client] Add inheritance to Kotlin Client templates (#4453)

* Add inheritance to Kotlin Client templates

* Correct white spacing issues

* Rebuild kotlin client samples
This commit is contained in:
Matt Traynham 2020-02-01 22:12:11 -05:00 committed by GitHub
parent a496c2011f
commit 26c9c64634
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
72 changed files with 128 additions and 231 deletions

View File

@ -335,6 +335,10 @@ public abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co
for (Object _mo : models) { for (Object _mo : models) {
Map<String, Object> mo = (Map<String, Object>) _mo; Map<String, Object> mo = (Map<String, Object>) _mo;
CodegenModel cm = (CodegenModel) mo.get("model"); CodegenModel cm = (CodegenModel) mo.get("model");
if (cm.getDiscriminator() != null) {
cm.vendorExtensions.put("x-has-data-class-body", true);
break;
}
for (CodegenProperty var : cm.vars) { for (CodegenProperty var : cm.vars) {
if (var.isEnum || isSerializableModel()) { if (var.isEnum || isSerializableModel()) {

View File

@ -31,21 +31,22 @@ import java.io.Serializable
@Parcelize @Parcelize
{{/parcelizeModels}} {{/parcelizeModels}}
{{#multiplatform}}@Serializable{{/multiplatform}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}} {{#multiplatform}}@Serializable{{/multiplatform}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}
{{#nonPublicApi}}internal {{/nonPublicApi}}data class {{classname}} ( {{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}data class{{/discriminator}} {{classname}}{{^discriminator}} (
{{#vars}} {{#requiredVars}}
{{#required}}{{>data_class_req_var}}{{/required}}{{^required}}{{>data_class_opt_var}}{{/required}}{{^-last}},{{/-last}} {{>data_class_req_var}}{{^-last}},
{{/vars}} {{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}} {{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}},
{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}} {{/-last}}{{/optionalVars}}
{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}} ){{/discriminator}}{{#parent}}{{^serializableModel}}{{^parcelizeModels}} : {{parent}}{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{^parcelizeModels}} : {{parent}}, Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{^serializableModel}}{{#parcelizeModels}} : {{parent}}, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#parent}}{{#serializableModel}}{{#parcelizeModels}} : {{parent}}, Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{^parcelizeModels}} : Serializable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{^parent}}{{#serializableModel}}{{#parcelizeModels}} : Serializable, Parcelable{{/parcelizeModels}}{{/serializableModel}}{{/parent}}{{#vendorExtensions.x-has-data-class-body}} {
{{#vendorExtensions.x-has-data-class-body}}
{
{{/vendorExtensions.x-has-data-class-body}} {{/vendorExtensions.x-has-data-class-body}}
{{#serializableModel}} {{#serializableModel}}
{{#nonPublicApi}}internal {{/nonPublicApi}}companion object { {{#nonPublicApi}}internal {{/nonPublicApi}}companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
{{/serializableModel}} {{/serializableModel}}
{{#discriminator}}{{#requiredVars}}
{{>interface_req_var}}{{/requiredVars}}{{#optionalVars}}
{{>interface_opt_var}}{{/optionalVars}}{{/discriminator}}
{{#hasEnums}} {{#hasEnums}}
{{#vars}} {{#vars}}
{{#isEnum}} {{#isEnum}}

View File

@ -9,4 +9,4 @@
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}") @SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
{{/gson}} {{/gson}}
{{/multiplatform}} {{/multiplatform}}
{{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}} {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}

View File

@ -9,4 +9,4 @@
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}") @SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
{{/gson}} {{/gson}}
{{/multiplatform}} {{/multiplatform}}
{{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}} {{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{#isInherited}}override {{/isInherited}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}

View File

@ -0,0 +1,12 @@
{{#description}}
/* {{{description}}} */
{{/description}}
{{^multiplatform}}
{{#moshi}}
@Json(name = "{{{vendorExtensions.x-base-name-literal}}}")
{{/moshi}}
{{#gson}}
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
{{/gson}}
{{/multiplatform}}
{{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}?

View File

@ -0,0 +1,12 @@
{{#description}}
/* {{{description}}} */
{{/description}}
{{^multiplatform}}
{{#moshi}}
@Json(name = "{{{vendorExtensions.x-base-name-literal}}}")
{{/moshi}}
{{#gson}}
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
{{/gson}}
{{/multiplatform}}
{{#multiplatform}}@SerialName(value = "{{{vendorExtensions.x-base-name-literal}}}") @Required {{/multiplatform}}{{>modelMutable}} {{{name}}}: {{#isEnum}}{{#isListContainer}}{{#isList}}kotlin.collections.List{{/isList}}{{^isList}}kotlin.Array{{/isList}}<{{classname}}.{{{nameInCamelCase}}}>{{/isListContainer}}{{^isListContainer}}{{classname}}.{{{nameInCamelCase}}}{{/isListContainer}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}{{#isNullable}}?{{/isNullable}}

View File

@ -29,5 +29,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@SerializedName("complete") @SerializedName("complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@SerializedName("status") @SerializedName("status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -29,5 +29,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -30,5 +30,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -27,5 +27,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -38,10 +38,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -40,10 +40,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -27,5 +27,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -46,5 +46,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -27,5 +27,3 @@ data class ApiResponse (
@SerialName(value = "message") val message: kotlin.String? = null @SerialName(value = "message") val message: kotlin.String? = null
) )

View File

@ -25,5 +25,3 @@ data class Category (
@SerialName(value = "name") val name: kotlin.String? = null @SerialName(value = "name") val name: kotlin.String? = null
) )

View File

@ -32,10 +32,8 @@ data class Order (
/* Order Status */ /* Order Status */
@SerialName(value = "status") val status: Order.Status? = null, @SerialName(value = "status") val status: Order.Status? = null,
@SerialName(value = "complete") val complete: kotlin.Boolean? = null @SerialName(value = "complete") val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -34,10 +34,8 @@ data class Pet (
@SerialName(value = "tags") val tags: kotlin.Array<Tag>? = null, @SerialName(value = "tags") val tags: kotlin.Array<Tag>? = null,
/* pet status in the store */ /* pet status in the store */
@SerialName(value = "status") val status: Pet.Status? = null @SerialName(value = "status") val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -25,5 +25,3 @@ data class Tag (
@SerialName(value = "name") val name: kotlin.String? = null @SerialName(value = "name") val name: kotlin.String? = null
) )

View File

@ -38,5 +38,3 @@ data class User (
@SerialName(value = "userStatus") val userStatus: kotlin.Int? = null @SerialName(value = "userStatus") val userStatus: kotlin.Int? = null
) )

View File

@ -29,5 +29,3 @@ internal data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ internal data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ internal data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ internal data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ internal data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ internal data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -28,12 +28,10 @@ data class ApiResponse (
val type: kotlin.String? = null, val type: kotlin.String? = null,
@Json(name = "message") @Json(name = "message")
val message: kotlin.String? = null val message: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -25,12 +25,10 @@ data class Category (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -38,13 +38,11 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -40,13 +40,11 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -25,12 +25,10 @@ data class Tag (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -44,12 +44,10 @@ data class User (
/* User Status */ /* User Status */
@Json(name = "userStatus") @Json(name = "userStatus")
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -29,5 +29,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -29,5 +29,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -28,12 +28,10 @@ data class ApiResponse (
val type: kotlin.String? = null, val type: kotlin.String? = null,
@Json(name = "message") @Json(name = "message")
val message: kotlin.String? = null val message: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -25,12 +25,10 @@ data class Category (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -38,13 +38,11 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -27,26 +27,24 @@ import java.io.Serializable
*/ */
data class Pet ( data class Pet (
@Json(name = "id")
val id: kotlin.Long? = null,
@Json(name = "category")
val category: Category? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String, val name: kotlin.String,
@Json(name = "photoUrls") @Json(name = "photoUrls")
val photoUrls: kotlin.Array<kotlin.String>, val photoUrls: kotlin.Array<kotlin.String>,
@Json(name = "id")
val id: kotlin.Long? = null,
@Json(name = "category")
val category: Category? = null,
@Json(name = "tags") @Json(name = "tags")
val tags: kotlin.Array<Tag>? = null, val tags: kotlin.Array<Tag>? = null,
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -25,12 +25,10 @@ data class Tag (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -44,12 +44,10 @@ data class User (
/* User Status */ /* User Status */
@Json(name = "userStatus") @Json(name = "userStatus")
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -29,5 +29,3 @@ data class ApiResponse (
val message: kotlin.String? = null val message: kotlin.String? = null
) )

View File

@ -26,5 +26,3 @@ data class Category (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -37,10 +37,8 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) {
{
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -39,10 +39,8 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) {
{
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -26,5 +26,3 @@ data class Tag (
val name: kotlin.String? = null val name: kotlin.String? = null
) )

View File

@ -45,5 +45,3 @@ data class User (
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) )

View File

@ -28,12 +28,10 @@ data class ApiResponse (
val type: kotlin.String? = null, val type: kotlin.String? = null,
@Json(name = "message") @Json(name = "message")
val message: kotlin.String? = null val message: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -25,12 +25,10 @@ data class Category (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -38,13 +38,11 @@ data class Order (
val status: Order.Status? = null, val status: Order.Status? = null,
@Json(name = "complete") @Json(name = "complete")
val complete: kotlin.Boolean? = null val complete: kotlin.Boolean? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* Order Status * Order Status
* Values: placed,approved,delivered * Values: placed,approved,delivered

View File

@ -40,13 +40,11 @@ data class Pet (
/* pet status in the store */ /* pet status in the store */
@Json(name = "status") @Json(name = "status")
val status: Pet.Status? = null val status: Pet.Status? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
/** /**
* pet status in the store * pet status in the store
* Values: available,pending,sold * Values: available,pending,sold

View File

@ -25,12 +25,10 @@ data class Tag (
val id: kotlin.Long? = null, val id: kotlin.Long? = null,
@Json(name = "name") @Json(name = "name")
val name: kotlin.String? = null val name: kotlin.String? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }

View File

@ -44,12 +44,10 @@ data class User (
/* User Status */ /* User Status */
@Json(name = "userStatus") @Json(name = "userStatus")
val userStatus: kotlin.Int? = null val userStatus: kotlin.Int? = null
) ) : Serializable {
: Serializable
{
companion object { companion object {
private const val serialVersionUID: Long = 123 private const val serialVersionUID: Long = 123
} }
} }