OpenAPITools / OpenAPITools/openapi-generator
[REQ] Polymorphism with `sealed class` (Kotlin)
Open
Nobody has claimed this yet.
Enhancement: Feature
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Is your feature request related to a problem? Please describe.
Currently, the generated model is using inheritance based on an interface.
Describe the solution you'd like
Add a flag to the Gradle script which allows generating a sealed class.
Additional context
Maybe this feature can be expanded to more languages.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Gradle script and the generated Kotlin model that currently uses an interface. Determine how a flag should select sealed-class generation and verify that generated models use the requested form; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100