OperationDsl

interface OperationDsl

DSL for the operation object.

Note that the externalDocs object is embedded in this DSL.

Functions

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

Defines the request body for this operation.

Link copied to clipboard
abstract infix fun String.cookieParameter(builder: ParameterDsl.() -> Unit)

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

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

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

Link copied to clipboard
abstract infix 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
abstract infix 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
abstract infix fun Int.response(builder: ResponseDsl.() -> Unit)

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

Link copied to clipboard
abstract fun security(key: String)

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

abstract fun security(key: String, vararg scopes: String)

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

Properties

Link copied to clipboard
abstract var deprecated: Boolean?

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

Link copied to clipboard
abstract var description: String?

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

Link copied to clipboard
abstract 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
abstract var externalDocsUrl: String?

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

Link copied to clipboard
abstract var operationId: String?

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

Link copied to clipboard
abstract val parameters: MutableList<Builder<Parameter>>

Parameters that are applicable for this operation.

Link copied to clipboard
abstract var requestBody: RequestBodyBuilder?

The request body applicable for this operation.

Link copied to clipboard
abstract val responses: MutableMap<Int, Builder<ApiResponse>>

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

Link copied to clipboard
abstract val securityRequirements: MutableList<SecurityRequirement>

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

Link copied to clipboard
abstract var summary: String?

A short summary of what the operation does.

Link copied to clipboard
abstract 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.

Inheritors

Link copied to clipboard