Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !3900

Kotlin multiplatform client

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/andrewemery/kotlin-multiplatform-client into master Sep 17, 2019
  • Overview 0
  • Commits 10
  • Pipelines 0
  • Changes 223

Created by: andrewemery

Support for the generation of Kotlin Multiplatform clients.

Background

The kotlin language defined in the Swagger Codegen project currently generates a Kotlin client that can run on the JVM. Somewhat recently, JetBrains introduced Kotlin Multiplatform, a platform that provides the ability to share code between various platforms: JVM, JS, iOS, Windows, etc. This pull request adds the ability to generate a Kotlin Multiplatform client.

Library

The pull request includes Kotlin Multiplatform generation under the kotlin language and introduces two library options:

  1. jvm: (default) to target the existing Kotlin JVM generation.
  2. multiplatform: to target Kotlin Multiplatform generation.

Limitations

The current pull request only currently adds support for JVM and iOS platforms but support for other platforms should be trivial to add.

At present, date and date-time objects are rendered as strings. No attempt is made to integrate any third-party date/time libraries.

Tests

The current implementation doesn't include any tests beyond those already included as part of the kotlin language implementation. A test project can be found here that generates the petstore sample and includes tests to verify the correctness of the implementation.

Comments welcome.

References

https://github.com/OpenAPITools/openapi-generator/issues/3899 https://github.com/andrewemery/openapi-generator-kotlin-multiplatform-petstore

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/andrewemery/kotlin-multiplatform-client