mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 15:37:10 +00:00
[kotlin][client] Small improvements (#15429)
* [kotlin][client] update Gradle wrapper in generated project * [kotlin][client] Add @JsonClass(generateAdapter = false) to generated enums when using moshi library This is needed, so the moshi generated R8 rules will include the enum classes: https://github.com/square/moshi#enums * [kotlin][client] Update generated samples
This commit is contained in:
@@ -17,6 +17,7 @@ package org.openapitools.client.models
|
||||
|
||||
|
||||
import com.squareup.moshi.Json
|
||||
import com.squareup.moshi.JsonClass
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
@@ -41,6 +42,7 @@ data class ModelWithEnumPropertyHavingDefault (
|
||||
*
|
||||
* Values: vALUE,unknownDefaultOpenApi
|
||||
*/
|
||||
@JsonClass(generateAdapter = false)
|
||||
enum class PropertyName(val value: kotlin.String) {
|
||||
@Json(name = "VALUE") vALUE("VALUE"),
|
||||
@Json(name = "unknown_default_open_api") unknownDefaultOpenApi("unknown_default_open_api");
|
||||
|
||||
Reference in New Issue
Block a user