OperationBuilder

Builder for OperationDsl

Constructors

Link copied to clipboard
constructor(context: OpenApiDslContext)

Properties

Link copied to clipboard
open override var deprecated: Boolean?

If true, declares this operation to be deprecated (false by default).

Link copied to clipboard
open override var description: String?

A verbose explanation of the operation behavior. CommonMark syntax may be used for rich text representation.

Link copied to clipboard
open override var externalDocsDescription: String?

A description of the additional external documentation for this operation. CommonMark syntax may be used for rich text representation.

Link copied to clipboard
open override var externalDocsUrl: String?

A URL that points to additional external documentation for this operation. Must be a valid URL.

Link copied to clipboard
open override var operationId: String?

A string used to identify the operation, unique among all operations described in the API.

Link copied to clipboard
open override val parameters: MutableList<Buildable<Parameter>>

Parameters that are applicable for this operation.

Link copied to clipboard
open override var requestBody: RequestBodyBuilder?

The request body applicable for this operation.

Link copied to clipboard
open override val responses: MutableMap<Int, Buildable<ApiResponse>>

The list of possible responses as they are returned from executing this operation.

Link copied to clipboard
open override val securityRequirements: MutableList<SecurityRequirement>

A declaration of which security mechanisms can be used for this operation.

Link copied to clipboard
open override var summary: String?

A short summary of what the operation does.

Link copied to clipboard
open override val tags: MutableList<String>

A list of tags for API documentation control. Tags can be used for logical grouping of operations by resources or any other qualifier.

Functions

Link copied to clipboard
open override fun body(builder: RequestBodyDsl.() -> Unit)

Defines the request body for this operation.

Link copied to clipboard
open override fun build(): Operation
Link copied to clipboard
open infix override fun String.cookieParameter(builder: ParameterDsl.() -> Unit)

Creates a cookie parameter, with the given string as the name of the cookie.

Link copied to clipboard
open infix override fun String.headerParameter(builder: ParameterDsl.() -> Unit)

Creates a header parameter, with the given string as the name of the header.

Link copied to clipboard
open infix override fun String.pathParameter(builder: ParameterDsl.() -> Unit)

Creates a path parameter, with the given string as the name of the corresponding path segment.

Link copied to clipboard
open infix override fun String.queryParameter(builder: ParameterDsl.() -> Unit)

Creates a query parameter, with the given string as the name of the query parameter key.

Link copied to clipboard
open infix override fun Int.response(builder: ResponseDsl.() -> Unit)

Creates a response for the given response code (passed as an integer value).

Link copied to clipboard
open override fun security(key: String)

Adds a security requirement object to this operation with the given key.

open override fun security(key: String, vararg scopes: String)

Adds a security requirement object to this operation with the given key and scopes.