forked from loafle/openapi-generator-original
[kotlin][client] Add Jackson to interface properties and remove extra line feed (#5459)
* [kotlin][client] Ensure Jackson annotations are consistent with interface vars * [kotlin][client] Rebuild samples * [kotlin][client] Some kotlin client enhancements - Don't use JsonFormat for Date objects, this should be controlled via a custom serializer/deserializer or a turning on and off serialization features of Jackson. I've updated the jacksonObjectMapper config to write the dates as strings, which I think was intended in the original commit. https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/SerializationFeature.html#WRITE_DATES_AS_TIMESTAMPS https://fasterxml.github.io/jackson-databind/javadoc/2.6/com/fasterxml/jackson/databind/cfg/MapperConfig.html#getDateFormat-- - Dont' use @JsonFormat(shape = JsonFormat.Shape.OBJECT) for enums. This causes Enums to be formatted as objects with an internal "value" field. In reality, OpenAPI enums are just strings without properties and should be treated as a string. https://www.baeldung.com/jackson-serialize-enums#2-enum-as-json-object - Add's Kotlin use site annotation @get: to JsonProperty for parent interface properties. Otherwise Kotlin will warn: "This annotation is not applicable to target 'member property without backing field or delegate'" - Add's JsonTypeInfo annotations to interfaces for inheritance. This was copied verbatim from the kotlin-spring generator. https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/kotlin-spring/typeInfoAnnotation.mustache * [kotlin][client] Rebuild kotlin samples
This commit is contained in:
@@ -10,7 +10,10 @@ import com.squareup.moshi.JsonClass
|
||||
{{/moshi}}
|
||||
{{#jackson}}
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
{{#discriminator}}
|
||||
import com.fasterxml.jackson.annotation.JsonSubTypes
|
||||
import com.fasterxml.jackson.annotation.JsonTypeInfo
|
||||
{{/discriminator}}
|
||||
{{/jackson}}
|
||||
{{#parcelizeModels}}
|
||||
import android.os.Parcelable
|
||||
@@ -34,7 +37,7 @@ import java.io.Serializable
|
||||
{{#parcelizeModels}}
|
||||
@Parcelize
|
||||
{{/parcelizeModels}}
|
||||
{{#multiplatform}}@Serializable{{/multiplatform}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}
|
||||
{{#multiplatform}}@Serializable{{/multiplatform}}{{#moshi}}{{#moshiCodeGen}}@JsonClass(generateAdapter = true){{/moshiCodeGen}}{{/moshi}}{{#jackson}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{/jackson}}
|
||||
{{#nonPublicApi}}internal {{/nonPublicApi}}{{#discriminator}}interface{{/discriminator}}{{^discriminator}}data class{{/discriminator}} {{classname}}{{^discriminator}} (
|
||||
{{#vars}}
|
||||
{{#required}}{{>data_class_req_var}}{{/required}}{{^required}}{{>data_class_opt_var}}{{/required}}{{^-last}},{{/-last}}
|
||||
@@ -57,7 +60,6 @@ import java.io.Serializable
|
||||
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||
*/
|
||||
{{#multiplatform}}@Serializable(with = {{nameInCamelCase}}.Serializer::class){{/multiplatform}}
|
||||
{{#jackson}}{{#isPrimitiveType}}@JsonFormat(shape = JsonFormat.Shape.NATURAL){{/isPrimitiveType}}{{^isPrimitiveType}}@JsonFormat(shape = JsonFormat.Shape.OBJECT){{/isPrimitiveType}}{{/jackson}}
|
||||
{{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{{nameInCamelCase}}}(val value: {{#isListContainer}}{{{ nestedType }}}{{/isListContainer}}{{^isListContainer}}{{{dataType}}}{{/isListContainer}}){
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
{{#isDateTime}}
|
||||
@JsonFormat
|
||||
(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss")
|
||||
{{/isDateTime}}
|
||||
@JsonProperty("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/jackson}}
|
||||
{{/multiplatform}}
|
||||
|
||||
@@ -5,6 +5,9 @@ import com.google.gson.annotations.SerializedName
|
||||
{{#moshi}}
|
||||
import com.squareup.moshi.Json
|
||||
{{/moshi}}
|
||||
{{#jackson}}
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
{{/jackson}}
|
||||
{{/multiplatform}}
|
||||
{{#multiplatform}}
|
||||
import kotlinx.serialization.*
|
||||
@@ -16,7 +19,6 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
|
||||
*/
|
||||
{{#multiplatform}}@Serializable(with = {{classname}}.Serializer::class){{/multiplatform}}
|
||||
{{#jackson}}@JsonFormat(shape = JsonFormat.Shape.OBJECT){{/jackson}}
|
||||
{{#nonPublicApi}}internal {{/nonPublicApi}}enum class {{classname}}(val value: {{{dataType}}}){
|
||||
|
||||
{{#allowableValues}}{{#enumVars}}
|
||||
|
||||
@@ -8,5 +8,8 @@
|
||||
{{#gson}}
|
||||
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
@get:JsonProperty("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/jackson}}
|
||||
{{/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}}?
|
||||
@@ -8,5 +8,8 @@
|
||||
{{#gson}}
|
||||
@SerializedName("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
@get:JsonProperty("{{{vendorExtensions.x-base-name-literal}}}")
|
||||
{{/jackson}}
|
||||
{{/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}}
|
||||
@@ -24,6 +24,7 @@ import java.util.UUID
|
||||
{{/gson}}
|
||||
{{#jackson}}
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@@ -70,5 +71,6 @@ import java.util.Date
|
||||
.registerModule(Jdk8Module())
|
||||
.registerModule(JavaTimeModule())
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
{{/jackson}}
|
||||
}
|
||||
|
||||
6
modules/openapi-generator/src/main/resources/kotlin-client/typeInfoAnnotation.mustache
vendored
Normal file
6
modules/openapi-generator/src/main/resources/kotlin-client/typeInfoAnnotation.mustache
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "{{{discriminator.propertyBaseName}}}", visible = true)
|
||||
@JsonSubTypes(
|
||||
{{#discriminator.mappedModels}}
|
||||
JsonSubTypes.Type(value = {{modelName}}::class, name = "{{^vendorExtensions.x-discriminator-value}}{{mappingName}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}"){{^-last}},{{/-last}}
|
||||
{{/discriminator.mappedModels}}
|
||||
)
|
||||
@@ -22,13 +22,10 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class ApiResponse (
|
||||
@SerializedName("code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@SerializedName("type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@SerializedName("message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Category (
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Order (
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@SerializedName("petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@SerializedName("quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@SerializedName("shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@SerializedName("status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@SerializedName("complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@SerializedName(value="placed") placed("placed"),
|
||||
@SerializedName(value="approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Pet (
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@SerializedName("photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@SerializedName("category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@SerializedName("tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@SerializedName("status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@SerializedName(value="available") available("available"),
|
||||
@SerializedName(value="pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class Tag (
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@SerializedName("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.google.gson.annotations.SerializedName
|
||||
|
||||
data class User (
|
||||
@SerializedName("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@SerializedName("username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@SerializedName("firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@SerializedName("lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@SerializedName("email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@SerializedName("password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@SerializedName("phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@SerializedName("userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.openapitools.client.infrastructure
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper
|
||||
import com.fasterxml.jackson.databind.SerializationFeature
|
||||
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module
|
||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
@@ -13,4 +14,5 @@ object Serializer {
|
||||
.registerModule(Jdk8Module())
|
||||
.registerModule(JavaTimeModule())
|
||||
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
|
||||
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
* @param code
|
||||
@@ -23,13 +22,10 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class ApiResponse (
|
||||
@JsonProperty("code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@JsonProperty("type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@JsonProperty("message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* A category for a pet
|
||||
* @param id
|
||||
@@ -22,10 +21,8 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class Category (
|
||||
@JsonProperty("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@JsonProperty("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
* @param id
|
||||
@@ -26,26 +25,18 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class Order (
|
||||
@JsonProperty("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@JsonProperty("petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@JsonProperty("quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
@JsonFormat
|
||||
(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss")
|
||||
val quantity: kotlin.Int? = null,
|
||||
@JsonProperty("shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@JsonProperty("status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@JsonProperty("complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -53,7 +44,6 @@ data class Order (
|
||||
* Values: PLACED,APPROVED,DELIVERED
|
||||
*/
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.NATURAL)
|
||||
enum class Status(val value: kotlin.String){
|
||||
@JsonProperty(value="placed") PLACED("placed"),
|
||||
@JsonProperty(value="approved") APPROVED("approved"),
|
||||
|
||||
@@ -15,7 +15,6 @@ import org.openapitools.client.models.Category
|
||||
import org.openapitools.client.models.Tag
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
* @param name
|
||||
@@ -28,24 +27,18 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class Pet (
|
||||
@JsonProperty("name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@JsonProperty("photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@JsonProperty("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@JsonProperty("category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@JsonProperty("tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@JsonProperty("status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -53,7 +46,6 @@ data class Pet (
|
||||
* Values: AVAILABLE,PENDING,SOLD
|
||||
*/
|
||||
|
||||
@JsonFormat(shape = JsonFormat.Shape.NATURAL)
|
||||
enum class Status(val value: kotlin.String){
|
||||
@JsonProperty(value="available") AVAILABLE("available"),
|
||||
@JsonProperty(value="pending") PENDING("pending"),
|
||||
|
||||
@@ -13,7 +13,6 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* A tag for a pet
|
||||
* @param id
|
||||
@@ -22,10 +21,8 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class Tag (
|
||||
@JsonProperty("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@JsonProperty("name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.annotation.JsonFormat
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
* @param id
|
||||
@@ -28,29 +27,21 @@ import com.fasterxml.jackson.annotation.JsonFormat
|
||||
|
||||
data class User (
|
||||
@JsonProperty("id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@JsonProperty("username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@JsonProperty("firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@JsonProperty("lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@JsonProperty("email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@JsonProperty("password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@JsonProperty("phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@JsonProperty("userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -22,13 +22,10 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -23,13 +23,10 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -22,10 +22,8 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -26,24 +26,18 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -51,7 +45,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -28,24 +28,18 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -53,7 +47,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -22,10 +22,8 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -28,29 +28,21 @@ import com.squareup.moshi.JsonClass
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -22,11 +22,8 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class ApiResponse (
|
||||
@SerialName(value = "code") val code: kotlin.Int? = null
|
||||
,
|
||||
@SerialName(value = "type") val type: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "code") val code: kotlin.Int? = null,
|
||||
@SerialName(value = "type") val type: kotlin.String? = null,
|
||||
@SerialName(value = "message") val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,9 +21,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class Category (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "name") val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,19 +25,13 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class Order (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "petId") val petId: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "quantity") val quantity: kotlin.Int? = null
|
||||
,
|
||||
@SerialName(value = "shipDate") val shipDate: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "petId") val petId: kotlin.Long? = null,
|
||||
@SerialName(value = "quantity") val quantity: kotlin.Int? = null,
|
||||
@SerialName(value = "shipDate") val shipDate: kotlin.String? = null,
|
||||
/* 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
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -45,7 +39,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
@Serializable(with = Status.Serializer::class)
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
placed("placed"),
|
||||
approved("approved"),
|
||||
|
||||
@@ -27,19 +27,13 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class Pet (
|
||||
@SerialName(value = "name") @Required val name: kotlin.String
|
||||
,
|
||||
@SerialName(value = "photoUrls") @Required val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "category") val category: Category? = null
|
||||
,
|
||||
@SerialName(value = "tags") val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
@SerialName(value = "name") @Required val name: kotlin.String,
|
||||
@SerialName(value = "photoUrls") @Required val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "category") val category: Category? = null,
|
||||
@SerialName(value = "tags") val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@SerialName(value = "status") val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -47,7 +41,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
@Serializable(with = Status.Serializer::class)
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
available("available"),
|
||||
pending("pending"),
|
||||
|
||||
@@ -21,9 +21,7 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class Tag (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "name") val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,22 +27,14 @@ import kotlinx.serialization.internal.CommonEnumSerializer
|
||||
*/
|
||||
@Serializable
|
||||
data class User (
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null
|
||||
,
|
||||
@SerialName(value = "username") val username: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "firstName") val firstName: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "lastName") val lastName: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "email") val email: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "password") val password: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "phone") val phone: kotlin.String? = null
|
||||
,
|
||||
@SerialName(value = "id") val id: kotlin.Long? = null,
|
||||
@SerialName(value = "username") val username: kotlin.String? = null,
|
||||
@SerialName(value = "firstName") val firstName: kotlin.String? = null,
|
||||
@SerialName(value = "lastName") val lastName: kotlin.String? = null,
|
||||
@SerialName(value = "email") val email: kotlin.String? = null,
|
||||
@SerialName(value = "password") val password: kotlin.String? = null,
|
||||
@SerialName(value = "phone") val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@SerialName(value = "userStatus") val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -22,13 +22,10 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ internal data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
internal enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ internal data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
internal enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.squareup.moshi.Json
|
||||
|
||||
internal data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -23,14 +23,11 @@ import java.io.Serializable
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -26,24 +26,18 @@ import java.io.Serializable
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -54,7 +48,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -28,24 +28,18 @@ import java.io.Serializable
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -56,7 +50,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -28,30 +28,22 @@ import java.io.Serializable
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -22,13 +22,10 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -22,13 +22,10 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -23,14 +23,11 @@ import java.io.Serializable
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -26,24 +26,18 @@ import java.io.Serializable
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: kotlin.String? = null
|
||||
,
|
||||
val shipDate: kotlin.String? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -54,7 +48,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -28,24 +28,18 @@ import java.io.Serializable
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -56,7 +50,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -28,30 +28,22 @@ import java.io.Serializable
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -22,13 +22,10 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -25,24 +25,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: org.threeten.bp.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: org.threeten.bp.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -50,7 +44,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -27,24 +27,18 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) {
|
||||
|
||||
/**
|
||||
@@ -52,7 +46,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -21,10 +21,8 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -27,29 +27,21 @@ import com.squareup.moshi.Json
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
)
|
||||
|
||||
|
||||
@@ -23,14 +23,11 @@ import java.io.Serializable
|
||||
|
||||
data class ApiResponse (
|
||||
@Json(name = "code")
|
||||
val code: kotlin.Int? = null
|
||||
,
|
||||
val code: kotlin.Int? = null,
|
||||
@Json(name = "type")
|
||||
val type: kotlin.String? = null
|
||||
,
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Category (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -26,24 +26,18 @@ import java.io.Serializable
|
||||
|
||||
data class Order (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "petId")
|
||||
val petId: kotlin.Long? = null
|
||||
,
|
||||
val petId: kotlin.Long? = null,
|
||||
@Json(name = "quantity")
|
||||
val quantity: kotlin.Int? = null
|
||||
,
|
||||
val quantity: kotlin.Int? = null,
|
||||
@Json(name = "shipDate")
|
||||
val shipDate: java.time.OffsetDateTime? = null
|
||||
,
|
||||
val shipDate: java.time.OffsetDateTime? = null,
|
||||
/* Order Status */
|
||||
@Json(name = "status")
|
||||
val status: Order.Status? = null
|
||||
,
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -54,7 +48,6 @@ data class Order (
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "placed") placed("placed"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@@ -28,24 +28,18 @@ import java.io.Serializable
|
||||
|
||||
data class Pet (
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String
|
||||
,
|
||||
val name: kotlin.String,
|
||||
@Json(name = "photoUrls")
|
||||
val photoUrls: kotlin.Array<kotlin.String>
|
||||
,
|
||||
val photoUrls: kotlin.Array<kotlin.String>,
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "category")
|
||||
val category: Category? = null
|
||||
,
|
||||
val category: Category? = null,
|
||||
@Json(name = "tags")
|
||||
val tags: kotlin.Array<Tag>? = null
|
||||
,
|
||||
val tags: kotlin.Array<Tag>? = null,
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
@@ -56,7 +50,6 @@ data class Pet (
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
|
||||
|
||||
enum class Status(val value: kotlin.String){
|
||||
@Json(name = "available") available("available"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@@ -22,11 +22,9 @@ import java.io.Serializable
|
||||
|
||||
data class Tag (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
@@ -28,30 +28,22 @@ import java.io.Serializable
|
||||
|
||||
data class User (
|
||||
@Json(name = "id")
|
||||
val id: kotlin.Long? = null
|
||||
,
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "username")
|
||||
val username: kotlin.String? = null
|
||||
,
|
||||
val username: kotlin.String? = null,
|
||||
@Json(name = "firstName")
|
||||
val firstName: kotlin.String? = null
|
||||
,
|
||||
val firstName: kotlin.String? = null,
|
||||
@Json(name = "lastName")
|
||||
val lastName: kotlin.String? = null
|
||||
,
|
||||
val lastName: kotlin.String? = null,
|
||||
@Json(name = "email")
|
||||
val email: kotlin.String? = null
|
||||
,
|
||||
val email: kotlin.String? = null,
|
||||
@Json(name = "password")
|
||||
val password: kotlin.String? = null
|
||||
,
|
||||
val password: kotlin.String? = null,
|
||||
@Json(name = "phone")
|
||||
val phone: kotlin.String? = null
|
||||
,
|
||||
val phone: kotlin.String? = null,
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
|
||||
) : Serializable {
|
||||
companion object {
|
||||
private const val serialVersionUID: Long = 123
|
||||
|
||||
Reference in New Issue
Block a user