Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/Components.php

raw
1 <?php declare(strict_types=1);
2
3 /**
4 * @license Apache 2.0
5 */
6
7 namespace OpenApi\Attributes;
8
9 use OpenApi\Annotations as OA;
10 use OpenApi\Generator;
11
12 #[\Attribute(\Attribute::TARGET_CLASS)]
13 class Components extends OA\Components
14 {
15 /**
16 * @param array<Schema|OA\Schema>|null $schemas
17 * @param list<Response>|null $responses
18 * @param list<Parameter>|null $parameters
19 * @param list<RequestBody>|null $requestBodies
20 * @param array<Examples>|null $examples
21 * @param list<Header>|null $headers
22 * @param list<SecurityScheme>|null $securitySchemes
23 * @param list<Link>|null $links
24 * @param array<string,mixed>|null $x
25 * @param list<Attachable>|null $attachables
26 */
27 public function __construct(
28 ?array $schemas = null,
29 ?array $responses = null,
30 ?array $parameters = null,
31 ?array $requestBodies = null,
32 ?array $examples = null,
33 ?array $headers = null,
34 ?array $securitySchemes = null,
35 ?array $links = null,
36 ?array $callbacks = null,
37
38 // abstract annotation
39 ?array $x = null,
40 ?array $attachables = null
41 ) {
42 parent::__construct([
43 'callbacks' => $callbacks ?? Generator::UNDEFINED,
44 'x' => $x ?? Generator::UNDEFINED,
45 'attachables' => $attachables ?? Generator::UNDEFINED,
46 'value' => $this->combine($schemas, $responses, $parameters, $examples, $requestBodies, $headers, $securitySchemes, $links),
47 ]);
48 }
49 }