Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/OpenApi.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 OpenApi extends OA\OpenApi
14 {
15 /**
16 * @param list<Server>|null $servers
17 * @param list<Tag>|null $tags
18 * @param array<PathItem>|null $paths
19 * @param list<Webhook>|null $webhooks
20 * @param array<string,mixed>|null $x
21 * @param list<Attachable>|null $attachables
22 */
23 public function __construct(
24 string $openapi = self::DEFAULT_VERSION,
25 ?Info $info = null,
26 ?array $servers = null,
27 ?array $security = null,
28 ?array $tags = null,
29 ?ExternalDocumentation $externalDocs = null,
30 ?array $paths = null,
31 ?Components $components = null,
32 ?array $webhooks = null,
33
34 // abstract annotation
35 ?array $x = null,
36 ?array $attachables = null
37 ) {
38 parent::__construct([
39 'openapi' => $openapi,
40 'security' => $security ?? Generator::UNDEFINED,
41 'x' => $x ?? Generator::UNDEFINED,
42 'attachables' => $attachables ?? Generator::UNDEFINED,
43 'value' => $this->combine($info, $servers, $tags, $externalDocs, $paths, $components, $webhooks),
44 ]);
45 }
46 }