HeaderDsl

DSL interface for response headers

Inheritors

Functions

Link copied to clipboard
abstract fun schema(ktype: KType)

Sets the schema of this object to be of the given KType. The type will be converted to a schema.

Link copied to clipboard
inline fun <T> MediaTypeDsl.schema()

Set the schema to be of type T.

inline fun <T> MediaTypeDsl.schema(example: T)

Set the schema to be of type T, with the given object set as the example.

fun <T> MediaTypeDsl.schema(ktype: KType, example: T)

Set the schema to be of type ktype, with the given object set as the example.

Properties

Link copied to clipboard
abstract var deprecated: Boolean?

Specifies that a header is deprecated and should be transitioned out of usage. False by default.

Link copied to clipboard
abstract var description: String?

A brief description of the header. This could contain examples of use. CommonMark syntax may be used for rich text representation.

Link copied to clipboard
abstract var example: Any?

The example for this object. Should match the given schema.

Link copied to clipboard
abstract var explode: Boolean?

When set to true, parameter values of type array or object generate separate parameters for each value of the array or key-value pair of the map. Has no effect for other types of parameters. Default value is false.

Link copied to clipboard
abstract var schema: Schema<*>?

The schema for this object.