https://kotlinlang.org logo
#ktor
Title
# ktor
s

Satyam Agarwal

07/14/2022, 1:07 PM
Hei Hei. I am wondering if Ktor team has concluded something regarding open api doc generation/ swagger support so far ? Would be super interesting to hear if you have thought about how this will be supported in the framework or the project attached in the swagger youtrack ticket will be adopted as is ? It was mentioned in the roadmap https://blog.jetbrains.com/ktor/2022/02/11/ktor-roadmap-what-s-next/
👀 1
s

simon.vergauwen

07/14/2022, 7:20 PM
Additional question, is it somehow going to be related to Type Safe Routes? I've been looking at them as a point for OpenAPI integration for building library, but then @Satyam Agarwal shared it's on the current roadmap.
s

Satyam Agarwal

07/15/2022, 5:31 AM
@Aleksei Tirman [JB]
t

Tim Abil

07/19/2022, 7:56 PM
a

Aleksei Tirman [JB]

07/20/2022, 7:24 AM
We have plans to implement OpenAPI specification generation for Ktor applications via a plugin in IDEA.
s

simon.vergauwen

07/25/2022, 7:18 AM
@Aleksei Tirman [JB] so there will be no ways to give any guarantees about the OpenAPI docs at build-time? It will be a manual task from IDEA to generate it?
@Tim Abil am I seeing it correctly that the linked library does not generate any documentation for
receive
or
respond
?
t

Tim Abil

07/25/2022, 2:41 PM
Response schemas aren't supported yet but request should be generated if
enableRequestSchemas
feature flag is set.
👍 1
a

Aleksei Tirman [JB]

07/25/2022, 2:43 PM
@simon.vergauwen we didn’t start implementing it yet so I cannot provide such details.
👍 1
s

simon.vergauwen

07/26/2022, 9:12 AM
Thanks for letting me know @Aleksei Tirman [JB]. Very much looking forward to seeing this take shape! Not sure if I can share any thoughts, or feedback on the feature but a big requirement for most projects where I needed this was the build-time guarantee that the doc and API are aligned. So as long as CI can guarantee something like that that'd be great. Even if it works in a similar style to KnitX where it compares output would be fine.
👍 2
2 Views