-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApplicationJson.php
171 lines (166 loc) · 6.49 KB
/
ApplicationJson.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
declare(strict_types=1);
namespace ApiClients\Client\GitHubEnterprise\Schema\Issues\Update\Request;
use EventSauce\ObjectHydrator\MapFrom;
final readonly class ApplicationJson
{
public const SCHEMA_JSON = '{
"type": "object",
"properties": {
"title": {
"type": [
"null",
"string",
"integer"
],
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"description": "The title of the issue."
},
"body": {
"type": [
"string",
"null"
],
"description": "The contents of the issue."
},
"assignee": {
"type": [
"string",
"null"
],
"description": "Username to assign to this issue. **This field is closing down.**"
},
"state": {
"enum": [
"open",
"closed"
],
"type": "string",
"description": "The open or closed state of the issue."
},
"state_reason": {
"enum": [
"completed",
"not_planned",
"reopened",
null
],
"type": [
"string",
"null"
],
"description": "The reason for the state change. Ignored unless `state` is changed.",
"examples": [
"not_planned"
]
},
"milestone": {
"type": [
"null",
"string",
"integer"
],
"oneOf": [
{
"type": "string"
},
{
"type": "integer",
"description": "The `number` of the milestone to associate this issue with or use `null` to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped."
}
]
},
"labels": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"description": {
"type": [
"string",
"null"
]
},
"color": {
"type": [
"string",
"null"
]
}
}
}
]
},
"description": "Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped."
},
"assignees": {
"type": "array",
"items": {
"type": "string"
},
"description": "Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped."
},
"type": {
"type": [
"string",
"null"
],
"description": "The name of the issue type to associate with this issue or use `null` to remove the current issue type. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.",
"examples": [
"Epic"
]
}
}
}';
public const SCHEMA_TITLE = '';
public const SCHEMA_DESCRIPTION = '';
public const SCHEMA_EXAMPLE_DATA = '{
"title": null,
"body": "generated",
"assignee": "generated",
"state": "open",
"state_reason": "not_planned",
"milestone": null,
"labels": [
null,
null
],
"assignees": [
"generated",
"generated"
],
"type": "Epic"
}';
/**
* title: The title of the issue.
* body: The contents of the issue.
* assignee: Username to assign to this issue. **This field is closing down.**
* state: The open or closed state of the issue.
* stateReason: The reason for the state change. Ignored unless `state` is changed.
* labels: Labels to associate with this issue. Pass one or more labels to _replace_ the set of labels on this issue. Send an empty array (`[]`) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped.
* assignees: Usernames to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this issue. Send an empty array (`[]`) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped.
* type: The name of the issue type to associate with this issue or use `null` to remove the current issue type. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.
*/
public function __construct(public string|int|null $title, public string|null $body, public string|null $assignee, public string|null $state, #[MapFrom('state_reason')]
public string|null $stateReason, public string|int|null $milestone, public array|null $labels, public array|null $assignees, public string|null $type,)
{
}
}