# Generate API documentation from Swagger on Ktor

DevFeed: [Generate API documentation from Swagger on Ktor](<https://devfeed.tech/articles/generate-api-documentation-from-swagger-on-ktor-25569.md>)

Original publisher: [Read original article](<https://www.marcogomiero.com/posts/2022/ktor-setup-documentation/>)

Author: Marco Gomiero

Published: 2022-03-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Posts on Marco Gomiero](<https://devfeed.tech/sources/posts-on-marco-gomiero.md>)

Topics: [Ktor](<https://devfeed.tech/topics/ktor.md>), [Swagger](<https://devfeed.tech/topics/swagger.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [API](<https://devfeed.tech/topics/api.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>), [Documentation](<https://devfeed.tech/topics/documentation.md>), [backend-development](<https://devfeed.tech/topics/backend-development.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [api-documentation](<https://devfeed.tech/tags/api-documentation.md>), [backend-development](<https://devfeed.tech/tags/backend-development.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [ktor](<https://devfeed.tech/tags/ktor.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [swagger](<https://devfeed.tech/tags/swagger.md>)

## AI overview

A tutorial on generating and exposing API documentation for a Ktor backend. It uses OpenAPI (Swagger) definitions, the Gradle Swagger Generator Plugin, ReDoc, and Ktor's static-content serving capabilities.

## Source excerpt

SERIES: Building a backend with Ktor Part 1: Structuring a Ktor project Part 2: How to persist Ktor logs Part 3: How to use an in-memory database for testing on Ktor Part 4: How to handle database migrations with Liquibase on Ktor Part 5: Generate API documentation from Swagger on Ktor Part 6: How to schedule jobs with Quartz on Ktor Part 7: Moving from mobile to backend development with Ktor When a backend project exposes some APIs, there should also be a place where the clients of those APIs can see and understand what can be consumed. This place can be a document, a text file, a website, etc.