-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathSchema.json
188 lines (188 loc) · 5.67 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
178
179
180
181
182
183
184
185
186
187
188
{
"definitions": {
"semver": {
"type": "string",
"examples": [
"0.0.0"
],
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
},
"verrange": {
"type": "string",
"pattern": "^(?:[~\\^*]=?)?(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?(?:-(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)?"
},
"url": {
"type": "string",
"pattern": "https?:\/\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,}(\/[-a-zA-Z0-9@:%_\\+.~#?&//=]*)?"
},
"typename": {
"type": "string",
"pattern": "^(?:((?!\\d)\\w+(?:\\.(?!\\d)\\w+)*)\\.)?((?!\\d)\\w+)$"
}
},
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"required": [
"name",
"id",
"version",
"gameVersion",
"description",
"author"
],
"properties": {
"name": {
"$id": "#/properties/name",
"type": "string",
"description": "plugin name",
"examples": [
"Beat Saber IPA"
],
"pattern": "^(.*)$"
},
"id": {
"$id": "#/properties/id",
"type": ["string","null"],
"description": "modsaber id",
"examples": [
"beatsaber-ipa-reloaded"
],
"pattern": "^([^\\s]*)$"
},
"version": {
"$id": "#/properties/version",
"$ref": "#/definitions/semver",
"description": "plugin version"
},
"gameVersion": {
"$id": "#/properties/gameVersion",
"$ref": "#/definitions/semver",
"description": "compatible game version"
},
"description": {
"$id": "#/properties/description",
"type": ["string", "array"],
"description": "plugin description",
"examples": [
"A build of IPA designed for Beat Saber"
],
"items": {
"type": "string"
}
},
"author": {
"$id": "#/properties/author",
"type": "string",
"description": "plugin author",
"examples": [
"DaNike",
"xyonico"
]
},
"dependsOn": {
"$id": "#/properties/dependsOn",
"type": "object",
"description": "dependencies",
"patternProperties": {
"^([^\\s]*)$": {
"$ref": "#/definitions/verrange",
"description": "a dependency"
}
}
},
"conflictsWith": {
"$id": "#/properties/conflictsWith",
"type": "object",
"description": "incompatibilities",
"patternProperties": {
"^([^\\s]*)$": {
"$ref": "#/definitions/verrange",
"description": "an incompatible mod item"
}
}
},
"loadAfter": {
"$id": "#/properties/loadAfter",
"type": "array",
"description": "plugins to load before this one",
"items": {
"type": "string",
"description": "the plugin id to load first"
}
},
"loadBefore": {
"$id": "#/properties/loadBefore",
"type": "array",
"description": "plugins to load after this one",
"items": {
"type": "string",
"description": "the plugin id to load after"
}
},
"features": {
"$id": "#/properties/features",
"type": "object",
"description": "features to enable for plugin",
"patternProperties": {
"^([^\\s]*)$": {
"type": "object",
"description": "a descriptor object for the feature"
}
}
},
"icon": {
"$id": "#/properties/icon",
"type": "string",
"description": "the icon to represent the plugin, as a PNG",
"pattern": ".*\\.png"
},
"files": {
"$id": "#/properties/files",
"type": "array",
"description": "A list of files that are associated with this mod. If this is a bare manifest, must include *all* files distributed with the mod. Otherwise, it may exclude the assembly it is embedded in.",
"uniqueItems": true,
"items": {
"type": "string",
"description": "the path to a file distributed with the mod, relative to the installation directory",
"examples": [
"Plugins/StreamCore.dll",
"Libs/INIFileLoader.dll"
]
}
},
"links": {
"$id": "#/properties/links",
"type": "object",
"description": "various links associated with the mod",
"properties": {
"project-home": {
"$id": "#/properties/links/properties/project-home",
"$ref": "#/definitions/url",
"description": "a link to the project home page. if not specified, same as project-source"
},
"project-source": {
"$id": "#/properties/links/properties/project-source",
"$ref": "#/definitions/url",
"description": "a link to the project source. if not specified, same as project-home."
},
"donate": {
"$id": "#/properties/links/properties/donate",
"$ref": "#/definitions/url",
"description": "a link to a donations page"
}
}
},
"misc": {
"$id": "#/properties/misc",
"type": "object",
"description": "miscellaneous properties",
"properties": {
"plugin-hint": {
"$id": "#/properties/mist/properties/plugin-hint",
"$ref": "#/definitions/typename",
"description": "a hint for the loader for where to find the plugin type"
}
}
}
}
}