Closed michalharakal closed 4 years ago
4.3.1-Snapshot of open-api generator already contains initial implementaion of kotlin-multiplatform ktor based client. See original message on redditReddit post
Mac/Linux:
$ java -jar openapi-generator-cli.jar generate -g kotlin -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml --library multiplatform -o /var/tmp/kotlin/
Windows:
$ java -jar openapi-generator-cli.jar generate -g kotlin -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml --library multiplatform -o C:\tmp\kotlin
Original android version of ducon client contains remote networking clinet generated by gradle plugin from OpenApi specification. See original implementation for details https://github.com/dukecon/dukecon_android/blob/master/dukecon-api/build.gradle
Since originally generated code is java and also has dependecy on java libraries (e.g. threeten for date time) was not posible to directly use it in a kotlin multiplatform project.
There are two ready to use solution which can be considered to apply as solution:
The goal of this task is, that remote modules consist only from gradle script and OpenApi definition for given backend and mappers to RemoteData Entities.
If finished and working, this will prove that ideas of modulaer and clean architecture are implemented properly in this project.