some00 dba7aee41e
Kotlinx polymorphism with custom discriminator support (#21531)
* 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
2025-07-31 16:29:39 +08:00
..