| 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 |
* Acts like a <code>PathItem</code> with the main difference being that it requires <code>webhook</code> instead of <code>path</code>. |
| 13 |
* |
| 14 |
* @since OpenAPI 3.1.0 |
| 15 |
* |
| 16 |
* @Annotation |
| 17 |
*/ |
| 18 |
class Webhook extends PathItem |
| 19 |
{ |
| 20 |
/** |
| 21 |
* Key for the webhooks map. |
| 22 |
* |
| 23 |
* @var string |
| 24 |
*/ |
| 25 |
public $webhook = Generator::UNDEFINED; |
| 26 |
|
| 27 |
/** |
| 28 |
* @inheritdoc |
| 29 |
*/ |
| 30 |
public static $_required = ['webhook']; |
| 31 |
|
| 32 |
/** |
| 33 |
* @inheritdoc |
| 34 |
*/ |
| 35 |
public static $_parents = [ |
| 36 |
OpenApi::class, |
| 37 |
]; |
| 38 |
|
| 39 |
/** |
| 40 |
* @inheritdoc |
| 41 |
*/ |
| 42 |
public static $_types = [ |
| 43 |
'webhook' => 'string', |
| 44 |
]; |
| 45 |
} |