-
Notifications
You must be signed in to change notification settings - Fork 0
/
serve.schema.json
188 lines (188 loc) · 5.63 KB
/
serve.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
178
179
180
181
182
183
184
185
186
187
188
{
"title": "Serve Task Configuration",
"description": "Defines parameters for the webserver which is spun up by the Serve Task",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": {
"description": "Part of the JSON Schema standard, this optional keyword declares the URL of the schema that the file conforms to. Editors may download the schema and use it to perform syntax highlighting.",
"type": "string"
},
"api": {
"title": "API server configuration",
"description": "Parameters which configure the API server, which runs simultaneously and allows for mock testing",
"type": "object",
"additionalProperties": false,
"required": [
"port",
"entryPath"
],
"properties": {
"port": {
"title": "API Port",
"description": "The port which the API server listens on",
"type": "number"
},
"entryPath": {
"title": "API Entry Point Path",
"description": "The path to the script to run as the API server",
"type": "string"
}
}
},
"initialPage": {
"title": "Initial Page",
"description": "The path to the page which should open automatically after this task completes",
"type": "string"
},
"port": {
"title": "Port",
"description": "The port on which to host the file server.",
"type": "number"
},
"hostname": {
"title": "Hostname",
"description": "The name of the host on which serve is running. Defaults to 'localhost'",
"type": "string"
},
"https": {
"title": "HTTPS Mode",
"description": "If true, the server should run on HTTPS",
"type": "boolean"
},
"keyPath": {
"title": "HTTPS Key Path",
"description": "Path to the HTTPS key",
"type": "string"
},
"certPath": {
"title": "HTTPS Cert Path",
"description": "Path to the HTTPS cert",
"type": "string"
},
"pfxPath": {
"title": "HTTPS PFX Path",
"description": "Path to the HTTPS PFX cert",
"type": "string"
},
"tryCreateDevCertificate": {
"title": "Should Create Dev Certificate",
"description": "If true, when gulp-core-build-serve is initialized and a dev certificate doesn't already exist and hasn't been specified, attempt to generate one and trust it automatically.",
"type": "boolean"
},
"serveConfigurations": {
"oneOf": [
{
"$ref": "#/definitions/serveConfigurations"
}
]
}
},
"definitions": {
"customActionDetails": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "CustomAction type, or location of commands",
"defaultSnippets": [
{
"description": "Application Customizer extension",
"body": "ClientSideExtension.ApplicationCustomizer"
},
{
"description": "The context menu of the item(s)",
"body": "ClientSideExtension.ListViewCommandSet.ContextMenu"
},
{
"description": "The top command set menu in a list or library",
"body": "ClientSideExtension.ListViewCommandSet.CommandBar"
},
{
"description": "Both the context menu and the command bar",
"body": "ClientSideExtension.ListViewCommandSet"
}
]
},
"properties": {
"type": "object",
"description": "An optional JSON object containing properties that are available via the 'this.properties' member."
}
},
"required": [
"location"
]
},
"customAction": {
"type": "object",
"patternProperties": {
"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$": {
"description": "Simulates a custom action. When you deploy and register this component in a site, you'll create this CustomAction object and describe all the different properties you can set on it.",
"oneOf": [
{
"$ref": "#/definitions/customActionDetails"
}
]
}
}
},
"serveConfiguration": {
"type": "object",
"description": "'gulp serve' configuration",
"properties": {
"pageUrl": {
"type": "string",
"description": "URL of the modern page that should be used to test the extension"
},
"customActions": {
"description": "The list of extensions that should be loaded",
"defaultSnippets": [
{
"label": "",
"description": "GUID of the extension",
"body": {
"${1:Extension GUID}": {
"location": "$2",
"properties": {}
}
}
}
],
"$ref": "#/definitions/customAction"
},
"fieldCustomizers": {
"type": "object"
}
},
"additionalProperties": false,
"oneOf": [
{
"required": [
"customActions"
]
},
{
"required": [
"fieldCustomizers"
]
}
],
"required": [
"pageUrl"
]
},
"serveConfigurations": {
"type": "object",
"description": "Configuration objects used as the '--config' parameter for local testing",
"patternProperties": {
"[a-z]": {
"allOf": [
{
"$ref": "#/definitions/serveConfiguration"
}
]
}
}
}
}
}