Builder

class Builder(schemaInference: JsonSchemaInference, defaultContentTypes: List<ContentType>)(source)

Builder for collecting operation Responses keyed by status code.

Report a problem

Constructors

Link copied to clipboard
constructor(schemaInference: JsonSchemaInference, defaultContentTypes: List<ContentType>)

Properties

Link copied to clipboard
Link copied to clipboard

Map of extension properties provided

Link copied to clipboard

Map of HTTP status code (or "default") to a response definition.

Functions

Link copied to clipboard
fun default(configure: Response.Builder.() -> Unit)

Adds the catch-all "default" response.

Link copied to clipboard
operator fun HttpStatusCode.invoke(configure: Response.Builder.() -> Unit = {})

Shorthand to add a response using this HttpStatusCode as the key.

Link copied to clipboard
fun response(statusCode: Int, configure: Response.Builder.() -> Unit)

Adds a response for the given HTTP statusCode.