With Ktor, do we have an easy way as with Spring t...
# ktor
m
With Ktor, do we have an easy way as with Spring to decorate methods to automatically generate OpenAPI definitions or some plugin in IntelliJ to generate it based on the available routes etc? Would be very handy. If there isn't any out there that is convenient, I'm thinking of creating one. But would be awesome if someone already built it!
s
I've been using Tegral OpenAPI, Example. You can easily also create top-level functions for common things, common OpenAPI functions. I'd love something like this but 1st party, and integrated with Resources plugin but it's been fulfilling all my needs so far so I haven't really bother looking deeply into it 😄
I like it because it works with the existing Ktor API, instead of building a new Route DSL as some other libraries have done.
r
I maintain kompendium https://bkbn.gitbook.io/kompendium There is a jetbrains official generator, tho I believe it requires IntelliJ paid license
Kompendium has a resource plugin integration btw 😉
a
The IntelliJ plugin, although paid, is almost worthless at this point. No POST request support, no customization, defaults that don’t make a lot of sense. It feels more like an alpha.
v
@Arjan van Wieringen thanks for your feedback! Have you tried IntelliJ Idea 2023.2 nightly? A lot of improvements on OpenAPI generator is there, and we are constantly working on making it better
a
Not yet! I’ll try. Thanks!