Debian Codegraph @

vendor/zircote/swagger-php/src/Attributes/XmlContent.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 XmlContent extends OA\XmlContent
14 {
15 /**
16 * @param list<Encoding> $encoding
17 * @param string|class-string|object|null $ref
18 * @param list<string> $required
19 * @param list<Property> $properties
20 * @param string|non-empty-array<string>|null $type
21 * @param array<Examples> $examples
22 * @param array<Schema|OA\Schema> $allOf
23 * @param array<Schema|OA\Schema> $anyOf
24 * @param array<Schema|OA\Schema> $oneOf
25 * @param list<string|int|float|bool|\UnitEnum|null>|class-string|null $enum
26 * @param array<string,mixed>|null $x
27 * @param list<Attachable>|null $attachables
28 */
29 public function __construct(
30 ?array $encoding = null,
31
32 // Schema
33 string|object|null $ref = null,
34 ?string $schema = null,
35 ?string $title = null,
36 ?string $description = Generator::UNDEFINED,
37 ?int $maxProperties = null,
38 ?int $minProperties = null,
39 ?array $required = null,
40 ?array $properties = null,
41 string|array|null $type = null,
42 ?string $format = null,
43 ?Items $items = null,
44 ?string $collectionFormat = null,
45 ?string $pattern = null,
46 ?Discriminator $discriminator = null,
47 ?bool $readOnly = null,
48 ?bool $writeOnly = null,
49 ?Xml $xml = null,
50 ?ExternalDocumentation $externalDocs = null,
51 mixed $example = Generator::UNDEFINED,
52 ?array $examples = null,
53 ?bool $nullable = null,
54 ?bool $deprecated = null,
55 ?array $allOf = null,
56 ?array $anyOf = null,
57 ?array $oneOf = null,
58 ?string $contentEncoding = null,
59 ?string $contentMediaType = null,
60
61 // JSON Schema
62 mixed $default = Generator::UNDEFINED,
63 int|float|null $maximum = null,
64 bool|int|float|null $exclusiveMaximum = null,
65 int|float|null $minimum = null,
66 bool|int|float|null $exclusiveMinimum = null,
67 int|null $maxLength = null,
68 int|null $minLength = null,
69 int|null $maxItems = null,
70 int|null $minItems = null,
71 bool|null $uniqueItems = null,
72 array|string|null $enum = null,
73 mixed $not = Generator::UNDEFINED,
74 bool|AdditionalProperties|null $additionalProperties = null,
75 array|null $additionalItems = null,
76 array|null $contains = null,
77 array|null $patternProperties = null,
78 array|null $unevaluatedProperties = null,
79 mixed $dependencies = Generator::UNDEFINED,
80 mixed $propertyNames = Generator::UNDEFINED,
81 mixed $const = Generator::UNDEFINED,
82
83 // abstract annotation
84 ?array $x = null,
85 ?array $attachables = null
86 ) {
87 parent::__construct([
88 // Schema
89 'ref' => $ref ?? Generator::UNDEFINED,
90 'schema' => $schema ?? Generator::UNDEFINED,
91 'title' => $title ?? Generator::UNDEFINED,
92 'description' => $description,
93 'maxProperties' => $maxProperties ?? Generator::UNDEFINED,
94 'minProperties' => $minProperties ?? Generator::UNDEFINED,
95 'required' => $required ?? Generator::UNDEFINED,
96 'properties' => $properties ?? Generator::UNDEFINED,
97 'type' => $type ?? Generator::UNDEFINED,
98 'format' => $format ?? Generator::UNDEFINED,
99 'collectionFormat' => $collectionFormat ?? Generator::UNDEFINED,
100 'pattern' => $pattern ?? Generator::UNDEFINED,
101 'readOnly' => $readOnly ?? Generator::UNDEFINED,
102 'writeOnly' => $writeOnly ?? Generator::UNDEFINED,
103 'xml' => $xml ?? Generator::UNDEFINED,
104 'example' => $example,
105 'nullable' => $nullable ?? Generator::UNDEFINED,
106 'deprecated' => $deprecated ?? Generator::UNDEFINED,
107 'allOf' => $allOf ?? Generator::UNDEFINED,
108 'anyOf' => $anyOf ?? Generator::UNDEFINED,
109 'oneOf' => $oneOf ?? Generator::UNDEFINED,
110 'contentEncoding' => $contentEncoding ?? Generator::UNDEFINED,
111 'contentMediaType' => $contentMediaType ?? Generator::UNDEFINED,
112
113 // JSON Schema
114 'default' => $default,
115 'maximum' => $maximum ?? Generator::UNDEFINED,
116 'exclusiveMaximum' => $exclusiveMaximum ?? Generator::UNDEFINED,
117 'minimum' => $minimum ?? Generator::UNDEFINED,
118 'exclusiveMinimum' => $exclusiveMinimum ?? Generator::UNDEFINED,
119 'maxLength' => $maxLength ?? Generator::UNDEFINED,
120 'minLength' => $minLength ?? Generator::UNDEFINED,
121 'maxItems' => $maxItems ?? Generator::UNDEFINED,
122 'minItems' => $minItems ?? Generator::UNDEFINED,
123 'uniqueItems' => $uniqueItems ?? Generator::UNDEFINED,
124 'enum' => $enum ?? Generator::UNDEFINED,
125 'not' => $not,
126 'additionalProperties' => $additionalProperties ?? Generator::UNDEFINED,
127 'additionalItems' => $additionalItems ?? Generator::UNDEFINED,
128 'contains' => $contains ?? Generator::UNDEFINED,
129 'patternProperties' => $patternProperties ?? Generator::UNDEFINED,
130 'unevaluatedProperties' => $unevaluatedProperties ?? Generator::UNDEFINED,
131 'dependencies' => $dependencies,
132 'propertyNames' => $propertyNames,
133 'const' => $const,
134
135 // abstract annotation
136 'x' => $x ?? Generator::UNDEFINED,
137 'attachables' => $attachables ?? Generator::UNDEFINED,
138 'value' => $this->combine($items, $discriminator, $externalDocs, $examples, $encoding),
139 ]);
140 }
141 }