How can I use Swagger UI with Ktor, any reference?
# ktor
h
How can I use Swagger UI with Ktor, any reference?
n
Swagger UI is generated from an OpenAPI specification, so you'd need to document your API as an OpenAPI spec, then you can generate the Swagger UI for it.
p
I think he meant if you can generate it from the Kotlin sources eg. by placing open api annotations on routes and stuff
❤️ 1
h
Thanks for replying. I've checked the swagger website but I didn't find the solution. Does the swagger not support the Ktor yet officially?
n
If you're looking to generate the API spec from your existing API, try this: https://swagger.io/resources/articles/documenting-apis-with-swagger/#how-to-generate-openapi-from-existing-apis-7 Swagger Inspector should work with any API, regardless of implementation language.
h
It’s helpful to me. Thanks a lot.