View Source OpenApiSpex.Header (open_api_spex v3.18.3)

Defines the OpenApiSpex.Header.t type.

Link to this section Summary

Link to this section Types

@type t() :: %OpenApiSpex.Header{
  allowEmptyValue: boolean() | nil,
  deprecated: boolean() | nil,
  description: String.t() | nil,
  example: any(),
  examples:
    %{
      required(String.t()) =>
        OpenApiSpex.Example.t() | OpenApiSpex.Reference.t()
    }
    | nil,
  explode: boolean() | nil,
  extensions: %{required(String.t()) => any()} | nil,
  required: boolean() | nil,
  schema: OpenApiSpex.Schema.t() | OpenApiSpex.Reference.t() | nil,
  style: :simple
}

Header Object

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

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