Debian Codegraph @

vendor/zircote/swagger-php/src/Annotations/Header.php

raw
1 <?php declare(strict_types=1);
2 /**
3 * @license Apache 2.0
4 */
5
6 namespace OpenApi\Annotations;
7
8 use OpenApi\Generator;
9
10 /**
11 * @see [Header Object](https://spec.openapis.org/oas/v3.1.1.html#header-object)
12 *
13 * @Annotation
14 */
15 class Header extends AbstractAnnotation
16 {
17 /**
18 * The relative or absolute path to the endpoint.
19 *
20 * @see [Reference Object](https://spec.openapis.org/oas/v3.1.1.html#reference-object)
21 *
22 * @var string|class-string|object
23 */
24 public $ref = Generator::UNDEFINED;
25
26 /**
27 * @var string
28 */
29 public $header = Generator::UNDEFINED;
30
31 /**
32 * A brief description of the parameter.
33 *
34 * This could contain examples of use.
35 * CommonMark syntax MAY be used for rich text representation.
36 *
37 * @var string
38 */
39 public $description = Generator::UNDEFINED;
40
41 /**
42 * @var bool
43 */
44 public $required = Generator::UNDEFINED;
45
46 /**
47 * Schema object.
48 *
49 * @var Schema
50 */
51 public $schema = Generator::UNDEFINED;
52
53 /**
54 * Specifies that a parameter is deprecated and SHOULD be transitioned out of usage.
55 *
56 * @var bool
57 */
58 public $deprecated = Generator::UNDEFINED;
59
60 /**
61 * Sets the ability to pass empty-valued parameters.
62 *
63 * This is valid only for query parameters and allows sending a parameter with an empty value.
64 *
65 * Default value is false.
66 *
67 * If style is used, and if behavior is n/a (cannot be serialized), the value of allowEmptyValue SHALL be ignored.
68 *
69 * @var bool
70 */
71 public $allowEmptyValue = Generator::UNDEFINED;
72
73 /**
74 * @inheritdoc
75 */
76 public static $_required = ['header', 'schema'];
77
78 /**
79 * @inheritdoc
80 */
81 public static $_types = [
82 'header' => 'string',
83 'description' => 'string',
84 ];
85
86 /**
87 * @inheritdoc
88 */
89 public static $_nested = [
90 Schema::class => 'schema',
91 Attachable::class => ['attachables'],
92 ];
93
94 /**
95 * @inheritdoc
96 */
97 public static $_parents = [
98 Encoding::class,
99 Components::class,
100 Response::class,
101 ];
102 }