-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathschema.json
More file actions
87 lines (87 loc) · 2.7 KB
/
Copy pathschema.json
File metadata and controls
87 lines (87 loc) · 2.7 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
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://schemas.mubarrat.com/scripts-loader/",
"description": "Schema for defining JavaScript files with dependencies.",
"type": "array",
"items": {
"type": "object",
"description": "Details of a script and its dependencies.",
"properties": {
"name": {
"type": "string",
"description": "The name of the JavaScript file. Required if it's dependent on other files."
}
},
"oneOf": [
{
"properties": {
"source": {
"type": "string",
"description": "The URL or path to the JavaScript file."
}
},
"required": ["source"],
"not": { "required": ["sources"] },
"oneOf": [
{},
{
"properties": {
"dependency": {
"type": "string",
"description": "A JavaScript file name this file depends on. Optional, but can't be defined if 'dependencies' is present."
}
},
"not": { "required": ["dependencies"] }
},
{
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"minItems": 0,
"description": "An array of JavaScript file names this file depends on. Optional, but can't be defined if 'dependency' is present."
}
},
"not": { "required": ["dependency"] }
}
]
},
{
"properties": {
"sources": {
"type": "array",
"items": { "type": "string" },
"minItems": 1,
"description": "An array of URLs or paths to the JavaScript file with fallbacks."
}
},
"required": ["sources"],
"not": { "required": ["source"] },
"oneOf": [
{},
{
"properties": {
"dependency": {
"type": "string",
"description": "A JavaScript file name this file depends on. Optional, but can't be defined if 'dependencies' is present."
}
},
"not": { "required": ["dependencies"] }
},
{
"properties": {
"dependencies": {
"type": "array",
"items": { "type": "string" },
"minItems": 0,
"description": "An array of JavaScript file names this file depends on. Optional, but can't be defined if 'dependency' is present."
}
},
"not": { "required": ["dependency"] }
}
]
}
],
"minItems": 0
}
}