| 1 |
<?php declare(strict_types=1); |
| 2 |
|
| 3 |
/** |
| 4 |
* @license Apache 2.0 |
| 5 |
*/ |
| 6 |
|
| 7 |
namespace OpenApi\Annotations; |
| 8 |
|
| 9 |
use OpenApi\Generator; |
| 10 |
|
| 11 |
/** |
| 12 |
* Allows referencing an external resource for extended documentation. |
| 13 |
* |
| 14 |
* @see [External Documentation Object](https://spec.openapis.org/oas/v3.1.1.html#external-documentation-object) |
| 15 |
* |
| 16 |
* @Annotation |
| 17 |
*/ |
| 18 |
class ExternalDocumentation extends AbstractAnnotation |
| 19 |
{ |
| 20 |
/** |
| 21 |
* A short description of the target documentation. GFM syntax can be used for rich text representation. |
| 22 |
* |
| 23 |
* @var string |
| 24 |
*/ |
| 25 |
public $description = Generator::UNDEFINED; |
| 26 |
|
| 27 |
/** |
| 28 |
* The URL for the target documentation. |
| 29 |
* |
| 30 |
* @var string |
| 31 |
*/ |
| 32 |
public $url = Generator::UNDEFINED; |
| 33 |
|
| 34 |
/** |
| 35 |
* @inheritdoc |
| 36 |
*/ |
| 37 |
public static $_types = [ |
| 38 |
'description' => 'string', |
| 39 |
'url' => 'string', |
| 40 |
]; |
| 41 |
|
| 42 |
/** |
| 43 |
* @inheritdoc |
| 44 |
*/ |
| 45 |
public static $_required = ['url']; |
| 46 |
|
| 47 |
/** |
| 48 |
* @inheritdoc |
| 49 |
*/ |
| 50 |
public static $_parents = [ |
| 51 |
OpenApi::class, |
| 52 |
Tag::class, |
| 53 |
Schema::class, |
| 54 |
AdditionalProperties::class, |
| 55 |
Property::class, |
| 56 |
Operation::class, |
| 57 |
Get::class, |
| 58 |
Post::class, |
| 59 |
Put::class, |
| 60 |
Delete::class, |
| 61 |
Patch::class, |
| 62 |
Head::class, |
| 63 |
Options::class, |
| 64 |
Trace::class, |
| 65 |
Items::class, |
| 66 |
JsonContent::class, |
| 67 |
XmlContent::class, |
| 68 |
]; |
| 69 |
|
| 70 |
/** |
| 71 |
* @inheritdoc |
| 72 |
*/ |
| 73 |
public static $_nested = [ |
| 74 |
Attachable::class => ['attachables'], |
| 75 |
]; |
| 76 |
} |