Response

data class Response(val description: String, val headers: Map<String, ReferenceOr<Header>>? = null, val content: Map<@Serializable(with = ContentTypeSerializer::class) ContentType, MediaType>? = null, val links: Map<String, ReferenceOr<Link>>? = null, val extensions: ExtensionProperties? = null) : Extensible(source)

Describes a response returned by an operation including description, headers, content, and links.

Report a problem

Constructors

Link copied to clipboard
constructor(description: String, headers: Map<String, ReferenceOr<Header>>? = null, content: Map<@Serializable(with = ContentTypeSerializer::class) ContentType, MediaType>? = null, links: Map<String, ReferenceOr<Link>>? = null, extensions: ExtensionProperties? = null)

Types

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

Builder for constructing a Response definition.

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Map of media type to MediaType object, describing the response content.

Link copied to clipboard

Human-readable description of the response.

Link copied to clipboard
open override val extensions: ExtensionProperties?

Specification-extensions for this response (keys must start with x-).

Link copied to clipboard

Optional map of response header parameters.

Link copied to clipboard

Map of link names to Link objects for dynamic links that can be followed from the response.