-
-
Notifications
You must be signed in to change notification settings - Fork 7k
[kotlin][client] Add inheritance to Kotlin Client templates #4453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[kotlin][client] Add inheritance to Kotlin Client templates #4453
Conversation
samples/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/models/Order.kt
Outdated
Show resolved
Hide resolved
modules/openapi-generator/src/main/resources/kotlin-client/data_class.mustache
Outdated
Show resolved
Hide resolved
@mtraynham thanks for keeping updated with master. That's much appreciated. My only concern about the newly added code is the empty newlines it introduces for noop conditions. I wonder if we can target 4.3.x with this new code? I have concerns that the introduction of the new template files may cause issue, and just to be safe we could release in the minor version which is "breaking change with fallback". The fallback being users could use 4.2.x templates if they have issues. Any concern with retargeting? As an alternative we could get the vendor extension into master and the template changes against the 4.3.x branch. |
Thanks @jimschubert for taking a look! I'm not against flattening the new lines, it just makes the template kinda of unreadable. I'll rebase against the 4.3.x branch as well. |
@jimschubert , I corrected the issues you mentioned and rebased my commits on to OpenAPITools/4.3.x. Looks like the checks are failing because it's attempting to merge the feature branch into master and getting some merge failures. I can rebase again when those are corrected if need be. |
Verified inheritance after testing a merge of master. Looks good! |
Adds inheritance to the Kotlin Client codegen templates using interfaces as the parent class.
PR checklist
./bin/
(or Windows batch scripts under.\bin\windows
) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the code or mustache templates for a language ({LANG}
) (e.g. php, ruby, python, etc).master
,4.3.x
,5.0.x
. Default:master
.@jimschubert (2017/09) ❤️, @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10)