ResponseConfig

A container for the expected responses of an operation. The container maps an HTTP response code to the expected response. A response code can only have one response object.

Properties

Link copied to clipboard

A short description of the response

Link copied to clipboard

Don't include this response in the openapi-spec

Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T> body(noinline block: SimpleBodyConfig.() -> Unit = {})
fun body(type: TypeDescriptor, block: SimpleBodyConfig.() -> Unit = {})
fun body(type: Schema<*>, block: SimpleBodyConfig.() -> Unit = {})
fun body(type: KType, block: SimpleBodyConfig.() -> Unit = {})

The body returned with this response

Link copied to clipboard
inline fun <T> header(name: String, noinline block: HeaderConfig.() -> Unit = {})
fun header(name: String, type: TypeDescriptor, block: HeaderConfig.() -> Unit = {})
fun header(name: String, type: Schema<*>, block: HeaderConfig.() -> Unit = {})
fun header(name: String, type: KType, block: HeaderConfig.() -> Unit = {})

Possible headers returned with this response

Link copied to clipboard

The multipart-body returned with this response