Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/PathItem.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 | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
13 class PathItem extends OA\PathItem
14 {
15 /**
16 * @param string|class-string|object|null $ref
17 * @param list<Server>|null $servers
18 * @param list<Parameter>|null $parameters
19 * @param array<string,mixed>|null $x
20 * @param list<Attachable>|null $attachables
21 */
22 public function __construct(
23 ?string $path = null,
24 string|object|null $ref = null,
25 ?string $summary = Generator::UNDEFINED,
26 ?string $description = Generator::UNDEFINED,
27 ?Get $get = null,
28 ?Put $put = null,
29 ?Post $post = null,
30 ?Delete $delete = null,
31 ?Options $options = null,
32 ?Head $head = null,
33 ?Patch $patch = null,
34 ?Trace $trace = null,
35 ?Query $query = null,
36 ?array $servers = null,
37 ?array $parameters = null,
38
39 // abstract annotation
40 ?array $x = null,
41 ?array $attachables = null
42 ) {
43 parent::__construct([
44 'path' => $path ?? Generator::UNDEFINED,
45 'ref' => $ref ?? Generator::UNDEFINED,
46 'summary' => $summary,
47 'description' => $description,
48 'x' => $x ?? Generator::UNDEFINED,
49 'attachables' => $attachables ?? Generator::UNDEFINED,
50 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $query, $servers, $parameters),
51 ]);
52 }
53 }