Closed clragon closed 2 months ago
Hi, After just quickly looking into this, i think the issue is a result of a "JacksonModule"-addon being removed from the library that generates the json-schemas from classes to resolve https://github.com/SMILEY4/ktor-swagger-ui/issues/60. The problem was that fields starting with "is" were not included in schemas. "JacksonModule" was removed since it also seemed to remove these fields. Unfortunately, it was also responsible for resolving the inheritance/interfaces. I'll investigate further.
Hi, sorry for the very late response :/ I'm trying to find a proper future-proof solution but for now i only have a workaround - with the disadvantages described in my previous comment.
EncodingData.DEFAULT_SCHEMA_GENERATOR = SchemaGenerator(
EncodingData
.schemaGeneratorConfigBuilder()
.with(JacksonModule()) // add back JacksonModule
.build()
)
install(SwaggerUI) { /*...*/ }
Thank you for your response. I've stopped using inheritance for my data classes (doesn't bode well) so I dont have this problem anymore. From my side, this issue is therefore done. Feel free to keep it open though.
closing this issue since it should be resolved with upcoming version 3
As of version 2.7.x, it seems that all my sealed classes annotated with Jackson are no longer detected.
Previously, the output for a given class was the following:
(why every class is doubled I am unsure).
when upgrading to version 2.7.0 or later, I instead get:
(which is the root of the sealed class).
The code behind this specific class is as follows:
downgrading to version 2.6.0 restores the previous behaviour.