Header

zio.blocks.openapi.Header
See theHeader companion object
final case class Header(description: Option[Doc] = ..., required: Boolean = ..., deprecated: Boolean = ..., allowEmptyValue: Boolean = ..., style: Option[String] = ..., explode: Option[Boolean] = ..., allowReserved: Option[Boolean] = ..., schema: Option[ReferenceOr[SchemaObject]] = ..., example: Option[Json] = ..., examples: ChunkMap[String, ReferenceOr[Example]] = ..., content: ChunkMap[String, MediaType] = ..., extensions: ChunkMap[String, Json] = ...)

The Header Object follows the structure of the Parameter Object with the following changes:

  1. name MUST NOT be specified, it is given in the corresponding headers map.
  2. in MUST NOT be specified, it is implicitly in header.
  3. All traits that are affected by the location MUST be applicable to a location of header (for example, style).

Value parameters

allowEmptyValue

Sets the ability to pass empty-valued headers. Default value is false.

allowReserved

Determines whether the header value SHOULD allow reserved characters, as defined by RFC3986, to be included without percent-encoding.

content

A map containing the representations for the header. The key is the media type and the value describes it.

deprecated

Specifies that a header is deprecated and SHOULD be transitioned out of usage. Default value is false.

description

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

example

Example of the header's potential value.

examples

Examples of the header's potential value.

explode

When this is true, header values of type array or object generate separate parameters for each value of the array or key-value pair of the map.

extensions

Specification extensions (x-* fields). These allow adding additional properties beyond the standard OpenAPI fields.

required

Determines whether this header is mandatory. Default value is false.

schema

The schema defining the type used for the header.

style

Describes how the header value will be serialized.

Attributes

Companion
object
Source
OpenAPI.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala