-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
[Kotlin][Client] Fix url path for Retrofit, Fix optionals for @Query @Body, Set List as default collection for Kotlin data class #6456
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
Conversation
…e its doesn't work with Kotlin Data Classes(required manually implementing hashCode&equals) Replace typeMapping kotlin.Array<kotlin.Byte> with efficient primitive implementation kotlin.ByteArray Replace instantiationTypes array to kotlin.collections.ArrayList, for extending Array we should provide element count to its constructor.
…fix_list_and_fix_retrofit_path
.../openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinClientCodegen.java
Outdated
Show resolved
Hide resolved
Fixed Kotlin multiplatform api template Code style.
Can you please fix those tests?
The PR is very big, because it changes a lot of things in the sample projects. |
ff3f63d but when I run test locally it failed with com.squareup.moshi.LinkedHashTreeMap cannot be cast to org.openapitools.client.models.Pet |
yeah, every time when changed some basic template we should update all kotlin-* scripts) |
samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/Application.kt
Show resolved
Hide resolved
…fix_list_and_fix_retrofit_path # Conflicts: # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-multiplatform/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-multiplatform/src/commonMain/kotlin/org/openapitools/client/apis/FakeApi.kt # samples/openapi3/client/petstore/kotlin/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin/src/main/kotlin/org/openapitools/client/apis/PetApi.kt
…fix_list_and_fix_retrofit_path # Conflicts: # samples/client/petstore/kotlin-jackson/src/main/kotlin/org/openapitools/client/models/Pet.kt
…fix_list_and_fix_retrofit_path # Conflicts: # samples/client/petstore/kotlin-retrofit2/docs/PetApi.md # samples/client/petstore/kotlin-retrofit2/docs/UserApi.md # samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt # samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt # samples/client/petstore/kotlin-retrofit2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/PetApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/docs/UserApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/PetApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines/src/main/kotlin/org/openapitools/client/apis/UserApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/PetApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/docs/UserApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/PetApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx/src/main/kotlin/org/openapitools/client/apis/UserApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/FakeApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/PetApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/docs/UserApi.md # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/AnotherFakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/FakeClassnameTags123Api.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/PetApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/StoreApi.kt # samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2/src/main/kotlin/org/openapitools/client/apis/UserApi.kt
…fix_list_and_fix_retrofit_path
CC @jimschubert (2017/09) ❤️, @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03) |
…rator into kotlin_client_fix_list_and_fix_retrofit_path
I've merged the latest master and update the Kotlin samples. Let's see how it goes. |
now I saw https://app.circleci.com/pipelines/github/OpenAPITools/openapi-generator/3497/workflows/345773ae-ab74-4162-a8c5-1592ae010e4f/jobs/16865/parallel-runs/2?filterBy=FAILED there a lot not related with kotlin uncommited changes, go/apex/java-google-api |
Not sure how but some of your changes update apex, go, etc petstore samples. I've pushed another update by updating all samples. Let's see how it goes. |
If no further question/feedback on this PR, I'll merge it tomorrow (Tuesday) |
I got some fixes from PR #5697
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
.@4brunu @wing328 @ch4rl3x