Header
in package
implements
OpenApiAttributeInterface
The attribute may be used to add one or more headers to the definition of a response or as attribute of content encoding by defining it as field {@see \OpenApi\Attributes\Responses\ApiResponse::$headers} or {@see \OpenApi\Attributes\Media\Content::$encoding}.
Please note that request headers are defined as Header Parameter.
Interfaces, Classes, Traits and Enums
Table of Contents
- $deprecated : bool
- $description : string
- $name : string
- $ref : string
- $required : bool
- $schema : Schema|null
- __construct() : mixed
Properties
$deprecated
public
bool
$deprecated
= false
$description
public
string
$description
= ""
$name
public
string
$name
$ref
public
string
$ref
= ""
$required
public
bool
$required
= false
$schema
public
Schema|null
$schema
= null
Methods
__construct()
public
__construct(string $name[, string $description = "" ][, Schema|null $schema = null ][, bool $required = false ][, bool $deprecated = false ][, string $ref = "" ]) : mixed
Parameters
- $name : string
-
Required: The name of the header. The name is only used as the key to store this header in a map.
- $description : string = ""
-
Additional description data to provide on the purpose of the header
- $schema : Schema|null = null
-
The schema defining the type used for the header. Ignored if the properties content or array are specified.
- $required : bool = false
-
Determines whether this header is mandatory. The property may be included and its default value is false.
- $deprecated : bool = false
-
Specifies that a header is deprecated and should be transitioned out of usage.
- $ref : string = ""
-
A reference to a header defined in components headers.