File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
modules/openapi-generator/src/main/resources/kotlin-client/libraries/jvm-retrofit2
samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/src/main/kotlin/org/openapitools/client/apis Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,8 @@ import okhttp3.MultipartBody
77
77
/**
78
78
* enum for parameter { {paramName} }
79
79
*/
80
- { {#nonPublicApi} }internal { {/nonPublicApi} }{ {^nonPublicApi} }{ {#explicitApi} }public { {/explicitApi} }{ {/nonPublicApi} }enum class { {enumName} }{ {operationIdCamelCase} }({ {^nonPublicApi} }{ {#explicitApi} }public { {/explicitApi} }{ {/nonPublicApi} }val value: { {^isContainer} }{ {dataType} }{ {/isContainer} }{ {#isContainer} }kotlin.String{ {/isContainer} }) {
80
+ { {#kotlinx_serialization} }@Serializable
81
+ { {/kotlinx_serialization} }{ {#nonPublicApi} }internal { {/nonPublicApi} }{ {^nonPublicApi} }{ {#explicitApi} }public { {/explicitApi} }{ {/nonPublicApi} }enum class { {enumName} }{ {operationIdCamelCase} }({ {^nonPublicApi} }{ {#explicitApi} }public { {/explicitApi} }{ {/nonPublicApi} }val value: { {^isContainer} }{ {dataType} }{ {/isContainer} }{ {#isContainer} }kotlin.String{ {/isContainer} }) {
81
82
{{^enumUnknownDefaultCase} }
82
83
{ {#allowableValues} }
83
84
{ {#enumVars} }
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ interface PetApi {
44
44
/* *
45
45
* enum for parameter status
46
46
*/
47
+ @Serializable
47
48
enum class StatusFindPetsByStatus (val value : kotlin.String ) {
48
49
@SerialName(value = " available" ) AVAILABLE (" available" ),
49
50
@SerialName(value = " pending" ) PENDING (" pending" ),
You can’t perform that action at this time.
0 commit comments