[Kotlin][Client] new library support: Retrofit 2.x #4518
[Kotlin][Client] new library support: Retrofit 2.x #4518wing328 merged 30 commits intoOpenAPITools:masterfrom
Conversation
|
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
# Conflicts: # bin/kotlin-client-all.sh # modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java
bin/kotlin-client-all.sh
Outdated
| ./bin/kotlin-client-string.sh | ||
| ./bin/kotlin-client-threetenbp.sh | ||
| ./bin/kotlin-client-nullable.sh | ||
| ./bin/kotlin-client-retrofti2.sh |
There was a problem hiding this comment.
typo: kotlin-client-retrofti2.sh => kotlin-client-retrofit2.sh
There was a problem hiding this comment.
Thanks for reviewing!
It's solved in this commit: a3b34b5
|
When using Can we also auto-generate these files similar to what we've done for other library options in the kotlin generator? |
# Conflicts: # modules/openapi-generator/src/main/resources/kotlin-client/data_class_opt_var.mustache # modules/openapi-generator/src/main/resources/kotlin-client/data_class_req_var.mustache
Thanks! |
|
@javils can you please run on the terminal |
bin/kotlin-client-retrofit2.sh
Outdated
|
|
||
| java ${JAVA_OPTS} -jar ${executable} ${ags} | ||
|
|
||
| cp CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml samples/client/petstore/kotlin-threetenbp/pom.xml |
When I run this command I got a lot of modified files and not update the kotlin.md file. Any idea? |
|
Thanks! |
|
@wing328 @jimschubert @dr4ke616 @karismann @Zomzog @andrewemery |
|
I did a test with the auto-generated Kotlin code (retrofit2) for Petstore but got the following errors: Can you please take a look? |
Thanks for your feedback! |
|
@javils Since in your last commit you made a change in a |
|
@4brunu done! |
|
The build failed 2 times because of this:
|
|
@javils the shippable failure has been fixed in the master. Can you please merge the latest master into this branch to retrigger the build? |
|
I still got errors when testing the Petstore samples (kotlin retrofit2): Does it work for you locally? |
@deprecated has a message param that java not. Add it with a default message.
|
I have tested this locally and I think now it's working. |
|
Tested locally and the result is good. Thanks for the PR. |
|
UPDATE: the library option has been renamed from |
#4517
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.shif 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.PR Description
This PR add support for retrofit2 as a HTTP library in kotlin-client generator. The reason to add this feature is that I want to port some old android java code to kotlin, but I couldn't because retrofit2 was not supported.
@jimschubert @dr4ke616 @karismann @Zomzog @andrewemery