| 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 |
* The object provides metadata about the API. |
| 13 |
* |
| 14 |
* The metadata may be used by the clients if needed and may be presented in editing or documentation generation tools for convenience. |
| 15 |
* |
| 16 |
* @see [Info Object](https://spec.openapis.org/oas/v3.1.1.html#info-object) |
| 17 |
* |
| 18 |
* @Annotation |
| 19 |
*/ |
| 20 |
class Info extends AbstractAnnotation |
| 21 |
{ |
| 22 |
/** |
| 23 |
* The title of the application. |
| 24 |
* |
| 25 |
* @var string |
| 26 |
*/ |
| 27 |
public $title = Generator::UNDEFINED; |
| 28 |
|
| 29 |
/** |
| 30 |
* A short description of the application. |
| 31 |
* |
| 32 |
* CommonMark syntax may be used for rich text representation. |
| 33 |
* |
| 34 |
* @var string |
| 35 |
*/ |
| 36 |
public $description = Generator::UNDEFINED; |
| 37 |
|
| 38 |
/** |
| 39 |
* An URL to the Terms of Service for the API. |
| 40 |
* |
| 41 |
* Must be in the format of an url. |
| 42 |
* |
| 43 |
* @var string |
| 44 |
*/ |
| 45 |
public $termsOfService = Generator::UNDEFINED; |
| 46 |
|
| 47 |
/** |
| 48 |
* The contact information for the exposed API. |
| 49 |
* |
| 50 |
* @var Contact |
| 51 |
*/ |
| 52 |
public $contact = Generator::UNDEFINED; |
| 53 |
|
| 54 |
/** |
| 55 |
* The license information for the exposed API. |
| 56 |
* |
| 57 |
* @var License |
| 58 |
*/ |
| 59 |
public $license = Generator::UNDEFINED; |
| 60 |
|
| 61 |
/** |
| 62 |
* The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version). |
| 63 |
* |
| 64 |
* @var string |
| 65 |
*/ |
| 66 |
public $version = Generator::UNDEFINED; |
| 67 |
|
| 68 |
/** |
| 69 |
* @inheritdoc |
| 70 |
*/ |
| 71 |
public static $_required = ['title', 'version']; |
| 72 |
|
| 73 |
/** |
| 74 |
* @inheritdoc |
| 75 |
*/ |
| 76 |
public static $_types = [ |
| 77 |
'title' => 'string', |
| 78 |
'version' => 'string', |
| 79 |
'description' => 'string', |
| 80 |
'termsOfService' => 'string', |
| 81 |
]; |
| 82 |
|
| 83 |
/** |
| 84 |
* @inheritdoc |
| 85 |
*/ |
| 86 |
public static $_nested = [ |
| 87 |
Contact::class => 'contact', |
| 88 |
License::class => 'license', |
| 89 |
Attachable::class => ['attachables'], |
| 90 |
]; |
| 91 |
|
| 92 |
/** |
| 93 |
* @inheritdoc |
| 94 |
*/ |
| 95 |
public static $_parents = [ |
| 96 |
OpenApi::class, |
| 97 |
]; |
| 98 |
} |