Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/OperationTrait.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\Generator;
10
11 trait OperationTrait
12 {
13 /**
14 * @param list<Server> $servers
15 * @param list<string> $tags
16 * @param list<Parameter> $parameters
17 * @param list<Response> $responses
18 * @param array<string,mixed>|null $x
19 * @param list<Attachable>|null $attachables
20 */
21 public function __construct(
22 ?string $path = null,
23 ?string $operationId = null,
24 ?string $description = Generator::UNDEFINED,
25 ?string $summary = Generator::UNDEFINED,
26 ?array $security = null,
27 ?array $servers = null,
28 ?RequestBody $requestBody = null,
29 ?array $tags = null,
30 ?array $parameters = null,
31 ?array $responses = null,
32 ?array $callbacks = null,
33 ?ExternalDocumentation $externalDocs = null,
34 ?bool $deprecated = null,
35
36 // abstract annotation
37 ?array $x = null,
38 ?array $attachables = null
39 ) {
40 parent::__construct([
41 'path' => $path ?? Generator::UNDEFINED,
42 'operationId' => $operationId ?? Generator::UNDEFINED,
43 'description' => $description,
44 'summary' => $summary,
45 'security' => $security ?? Generator::UNDEFINED,
46 'servers' => $servers ?? Generator::UNDEFINED,
47 'tags' => $tags ?? Generator::UNDEFINED,
48 'callbacks' => $callbacks ?? Generator::UNDEFINED,
49 'deprecated' => $deprecated ?? Generator::UNDEFINED,
50 'x' => $x ?? Generator::UNDEFINED,
51 'attachables' => $attachables ?? Generator::UNDEFINED,
52 'value' => $this->combine($requestBody, $responses, $parameters, $externalDocs),
53 ]);
54 }
55 }