mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-03 00:43:46 +00:00
* kotlinx serialization fixes - added new config with kotlinx, discriminator (/w custom name) and kotlinx_serialization - remove discriminator properties from the generator in both base and derived classes - set discriminatorValue in additionalProperties of derived classes - add JsonClassDiscriminator the derived classes in the template - set SerialName to discriminatorValue in the template - change base classes to sealed class instead of interface - make variables in base classes abstract * Generated kotlin-allOff-discriminator-kotlinx-serialization sample * Added test for kotlinx_serialization with discriminator * renamed yaml * Added new sample to github workflow * Added comments to KotlinClientCodegen::postProcessAllModels
12 lines
757 B
Prolog
12 lines
757 B
Prolog
-keepattributes *Annotation*, InnerClasses
|
|
-dontnote kotlinx.serialization.AnnotationsKt # core serialization annotations
|
|
|
|
# kotlinx-serialization-json specific. Add this if you have java.lang.NoClassDefFoundError kotlinx.serialization.json.JsonObjectSerializer
|
|
-keepclassmembers class kotlinx.serialization.json.** { *** Companion; }
|
|
-keepclasseswithmembers class kotlinx.serialization.json.** { kotlinx.serialization.KSerializer serializer(...); }
|
|
|
|
# project specific.
|
|
-keep,includedescriptorclasses class org.openapitools.client.models.**$$serializer { *; }
|
|
-keepclassmembers class org.openapitools.client.models.** { *** Companion; }
|
|
-keepclasseswithmembers class org.openapitools.client.models.** { kotlinx.serialization.KSerializer serializer(...); }
|