Closed pdrozz closed 1 year ago
Hi, there is this workaround for using kotlinx for schemas. For examples it is possible to set the value to a json-string provided by kotlinx instead of an object.
Version 2.x will have a much simpler/cleaner way of replacing the default encoders with e.g. kotlinx and should be done/release in a few days. If you want you could also check out the latest release candidate.
Is there any way to use a kotlinx.serialization or gson annotation on the fields of a data class in the version 1.6.1?
For example, I'm using the code below, but the generated example response is picking the data class field name and ignoring the annotation:
But the generated example give me:
instead
I saw that in the 2.0.0 version will be possible to set a custom example encoding