forked from bsmg/BSIPA-MetadataFileSchema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Schema.json
196 lines (196 loc) · 6.36 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
189
190
191
192
193
194
195
196
{
"definitions": {
"semver": {
"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-]+)*))?$"
},
"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@:%_\\+.~#?&//=]*)?"
},
"id": {
"type": "string",
"pattern": "^([A-Z][0-9a-z]*)+(\\.([A-Z][0-9a-z]*)+)*$"
}
},
"$schema": "http://json-schema.org/draft-07/schema",
"type": "object",
"title": "root",
"required": [
"id",
"name",
"version",
"gameVersion",
"description",
"author",
"license"
],
"properties": {
"id": {
"$id": "#/properties/id",
"$ref": "#/definitions/id",
"title": "Mod ID",
"description": "Unique ID used my BeatMods2 and other mods to identify this mod"
},
"name": {
"$id": "#/properties/name",
"type": "string",
"title": "Mod Name",
"pattern": "^[^\\n\\r\\t]+$"
},
"version": {
"$id": "#/properties/version",
"$ref": "#/definitions/semver",
"title": "Mod Version",
"description": "Version according to the semantic versioning specification"
},
"gameVersion": {
"$id": "#/properties/gameVersion",
"type": "string",
"title": "Game Version",
"description": "Beat Saber version this mod was designed for"
},
"description": {
"$id": "#/properties/description",
"type": "array",
"title": "Mod Description",
"items": {
"type": "string",
"pattern": "^[^\\n\\r]*$"
}
},
"author": {
"$id": "#/properties/author",
"type": "string",
"title": "Mod Author"
},
"license": {
"$id": "#/properties/license",
"type": "string",
"title": "Mod License",
"description": "SPDX license expression (or \"SEE LICENSE IN licensefilehere\" if not a valid SPDX license)"
},
"dependsOn": {
"$id": "#/properties/dependsOn",
"type": "object",
"title": "Dependencies",
"description": "Other mods this mod depends on mapped by ID",
"patternProperties": {
"^([A-Z][0-9a-z]*)+(\\.([A-Z][0-9a-z]*)+)*$": {
"$ref": "#/definitions/verrange",
"description": "Version range according to the semantic versioning specification"
}
}
},
"conflictsWith": {
"$id": "#/properties/conflictsWith",
"type": "object",
"title": "Incompatibilities",
"description": "Other mods this mod conflicts with mapped by ID",
"patternProperties": {
"^([A-Z][0-9a-z]*)+(\\.([A-Z][0-9a-z]*)+)*$": {
"$ref": "#/definitions/verrange",
"description": "Version range according to the semantic versioning specification"
}
}
},
"loadAfter": {
"$id": "#/properties/loadAfter",
"type": "array",
"description": "Mods to load before this one",
"items": {
"$ref": "#/definitions/id",
"description": "Mod ID"
},
"uniqueItems": true
},
"loadBefore": {
"$id": "#/properties/loadBefore",
"type": "array",
"description": "Mods to load after this one",
"items": {
"$ref": "#/definitions/id",
"description": "Mod ID"
},
"uniqueItems": true
},
"features": {
"$id": "#/properties/features",
"type": "array",
"title": "Mod Features",
"description": "Features to enable for this mod",
"items": {
"type": "string",
"description": "Feature name"
},
"uniqueItems": true
},
"icon": {
"$id": "#/properties/icon",
"type": "string",
"title": "Mod Icon",
"description": "Path to a PNG icon for this mod",
"pattern": ".*\\.png"
},
"links": {
"$id": "#/properties/links",
"type": "object",
"title": "Links",
"description": "Links associated with this mod",
"properties": {
"project-home": {
"$id": "#/properties/links/properties/project-home",
"$ref": "#/definitions/url",
"title": "Home",
"description": "Link to the mod homepage (same as project-source if not specified)"
},
"project-source": {
"$id": "#/properties/links/properties/project-source",
"$ref": "#/definitions/url",
"title": "Source",
"desccription": "Link to the mod source (same as project-home if not specified)"
},
"donate": {
"$id": "#/properties/links/properties/donate",
"$ref": "#/definitions/url",
"title": "Donation",
"description": "Link to a donation page"
}
}
},
"publish": {
"$id": "#/properties/publish",
"type": "object",
"title": "Publishing Settings",
"description": "Settings to use when publishing this mod using bm2",
"properties": {
"script": {
"$id": "#/properties/publish/properties/script",
"type": "array",
"title": "Publishing Script",
"description": "Commands to run before publishing (cwd will be the manifest directory) (will run even if resource is not specified)",
"items": {
"type": "string",
"description": "Command"
}
},
"resource": {
"$id": "#/properties/publish/properties/resource",
"type": "string",
"title": "Resource",
"description": "Path to the resource to upload to BeatMods2 (if it is a file, will be uploaded directly; if it is a folder, zipped contents will be uploaded)"
}
}
},
"readme": {
"$id": "#/properties/readme",
"type": "string",
"title": "Readme",
"description": " Path to a markdown readme to display on BeatMods2 (same as description if not specified)"
}
}
}