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

Added Kotlin Vert.x client #13594

Merged
merged 36 commits into from
Oct 19, 2022
Merged

Conversation

anttileppa
Copy link
Contributor

Added support for Vert.X library into Kotlin Client generator. New generator can be tested using kotlin-client generator with vertx library.

Ping @jimschubert

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master (6.1.0) (minor release - breaking changes with fallbacks), 7.0.x (breaking changes without fallbacks)
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

anttileppa and others added 28 commits September 19, 2022 20:20
added api abstractions to client generator
@wing328
Copy link
Member

wing328 commented Oct 6, 2022

cc @jimschubert (2017/09) ❤️, @dr4ke616 (2018/08) @karismann (2019/03) @Zomzog (2019/04) @andrewemery (2019/10) @4brunu (2019/11) @yutaka0m (2020/03)

@wing328 wing328 added this to the 6.2.1 milestone Oct 6, 2022
@wing328
Copy link
Member

wing328 commented Oct 17, 2022

can you please resolve the merge conflicts when you've time?

@anttileppa
Copy link
Contributor Author

@wing328 conflicts resolved

@wing328
Copy link
Member

wing328 commented Oct 18, 2022

I got some errors when testing the new kotlin vertx client:

): [ERROR : TagRoomModel] defined in org.openapitools.client.models in file Tag.kt, public open fun toRoomModel(): [ERROR : UserRoomModel] defined in org.openapitools.client.models in file User.kt
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (65, 33): Unresolved reference: UserRoomModel
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (66, 9): Unresolved reference: UserRoomModel
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (67, 14): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (68, 12): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (69, 13): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (70, 12): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (71, 9): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (72, 12): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (73, 9): 'this' is not defined in this context
e: /Users/williamcheng/Code/openapi-generator3/samples/client/petstore/kotlin-jvm-vertx/src/main/kotlin/org/openapitools/client/models/User.kt: (74, 14): 'this' is not defined in this context

Here is the config I used:

generatorName: kotlin
outputDir: samples/client/petstore/kotlin-jvm-vertx
library: jvm-vertx
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
templateDir: modules/openapi-generator/src/main/resources/kotlin-client
additionalProperties:
  artifactId: kotlin-petstore-jvm-vertx
  generateRoomModels: "true"
  serializationLibrary: "gson"

Does it work you locally?

Please also add the config to your PR and include the samples. then add a new item in https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-kotlin-client.yaml#L53 to make sure it's tested when samples change.

@anttileppa
Copy link
Contributor Author

@wing328 fixed issue you discovered and added samples for kotlin-jvm-ktor-gson, kotlin-jvm-vertx-gson, kotlin-jvm-vertx-jackson, kotlin-jvm-vertx-jackson-coroutines and kotlin-jvm-vertx-moshi generators (all included into samples-kotlin-client.yaml)

@wing328
Copy link
Member

wing328 commented Oct 19, 2022

LGTM. Thanks for the PR 👍

@wing328 wing328 merged commit 11c43c3 into OpenAPITools:master Oct 19, 2022
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