|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the API Platform project. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Kévin Dunglas <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
declare(strict_types=1); |
|
13
|
|
|
|
|
14
|
|
|
namespace ApiPlatform\Core\OpenApi; |
|
15
|
|
|
|
|
16
|
|
|
class Components |
|
17
|
|
|
{ |
|
18
|
|
|
private $schemas; |
|
19
|
|
|
private $responses; |
|
20
|
|
|
private $parameters; |
|
21
|
|
|
private $examples; |
|
22
|
|
|
private $requestBodies; |
|
23
|
|
|
private $headers; |
|
24
|
|
|
private $securitySchemes; |
|
25
|
|
|
private $links; |
|
26
|
|
|
private $callbacks; |
|
27
|
|
|
|
|
28
|
|
|
public function __construct(array $schemas = [], array $responses = [], array $parameters = [], array $examples = [], array $requestBodies = [], array $headers = [], array $securitySchemes = [], array $links = [], array $callbacks = []) |
|
29
|
|
|
{ |
|
30
|
|
|
$this->schemas = $schemas; |
|
31
|
|
|
$this->responses = $responses; |
|
32
|
|
|
$this->parameters = $parameters; |
|
33
|
|
|
$this->examples = $examples; |
|
34
|
|
|
$this->requestBodies = $requestBodies; |
|
35
|
|
|
$this->headers = $headers; |
|
36
|
|
|
$this->securitySchemes = $securitySchemes; |
|
37
|
|
|
$this->links = $links; |
|
38
|
|
|
$this->callbacks = $callbacks; |
|
39
|
|
|
} |
|
40
|
|
|
|
|
41
|
|
|
public function getSchemas() |
|
42
|
|
|
{ |
|
43
|
|
|
return $this->schemas; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
public function getResponses() |
|
47
|
|
|
{ |
|
48
|
|
|
return $this->responses; |
|
49
|
|
|
} |
|
50
|
|
|
|
|
51
|
|
|
public function getParameters() |
|
52
|
|
|
{ |
|
53
|
|
|
return $this->parameters; |
|
54
|
|
|
} |
|
55
|
|
|
|
|
56
|
|
|
public function getExamples() |
|
57
|
|
|
{ |
|
58
|
|
|
return $this->examples; |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
public function getRequestBodies() |
|
62
|
|
|
{ |
|
63
|
|
|
return $this->requestBodies; |
|
64
|
|
|
} |
|
65
|
|
|
|
|
66
|
|
|
public function getHeaders() |
|
67
|
|
|
{ |
|
68
|
|
|
return $this->headers; |
|
69
|
|
|
} |
|
70
|
|
|
|
|
71
|
|
|
public function getSecuritySchemes() |
|
72
|
|
|
{ |
|
73
|
|
|
return $this->securitySchemes; |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
public function getLinks() |
|
77
|
|
|
{ |
|
78
|
|
|
return $this->links; |
|
79
|
|
|
} |
|
80
|
|
|
|
|
81
|
|
|
public function getCallbacks() |
|
82
|
|
|
{ |
|
83
|
|
|
return $this->callbacks; |
|
84
|
|
|
} |
|
85
|
|
|
} |
|
86
|
|
|
|