| 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::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)] |
| 13 |
class Examples extends OA\Examples |
| 14 |
{ |
| 15 |
/** |
| 16 |
* @param string|class-string|object|null $ref |
| 17 |
* @param array<string,mixed>|null $x |
| 18 |
* @param list<Attachable>|null $attachables |
| 19 |
*/ |
| 20 |
public function __construct( |
| 21 |
?string $example = null, |
| 22 |
?string $summary = Generator::UNDEFINED, |
| 23 |
?string $description = Generator::UNDEFINED, |
| 24 |
int|string|array|null $value = null, |
| 25 |
?string $externalValue = null, |
| 26 |
string|object|null $ref = null, |
| 27 |
|
| 28 |
// abstract annotation |
| 29 |
?array $x = null, |
| 30 |
?array $attachables = null |
| 31 |
) { |
| 32 |
parent::__construct([ |
| 33 |
'example' => $example ?? Generator::UNDEFINED, |
| 34 |
'summary' => $summary, |
| 35 |
'description' => $description, |
| 36 |
'value' => $value ?? Generator::UNDEFINED, |
| 37 |
'externalValue' => $externalValue ?? Generator::UNDEFINED, |
| 38 |
'ref' => $ref ?? Generator::UNDEFINED, |
| 39 |
'x' => $x ?? Generator::UNDEFINED, |
| 40 |
'attachables' => $attachables ?? Generator::UNDEFINED, |
| 41 |
]); |
| 42 |
} |
| 43 |
} |