Skip to content
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

Improve Kotlin code quality #2988

Merged
merged 2 commits into from
May 24, 2019
Merged

Improve Kotlin code quality #2988

merged 2 commits into from
May 24, 2019

Conversation

kroegerama
Copy link
Contributor

Some minor improvements to the kotlin-client template. Use val instead of var where possible. Use .apply{} combined with the builder pattern. Use map[key] = value instead of map.put(key, value).

@jimschubert @dr4ke616 @karismann @Zomzog

@jimschubert
Copy link
Member

@kroegerama This looks good, thanks for the improvement!

Can you regenerate the kotlin samples to allow CircleCI to pass?

Those scripts are (and require that you've done mvn install beforehand):

bin/kotlin-client-petstore.sh
bin/kotlin-client-string.sh
bin/kotlin-client-threetenbp.sh

@wing328 wing328 merged commit 213c015 into OpenAPITools:master May 24, 2019
@wing328
Copy link
Member

wing328 commented May 24, 2019

@kroegerama thanks for the PR. For upcoming PRs, I would suggest creating a new branch as per Git best practice.

About Kotlin code format, you can also use post-processing file hook to format the Kotlin file using your favorite code formatter. Let me know if you need more information on that.

@wing328 wing328 changed the title improve Kotlin code quality Improve Kotlin code quality May 24, 2019
@wing328 wing328 added this to the 4.0.1 milestone May 24, 2019
@wing328
Copy link
Member

wing328 commented Jun 3, 2019

@kroegerama thanks again for your contribution, which has been included in the v4.0.1 release (https://twitter.com/oas_generator/status/1135534738658062336)

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