Skip to content

turbomates/ktor-open-api

Repository files navigation

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.

Ktor open API

Creates OpenApi documentation based on Ktor routing and response return types

Usage

post<Response.Either<Response.Data<UUID>, Response.Errors>, RegisterUser>("/register") { command ->
    // ...
    command.locale = this.call.resolveLocale()
    controller<UserController>(this).register(command)
}

get<Response.Data<Preferences>>("/preferences") {
    // ...
}

Commands

See Makefile