Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/Webhook.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 Webhook extends OA\Webhook
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 $webhook = null,
24 ?string $path = null,
25 string|object|null $ref = null,
26 ?string $summary = Generator::UNDEFINED,
27 ?string $description = Generator::UNDEFINED,
28 ?Get $get = null,
29 ?Put $put = null,
30 ?Post $post = null,
31 ?Delete $delete = null,
32 ?Options $options = null,
33 ?Head $head = null,
34 ?Patch $patch = null,
35 ?Trace $trace = null,
36 ?Query $query = null,
37 ?array $servers = null,
38 ?array $parameters = null,
39
40 // abstract annotation
41 ?array $x = null,
42 ?array $attachables = null
43 ) {
44 parent::__construct([
45 'webhook' => $webhook ?? Generator::UNDEFINED,
46 'path' => $path ?? Generator::UNDEFINED,
47 'ref' => $ref ?? Generator::UNDEFINED,
48 'summary' => $summary,
49 'description' => $description,
50 'x' => $x ?? Generator::UNDEFINED,
51 'attachables' => $attachables ?? Generator::UNDEFINED,
52 'value' => $this->combine($get, $put, $post, $delete, $options, $head, $patch, $trace, $query, $servers, $parameters),
53 ]);
54 }
55 }