[kotlin-server] Add configurable inheritance modes#24090
Conversation
There was a problem hiding this comment.
3 issues found across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
thanks for the PR cc @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) @stefankoppier (2022/06) @e5l (2024/10) @dennisameling (2026/02) |
|
please review the build failure and the feedback from cubic-dev-ai when you've time. |
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors. Let me know if you need help fixing it. |
7561bc3 to
7facfa2
Compare
Thanks for the heads up! I've altered the history to reflect my GH user |
|
@rm127 I don't use Kotlin... Then all languages can use the feature Just my 2 cents |
Summary
This change adds configurable inheritance handling to the
kotlin-servergenerator, includingjaxrs-spec.Fixes
Added option
inheritanceModenonesealedabstractcompositionDefault behavior
ktor/javalin*default tosealedjaxrs-specdefaults toabstractValidation
inheritanceModevaluesjaxrs-spec + sealedImplementation details
Codegen option plumbing
In
KotlinServerCodegen:inheritanceModestatex-inheritance-mode-nonex-inheritance-mode-sealedx-inheritance-mode-abstractx-inheritance-mode-compositionModel post-processing
Added mode-aware model shaping in
postProcessAllModels:nonecompositionvalue: kotlin.Anysealed/abstractTemplate updates
Shared
kotlin-servermodel templatesealed classin sealed modeabstract classin abstract modejaxrs-specmodel templatesabstract classinstead ofinterfaceoverridex-parent-ctor-argsTests
Added/updated coverage in
KotlinServerCodegenTestfor:sealedmode forktorabstractmode forjaxrs-specjaxrs-spec + sealedrejectioncompositionnonenonecompositionDocumentation
Updated
docs/generators/kotlin-server.mdwith the newinheritanceModeoption and mode descriptions.Verification
Tested with: