sealed class support
See original GitHub issueHey, thanks for this project, so far it looks great but I am running into some limitations with sealed classes. I have a model as follows:
data class Tablet(
val id: String,
val something: Something,
val apps: Map<String, App>
)
where-as app is a sealed class and while jackson 2.10.1 recognises that and converts incoming requests perfectly fine in the generated json schema App
is only displayed as an empty object. Are sealed classes meant to be supported? As far as I can tell that would probably map to a oneof, right?
Edit: For reference, here is btw the PR that added auto-discovery of sealed classes: https://github.com/FasterXML/jackson-module-kotlin/pull/240
Issue Analytics
- State:
- Created 4 years ago
- Comments:10
Top Results From Across the Web
Sealed classes | Kotlin
Sealed classes and interfaces represent restricted class hierarchies ... All direct subclasses of a sealed class are known at compile time.
Read more >3 Sealed Classes - Java - Oracle Help Center
Sealed classes and interfaces restrict which other classes or interfaces may extend or implement them.
Read more >Sealed Classes and Interfaces in Java 15 - Baeldung
Sealed classes are also supported by the reflection API, where two public methods have been added to the java.lang.Class: The isSealed method ...
Read more >Kotlin: Sealed classes and Sealed Interfaces in 2022 - Medium
Among the class modalities supported by Kotlin ( open , sealed , abstract , and final ) only abstract have been allowed to...
Read more >Support inline sealed classes : KT-27576 - YouTrack
The goal is to be able to combine the efficiency of inline value classes with the when(x) { is Subclass -> syntax and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i have pushed the modifications. https://github.com/papsign/Ktor-OpenAPI-Generator/commit/c2b79324146b522042684a050eeb43c41dbf3af2
i got it to work with: