-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathschema.json
177 lines (177 loc) · 4.29 KB
/
schema.json
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
172
173
174
175
176
177
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/wp-hooks/generator/blob/0.9.0/schema.json",
"title": "HooksContainer",
"description": "The container for the list of hooks",
"type": "object",
"required": [
"$schema",
"hooks"
],
"additionalProperties": false,
"properties": {
"$schema": {
"type": "string",
"description": "The JSON schema to verify a hook document against",
"format": "uri"
},
"hooks": {
"type": "array",
"title": "Hooks",
"description": "The list of hooks",
"items": {
"title": "Hook",
"description": "The hook representation",
"type": "object",
"additionalProperties": false,
"required": [
"name",
"file",
"type",
"doc",
"args"
],
"properties": {
"name": {
"description": "The hook name",
"type": "string",
"examples": [
"attachment_fields_to_edit",
"update_site_option_{$option}",
"init"
]
},
"aliases": {
"description": "Aliases of the hook name",
"type": "array",
"items": {
"type": "string"
}
},
"file": {
"description": "The relative name of the file containing the hook",
"type": "string",
"examples": [
"wp-admin/includes/menu.php"
]
},
"type": {
"description": "The hook type",
"type": "string",
"examples": [
"action",
"filter",
"action_reference",
"filter_reference"
]
},
"doc": {
"title": "Doc",
"description": "The docblock information for the hook",
"type": "object",
"additionalProperties": false,
"required": [
"description",
"long_description",
"long_description_html",
"tags"
],
"properties": {
"description": {
"description": "The short description as plain text",
"type": "string"
},
"long_description": {
"description": "The long description as markdown",
"type": "string"
},
"long_description_html": {
"description": "The long description as HTML",
"type": "string"
},
"tags": {
"title": "Tags",
"description": "The docblock tags for the hook",
"type": "array",
"items": {
"title": "Tag",
"description": "The docblock tags information for the hook",
"type": "object",
"additionalProperties": false,
"required": [
"name",
"content"
],
"properties": {
"name": {
"description": "The tag name",
"type": "string",
"examples": [
"deprecated",
"global",
"ignore",
"link",
"param",
"private",
"return",
"see",
"since",
"todo"
]
},
"content": {
"description": "The tag content",
"type": "string",
"examples": [
"Name of the network option.",
"5.2.0"
]
},
"types": {
"description": "Allowed types for parameter values, for @param tags",
"type": "array",
"items": {
"type": "string"
}
},
"variable": {
"description": "The name of the parameter variable, for @param tags",
"type": "string",
"examples": [
"$args",
"$option"
]
},
"link": {
"description": "A link to more information, for @link tags",
"type": "string",
"format": "uri",
"examples": [
"https://core.trac.wordpress.org/ticket/19321"
]
},
"refers": {
"description": "Related function to refer to, for @see tags",
"type": "string",
"examples": [
"wp_delete_post()"
]
},
"description": {
"description": "This is only used for @since 3.0.0 MU tags",
"type": "string"
}
}
}
}
}
},
"args": {
"description": "The number of arguments passed to the hook",
"type": "integer"
}
}
}
}
}
}