27

Kotlin multiplatform client by andrewemery · Pull Request #3900 · OpenAPITools/o...

 4 years ago
source link: https://github.com/OpenAPITools/openapi-generator/pull/3900
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Support for the generation of Kotlin Multiplatform clients.BackgroundThe 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.LibraryThe pull request includes Kotlin Multiplatform generation under the kotlin language and introduces two library options:jvm: (default) to target the existing Kotlin JVM generation.multiplatform: to target Kotlin Multiplatform generation.LimitationsThe 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.TestsThe 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#3899https://github.com/andrewemery/openapi-generator-kotlin-multiplatform-petstore

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK