OpenApiDoc

data class OpenApiDoc(val openapi: String = OPENAPI_VERSION, val info: OpenApiInfo, val servers: List<Server>? = null, val paths: Map<String, ReferenceOr<PathItem>> = emptyMap(), val webhooks: Map<String, ReferenceOr<PathItem>>? = null, val components: Components? = null, val security: List<SecurityRequirement>? = null, val tags: List<Tag>? = null, val externalDocs: ExternalDocs? = null, val extensions: Map<String, GenericElement>? = null) : Extensible(source)

Constructors

Link copied to clipboard
constructor(openapi: String = OPENAPI_VERSION, info: OpenApiInfo, servers: List<Server>? = null, paths: Map<String, ReferenceOr<PathItem>> = emptyMap(), webhooks: Map<String, ReferenceOr<PathItem>>? = null, components: Components? = null, security: List<SecurityRequirement>? = null, tags: List<Tag>? = null, externalDocs: ExternalDocs? = null, extensions: Map<String, GenericElement>? = null)

Types

Link copied to clipboard

Builder for the OpenAPI root document object.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

An element to hold various schemas for the specification.

Link copied to clipboard
open override val extensions: Map<String, GenericElement>?

Any additional external documentation for this OpenAPI document.

Link copied to clipboard

Additional external documentation.

Link copied to clipboard

Provides metadata about the API. The clients can use the metadata if needed.

Link copied to clipboard
Link copied to clipboard

The available paths and operations for the API.

Link copied to clipboard

A declaration of which security mechanisms can be used across the API. The list of values includes alternative security requirement objects that can be used. Only one of the security requirement objects needs to be satisfied to authorize a request. Individual operations can override this definition. To make security optional, an empty security requirement can be included in the array.

Link copied to clipboard

An array of Server Objects, which provide connectivity information to a target server.

Link copied to clipboard
val tags: List<Tag>?

A list of tags used by the specification with additional metadata. The order of the tags can be used to reflect on their order by the parsing tools. Not all tags that are used by the 'Operation' Object must be declared. The tags that are not declared MAY be organized randomly or based on the tools' logic. Each tag name in the list MUST be unique.

Link copied to clipboard

The incoming webhooks that MAY be received as part of this API and that the API consumer MAY choose to implement. Closely related to the callbacks feature, this section describes requests initiated other than by an API call, for example, by an out-of-band registration. The key name is a unique string to refer to each webhook, while the (optionally referenced) Path Item Object describes a request that may be initiated by the API provider and the expected responses.