Hi all. i am trying to generate kotlin from a Yaml file (with swagger codegen). And i have a lot of dependency problem, does anyone has already try it ?
m
Mike
08/28/2019, 1:10 PM
If you aren't already, I'd suggest using this generator. https://openapi-generator.tech
If you're using the above linked generator, then I have some experience with it, so may be able to help.
The int128 one hasn't been updated in 5 months, and just refernces the openapi-generator. I'd suggest just using the openapi-generator directly. I've found it very easy to use, and actively maintained.
d
DALDEI
09/13/2019, 4:05 AM
data point.
I have most recently tried and used this gradle plugin:
id 'org.hidetake.swagger.generator' version '2.16.0'
Took a few tries at others to find the one with the versions of codegen that worked for me. its not anything fancier then a plugin for swagger-codegen, but does work and supports ALL the parameters (ya the ones you cant find in the docs) for codgen.
Recently used it to codegen a java and kotlin set of client API's for a public swagger API.
Easily accepted some template mods and confiigs to 'tune' the kotlin codegen, particulary the class names if the spec doesnt use operation id.
✔️ 1
m
Mike
09/13/2019, 12:27 PM
This looks like it wraps/leverages the generator I linked above for code generation. And then provides some additional options for using other generators to produce other items.
Note that OpenAPI generator is now on 4+, and this is using 3.
One thing I like about the OpenAPI fork of swagger gen is it doesn't require different versions of the generator to target v2 and v3 of the Specification.
d
DALDEI
09/17/2019, 2:13 AM
That part was annoying (getting the right version) -- was difficult even figuring out there were versions, where they were and what they did.