Builder

Builder for the OpenAPI root document object.

This does not include builder DSL for path items and webhooks. These are generally handled on the routes themselves, then resolved later at runtime.

Report a problem

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override var components: Components?

Optional reusable components for the document (schemas, responses, parameters, request bodies, etc.).

Link copied to clipboard

Specification extensions for the document.

Link copied to clipboard
open override var externalDocs: ExternalDocs?

Optional external documentation for the entire API.

Link copied to clipboard
open override var info: OpenApiInfo

Required OpenAPI "Info Object" describing the API (title, version, optional description, etc.).

Link copied to clipboard
open override var openapiVersion: String

OpenAPI specification version to be written into the resulting document.

Link copied to clipboard

A list of security requirements configured for this API.

Link copied to clipboard

A list of servers configured for this API.

Link copied to clipboard

A list of tags configured for this API.

Functions

Link copied to clipboard

Builds an instance of OpenApiDoc based on the current state of the Builder.

Link copied to clipboard
inline fun <T : Any> extension(name: String, value: T)

Adds a specification-extension to this OpenAPI document.

Link copied to clipboard
open override fun security(configure: Security.Builder.() -> Unit)

Configures one or more global security requirements using the Security DSL.

Link copied to clipboard
open override fun servers(configure: Servers.Builder.() -> Unit)

Configures one or more servers for this API using the Servers DSL.

Link copied to clipboard
open override fun tag(tag: String)

Registers a tag name at the document level.