-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServerVariable.php
More file actions
90 lines (81 loc) · 3.12 KB
/
ServerVariable.php
File metadata and controls
90 lines (81 loc) · 3.12 KB
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
<?php
namespace Zerotoprod\DataModelOpenapi30;
use Zerotoprod\DataModel\Describe;
use Zerotoprod\DataModelOpenapi30\Helpers\DataModel;
/**
* An object representing a Server Variable for server URL
* template substitution.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#server-variable-object
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
class ServerVariable
{
use DataModel;
/**
* An enumeration of string values to be used if the substitution
* options are from a limited set. The array _SHOULD_ NOT be empty.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @see $enum
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
public const enum = 'enum';
/**
* An enumeration of string values to be used if the substitution
* options are from a limited set. The array _SHOULD_ NOT be empty.
*
* @var string[]
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
#[Describe(['default' => []])]
public array $enum;
/**
* **REQUIRED**. The default value to use for substitution, which _SHALL_
* be sent if an alternate value is not supplied. If the enum is
* defined, the value _SHOULD_ exist in the enum’s values. Note
* that this behavior is different from the Schema Object’s
* default keyword, which documents the receiver’s behavior
* rather than inserting the value into the data.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @see $default
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
public const default = 'default';
/**
* **REQUIRED**. The default value to use for substitution, which _SHALL_
* be sent if an alternate value is not supplied. If the enum is
* defined, the value _SHOULD_ exist in the enum’s values. Note
* that this behavior is different from the Schema Object’s
* default keyword, which documents the receiver’s behavior
* rather than inserting the value into the data.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
#[Describe(['nullable'])]
public ?string $default;
/**
* An optional description for the server variable. [CommonMark]
* syntax _MAY_ be used for rich text representation.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @see https://spec.commonmark.org/
* @see $description
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
public const description = 'description';
/**
* An optional description for the server variable. [CommonMark]
* syntax _MAY_ be used for rich text representation.
*
* @see https://spec.openapis.org/oas/v3.0.4.html#fixed-fields-4
* @see https://spec.commonmark.org
* @link https://github.com/zero-to-prod/data-model-openapi30
*/
#[Describe(['nullable'])]
public ?string $description;
}