Skip to content

[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

Merged
merged 3 commits into from
Feb 2, 2020
Merged

[kotlin][client] Add inheritance to Kotlin Client templates #4453

merged 3 commits into from
Feb 2, 2020

Conversation

mtraynham
Copy link
Contributor

@mtraynham mtraynham commented Nov 11, 2019

Adds inheritance to the Kotlin Client codegen templates using interfaces as the parent class.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./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).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@jimschubert (2017/09) ❤️, @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10)

@mtraynham mtraynham changed the title Add inheritance to Kotlin Client templates [kotlin-client] Add inheritance to Kotlin Client templates Nov 11, 2019
@mtraynham mtraynham changed the title [kotlin-client] Add inheritance to Kotlin Client templates [kotlin][client] Add inheritance to Kotlin Client templates Dec 19, 2019
@jimschubert
Copy link
Member

@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.

@mtraynham
Copy link
Contributor Author

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.

@mtraynham mtraynham changed the base branch from master to 4.3.x January 5, 2020 19:11
@mtraynham
Copy link
Contributor Author

@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.

@jimschubert jimschubert added this to the 4.3.0 milestone Feb 2, 2020
@jimschubert
Copy link
Member

Verified inheritance after testing a merge of master. Looks good!

@jimschubert jimschubert changed the base branch from 4.3.x to master February 2, 2020 02:35
@jimschubert jimschubert merged commit 26c9c64 into OpenAPITools:master Feb 2, 2020
@mtraynham mtraynham deleted the kotlin_client_inheritance branch February 3, 2020 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants