-
Notifications
You must be signed in to change notification settings - Fork 41
Expand file tree
/
Copy pathplugin.schema.json
More file actions
46 lines (46 loc) · 2.13 KB
/
Copy pathplugin.schema.json
File metadata and controls
46 lines (46 loc) · 2.13 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
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://scriptwidget.app/schemas/data-source-plugin-1.json",
"title": "ScriptWidget Data Source Plugin 1.0",
"type": "object",
"additionalProperties": false,
"required": ["formatVersion", "id", "name", "version", "summary", "symbol", "author", "license", "minimumRuntimeVersion", "baseURL", "hosts", "operations"],
"properties": {
"formatVersion": { "const": 1 },
"id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9.-]{2,127}$" },
"name": { "type": "string", "minLength": 1, "maxLength": 80 },
"version": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(?:-[0-9A-Za-z.-]+)?$" },
"summary": { "type": "string" },
"symbol": { "type": "string" },
"author": { "type": "string" },
"license": { "type": "string" },
"minimumRuntimeVersion": { "type": "string" },
"baseURL": { "type": "string", "format": "uri", "pattern": "^https://" },
"hosts": { "type": "array", "minItems": 1, "maxItems": 20, "uniqueItems": true, "items": { "type": "string" } },
"operations": {
"type": "array", "minItems": 1, "maxItems": 50,
"items": {
"type": "object", "additionalProperties": false,
"required": ["id", "title", "method", "path", "responseType", "parameters"],
"properties": {
"id": { "type": "string" }, "title": { "type": "string" },
"method": { "enum": ["GET", "POST", "PUT", "PATCH", "DELETE"] },
"path": { "type": "string", "pattern": "^/" },
"responseType": { "enum": ["json", "text"] },
"parameters": {
"type": "array", "maxItems": 30,
"items": {
"type": "object", "additionalProperties": false,
"required": ["id", "label", "location", "required"],
"properties": {
"id": { "type": "string" }, "label": { "type": "string" },
"location": { "enum": ["path", "query", "header", "jsonBody"] },
"required": { "type": "boolean" }, "defaultValue": { "type": ["string", "null"] }
}
}
}
}
}
}
}
}