forked from zircote/swagger-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInfo.php
91 lines (78 loc) · 1.97 KB
/
Info.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php declare(strict_types=1);
/**
* @license Apache 2.0
*/
namespace OpenApi\Annotations;
use OpenApi\Generator;
/**
* @Annotation
* An "Info Object": https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#info-object
*
* The object provides metadata about the API.
* The metadata may be used by the clients if needed, and may be presented in editing or documentation generation tools for convenience.
*/
class Info extends AbstractAnnotation
{
/**
* The title of the application.
*
* @var string
*/
public $title = Generator::UNDEFINED;
/**
* A short description of the application. CommonMark syntax may be used for rich text representation.
*
* @var string
*/
public $description = Generator::UNDEFINED;
/**
* A URL to the Terms of Service for the API. must be in the format of a url.
*
* @var string
*/
public $termsOfService = Generator::UNDEFINED;
/**
* The contact information for the exposed API.
*
* @var Contact
*/
public $contact = Generator::UNDEFINED;
/**
* The license information for the exposed API.
*
* @var License
*/
public $license = Generator::UNDEFINED;
/**
* The version of the OpenAPI document (which is distinct from the OpenAPI Specification version or the API implementation version).
*
* @var string
*/
public $version = Generator::UNDEFINED;
/**
* @inheritdoc
*/
public static $_required = ['title', 'version'];
/**
* @inheritdoc
*/
public static $_types = [
'title' => 'string',
'version' => 'string',
'description' => 'string',
'termsOfService' => 'string',
];
/**
* @inheritdoc
*/
public static $_nested = [
Contact::class => 'contact',
License::class => 'license',
];
/**
* @inheritdoc
*/
public static $_parents = [
OpenApi::class,
];
}