mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-05 15:46:11 +00:00
[Kotlin][client] Support gson and moshi as serialization libraries (#3734)
This commit is contained in:
committed by
Jérémie Bresson
parent
1443f01709
commit
8f7e43b500
@@ -26,7 +26,6 @@ data class ApiResponse (
|
||||
val type: kotlin.String? = null,
|
||||
@Json(name = "message")
|
||||
val message: kotlin.String? = null
|
||||
) {
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ data class Category (
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
) {
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -36,24 +36,22 @@ data class Order (
|
||||
val status: Order.Status? = null,
|
||||
@Json(name = "complete")
|
||||
val complete: kotlin.Boolean? = null
|
||||
) {
|
||||
)
|
||||
|
||||
{
|
||||
/**
|
||||
* Order Status
|
||||
* Values: placed,approved,delivered
|
||||
*/
|
||||
enum class Status(val value: kotlin.String){
|
||||
|
||||
@Json(name = "placed")
|
||||
placed("placed"),
|
||||
@Json(name = "placed") placed("placed"),
|
||||
|
||||
@Json(name = "approved")
|
||||
approved("approved"),
|
||||
@Json(name = "approved") approved("approved"),
|
||||
|
||||
@Json(name = "delivered")
|
||||
delivered("delivered");
|
||||
@Json(name = "delivered") delivered("delivered");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -38,24 +38,22 @@ data class Pet (
|
||||
/* pet status in the store */
|
||||
@Json(name = "status")
|
||||
val status: Pet.Status? = null
|
||||
) {
|
||||
)
|
||||
|
||||
{
|
||||
/**
|
||||
* pet status in the store
|
||||
* Values: available,pending,sold
|
||||
*/
|
||||
enum class Status(val value: kotlin.String){
|
||||
|
||||
@Json(name = "available")
|
||||
available("available"),
|
||||
@Json(name = "available") available("available"),
|
||||
|
||||
@Json(name = "pending")
|
||||
pending("pending"),
|
||||
@Json(name = "pending") pending("pending"),
|
||||
|
||||
@Json(name = "sold")
|
||||
sold("sold");
|
||||
@Json(name = "sold") sold("sold");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ data class Tag (
|
||||
val id: kotlin.Long? = null,
|
||||
@Json(name = "name")
|
||||
val name: kotlin.String? = null
|
||||
) {
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,6 @@ data class User (
|
||||
/* User Status */
|
||||
@Json(name = "userStatus")
|
||||
val userStatus: kotlin.Int? = null
|
||||
) {
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user