Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

A Ktor plugin that adds a Tegral OpenAPI DSL integration to the Ktor application, including:

Functions

Link copied to clipboard
fun Application.describe(description: RootDsl.() -> Unit)

Specify additional information about the API via the RootDsl.

infix fun Route.describe(description: OperationDsl.() -> Unit): Route

Adds an OpenAPI operation description to this route.

Link copied to clipboard
fun Route.describeSubroutes(hook: OperationDsl.() -> Unit)

Adds a hook to the given route. All following descriptions on endpoints that are sub-endpoints of this route will have the given hook applied to their description.

Link copied to clipboard
fun Route.openApiEndpoint(path: String): Route

Adds a get(path) endpoint that will return the OpenAPI document for this API.

Properties

Link copied to clipboard
val Application.openApi: TegralOpenApiKtor

Retrieve the TegralOpenApiKtor plugin from this application.