Hi, had a hard time finding information about `Com...
# serialization
j
Hi, had a hard time finding information about
CommonEnumSerializer
/
EnumSerializer
. I try to use openapi-generator KMP export to generate data classes from json swagger and generated models uses unresolved
CommonEnumSerializer
, for example
Copy code
@Serializable(with = Env.Serializer::class)
enum class Env(val value: kotlin.String){
    notDeployed("not_deployed"),
    inDeployment("in_deployment"),
    deployed("deployed");

    object Serializer : CommonEnumSerializer<Env>("Env", values(), values().map { it.value.toString() }.toTypedArray())
}
What is the current way for doing that ? Or how to find/use
CommonEnumSerializer
馃
d
You don't need it anymore iirc. Just mark enum as serializable.
j
Yes it's working only with
@Serializable
. But...the generator export with
CommonEnumSerializer
so I wanted to understand why. Maybe special case ...