|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* It's free open-source software released under the MIT License. |
|
5
|
|
|
* |
|
6
|
|
|
* @author Anatoly Fenric <[email protected]> |
|
7
|
|
|
* @copyright Copyright (c) 2018, Anatoly Fenric |
|
8
|
|
|
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE |
|
9
|
|
|
* @link https://github.com/sunrise-php/http-router |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
namespace Sunrise\Http\Router\Annotation\OpenApi; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* @Annotation |
|
16
|
|
|
* |
|
17
|
|
|
* @Target({"ALL"}) |
|
18
|
|
|
* |
|
19
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#parameter-object |
|
20
|
|
|
*/ |
|
21
|
|
|
final class Parameter extends AbstractAnnotation implements ParameterInterface |
|
22
|
|
|
{ |
|
23
|
|
|
|
|
24
|
|
|
/** |
|
25
|
|
|
* @Required |
|
26
|
|
|
* |
|
27
|
|
|
* @Enum({"cookie", "header", "query"}) |
|
28
|
|
|
* |
|
29
|
|
|
* @var string |
|
30
|
|
|
* |
|
31
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterin |
|
32
|
|
|
*/ |
|
33
|
|
|
public $in; |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @Required |
|
37
|
|
|
* |
|
38
|
|
|
* @var string |
|
39
|
|
|
* |
|
40
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parametername |
|
41
|
|
|
*/ |
|
42
|
|
|
public $name; |
|
43
|
|
|
|
|
44
|
|
|
/** |
|
45
|
|
|
* @var string |
|
46
|
|
|
* |
|
47
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterdescription |
|
48
|
|
|
*/ |
|
49
|
|
|
public $description; |
|
50
|
|
|
|
|
51
|
|
|
/** |
|
52
|
|
|
* @var bool |
|
53
|
|
|
* |
|
54
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterrequired |
|
55
|
|
|
*/ |
|
56
|
|
|
public $required; |
|
57
|
|
|
|
|
58
|
|
|
/** |
|
59
|
|
|
* @var bool |
|
60
|
|
|
* |
|
61
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterdeprecated |
|
62
|
|
|
*/ |
|
63
|
|
|
public $deprecated; |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @var bool |
|
67
|
|
|
* |
|
68
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterallowemptyvalue |
|
69
|
|
|
*/ |
|
70
|
|
|
public $allowEmptyValue; |
|
71
|
|
|
|
|
72
|
|
|
/** |
|
73
|
|
|
* @Enum({"matrix", "label", "form", "simple", "spaceDelimited", "pipeDelimited", "deepObject"}) |
|
74
|
|
|
* |
|
75
|
|
|
* @var string |
|
76
|
|
|
* |
|
77
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterstyle |
|
78
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#style-values |
|
79
|
|
|
*/ |
|
80
|
|
|
public $style; |
|
81
|
|
|
|
|
82
|
|
|
/** |
|
83
|
|
|
* @var bool |
|
84
|
|
|
* |
|
85
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexplode |
|
86
|
|
|
*/ |
|
87
|
|
|
public $explode; |
|
88
|
|
|
|
|
89
|
|
|
/** |
|
90
|
|
|
* @var bool |
|
91
|
|
|
* |
|
92
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterallowreserved |
|
93
|
|
|
*/ |
|
94
|
|
|
public $allowReserved; |
|
95
|
|
|
|
|
96
|
|
|
/** |
|
97
|
|
|
* @var \Sunrise\Http\Router\Annotation\OpenApi\SchemaInterface |
|
98
|
|
|
* |
|
99
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterschema |
|
100
|
|
|
*/ |
|
101
|
|
|
public $schema; |
|
102
|
|
|
|
|
103
|
|
|
/** |
|
104
|
|
|
* @var mixed |
|
105
|
|
|
* |
|
106
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexample |
|
107
|
|
|
*/ |
|
108
|
|
|
public $example; |
|
109
|
|
|
|
|
110
|
|
|
/** |
|
111
|
|
|
* @var array<\Sunrise\Http\Router\Annotation\OpenApi\ExampleInterface> |
|
112
|
|
|
* |
|
113
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parameterexamples |
|
114
|
|
|
*/ |
|
115
|
|
|
public $examples; |
|
116
|
|
|
|
|
117
|
|
|
/** |
|
118
|
|
|
* @var array<\Sunrise\Http\Router\Annotation\OpenApi\MediaTypeInterface> |
|
119
|
|
|
* |
|
120
|
|
|
* @link https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#user-content-parametercontent |
|
121
|
|
|
*/ |
|
122
|
|
|
public $content; |
|
123
|
|
|
} |
|
124
|
|
|
|