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

Marcin Wiśniewski

10/03/2019, 1:27 PM
Is there any working example of REST API application with ktor and swagger?
e

e5l

10/03/2019, 1:28 PM
Hi @Marcin Wiśniewski, you can use ktor idea plugin to generate API from a swagger file.
m

Marcin Wiśniewski

10/03/2019, 1:29 PM
But how can I embed swagger docs inside?
Let's say I would like to have API docs behind /v1/api-docs
e

e5l

10/03/2019, 1:32 PM
e

Egor Babarykin

10/03/2019, 1:41 PM
Is there any possibility to generate swagger/openapi3 over route declaration in ktor?
🚫 1
m

Marcin Wiśniewski

10/03/2019, 2:17 PM
I think that the better idea is to use springboot instead of ktor. Springboot is well integrated with swagger-ui
e

Egor Babarykin

10/03/2019, 2:27 PM
spring mvc does not support generation of openapi3 specification by mvc configuration there is support of openapi3 generation only for apache cxf
m

Marcin Wiśniewski

10/03/2019, 2:35 PM
I know, unfortunately. But automatically generated swagger ui is still more pragmatic for me
p

Petr Makagon

10/05/2019, 4:28 PM
5 Views