-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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-spring] add support for the delegate pattern #3925
[kotlin-spring] add support for the delegate pattern #3925
Conversation
Hi! |
cc Kotlin tech committee: @jimschubert (2017/09), @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) |
@massimosiani thanks for the PR and sorry for taking so long to review as there are too many PRs submitted for this project. I tested the new feature with petstore but got the following errors:
Does it work for you locally in your machine? |
Hi @wing328, I fully understand and please forgive me, I forgot to thank you for your amazing work. The code works in a project of mine, I'll check it against the petstore example very soon and come back to you. |
@wing328 I just rebased on master and everything was fine. Here you are my versions: $ gradle -v Gradle 5.6.4Build time: 2019-11-01 20:42:00 UTC Kotlin: 1.3.41 Anything wrong? |
Restarted the shippable job. Let's see how it goes. |
I did a test with petstore spec but got the following errors when compiling the code:
Does it work for you locally?
|
@wing328 you were right, I should have checked more carefully. I checked that the generated code now compiles. |
@massimosiani no worry. I'll give it another try tomorrow and merge if no issue found. Agreed with filing a separate PR for another issue. |
Tested again and no longer encounter the issue. Thanks for the enhancement |
@massimosiani thanks for the PR, which has been included in the v4.2.2 release: https://twitter.com/oas_generator/status/1201432648544972800 |
PR checklist
./bin/
to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.sh
,./bin/openapi3/{LANG}-petstore.sh
if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in.\bin\windows\
. If contributing template-only or documentation-only changes which will change sample output, be sure to build the project first.master
,4.1.x
,5.0.x
. Default:master
.Description of the PR
(details of the change, additional tests that have been done, reference to the issue for tracking, etc)
Fixes #2526 by introducing the delegatePattern option. The resulting output is the kotlin version of the Java code. Please notice that the reactive option is not supported yet, as I'm not confident with coroutines.
No drawback compatibility issue should arise.
cc @dr4ke616.