Skip to content

Commit ccb274a

Browse files
committed
add schema
1 parent 6435604 commit ccb274a

5 files changed

Lines changed: 136 additions & 16 deletions

File tree

data/README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Geometry Dash accounts that are proven to belong to an Avalanche member.
1212
- **Cubic Studios**: Staff of Cubic Studios
1313

1414
#### Data
15-
| Field | Description | Type | Defaults |
16-
|:-----------------:|---------------------------------------------------|:-----------------:|-------------------------------------------------------------------------------|
17-
| **`name`** | Official pseudonym of the member. | string | *`any`* |
18-
| **`badge`** | ID of the member's badge. | string | `cubic-studios`, `director`, `team-manager`, `team-member`, `collaborator` |
15+
| Field | Description | Type | Defaults |
16+
| :---------: | --------------------------------- | :----: | -------------------------------------------------------------------------- |
17+
| **`name`** | Official pseudonym of the member. | string | *`any`* |
18+
| **`badge`** | ID of the member's badge. | string | `cubic-studios`, `director`, `team-manager`, `team-member`, `collaborator` |
1919

2020
## Levels
2121
Projects that Avalanche worked on.
@@ -27,10 +27,10 @@ Projects that Avalanche worked on.
2727
- **Avalanche Event**: A project that resulted from a public or private event hosted by Avalanche
2828

2929
#### Data
30-
| Field | Description | Type | Defaults |
31-
|:-----------------:|---------------------------------------------------|:-----------------:|-------------------------------------------------------------------------------|
32-
| **`name`** | Official name of the level. | string | *`any`* |
33-
| **`host`** | Name of the host of the level. | string | *`any`* |
34-
| **`showcase`** | Video URL of the full showcase of the level. | string | *`any`* |
35-
| **`type`** | Type of project the level is featured as. | string | `solo`, `team`, `collab`, `event` |
36-
| **`fame`** | If the level will be highlighted on lists. | boolean | `false ` |
30+
| Field | Description | Type | Defaults |
31+
| :------------: | ---------------------------------------------------- | :-----: | --------------------------------- |
32+
| **`name`** | Official name of the level. | string | *`any`* |
33+
| **`host`** | Name of the host of the level. | string | *`any`* |
34+
| **`showcase`** | YouTube video URL of the full showcase of the level. | string | *`any`* |
35+
| **`type`** | Type of project the level is featured as. | string | `solo`, `team`, `collab`, `event` |
36+
| **`fame`** | If the level will be highlighted on lists. | boolean | `false` |

data/avalProfiles.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@
4242
"31079132": {
4343
"name": "FCC",
4444
"badge": "cubic-studios"
45-
}
45+
},
46+
"$schema": "./schema/avalProfiles.schema.json"
4647
}

data/avalProjects.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,23 @@
1616
"115177370": {
1717
"name": "I L U",
1818
"host": "CyanBoi",
19-
"showcase":"https://youtu.be/CMiOA4-MMDQ",
19+
"showcase": "https://youtu.be/CMiOA4-MMDQ",
2020
"type": "solo",
2121
"fame": true
2222
},
2323
"109692779": {
2424
"name": "Unbreakable",
2525
"host": "ArcticWoof",
26-
"showcase":"https://youtu.be/GZ-ZcNeG6zQ",
26+
"showcase": "https://youtu.be/GZ-ZcNeG6zQ",
2727
"type": "solo",
2828
"fame": true
2929
},
3030
"111988771": {
3131
"name": "MCXI",
3232
"host": "FlyDrift",
33-
"showcase":"https://youtu.be/hBu-9lGYum0",
33+
"showcase": "https://youtu.be/hBu-9lGYum0",
3434
"type": "solo",
3535
"fame": true
36-
}
36+
},
37+
"$schema": "./schema/avalProjects.schema.json"
3738
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"$schema": {
6+
"type": "string"
7+
}
8+
},
9+
"patternProperties": {
10+
"^[0-9]+$": {
11+
"type": "object",
12+
"properties": {
13+
"name": {
14+
"type": "string",
15+
"patternProperties": {
16+
"^[a-zA-Z ]+$": {
17+
"type": "string"
18+
}
19+
},
20+
"title": "Member Name",
21+
"description": "Official pseudonym of the member."
22+
},
23+
"badge": {
24+
"type": "string",
25+
"enum": [
26+
"cubic-studios",
27+
"director",
28+
"team-manager",
29+
"team-member",
30+
"collaborator"
31+
],
32+
"title": "Member Badge",
33+
"description": "ID of the member's badge."
34+
}
35+
},
36+
"required": [
37+
"name",
38+
"badge"
39+
],
40+
"additionalProperties": false
41+
}
42+
},
43+
"additionalProperties": false
44+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"type": "object",
4+
"properties": {
5+
"$schema": {
6+
"type": "string"
7+
}
8+
},
9+
"patternProperties": {
10+
"^[0-9]+$": {
11+
"type": "object",
12+
"properties": {
13+
"name": {
14+
"type": "string",
15+
"patternProperties": {
16+
"^[a-zA-Z0-9 ]+$": {
17+
"type": "string"
18+
}
19+
},
20+
"title": "Level Name",
21+
"description": "Official name of the level."
22+
},
23+
"host": {
24+
"type": "string",
25+
"patternProperties": {
26+
"^[a-zA-Z ]+$": {
27+
"type": "string"
28+
}
29+
},
30+
"title": "Host Name",
31+
"description": "Name of the host of the level."
32+
},
33+
"showcase": {
34+
"type": "string",
35+
"patternProperties": {
36+
"^(https?://)?(www\\.)?(youtube\\.com|youtu\\.?be)/.+$": {
37+
"type": "string"
38+
},
39+
"^(https?://)?(www\\.)?youtube\\.com/watch\\?v=[a-zA-Z0-9_-]+(&list=[a-zA-Z0-9_-]+)?$": {
40+
"type": "string"
41+
}
42+
},
43+
"title": "Showcase URL",
44+
"description": "YouTube video URL of the full showcase of the level."
45+
},
46+
"type": {
47+
"type": "string",
48+
"enum": [
49+
"solo",
50+
"team",
51+
"collab",
52+
"event"
53+
],
54+
"title": "Project Type",
55+
"description": "Type of project the level is featured as."
56+
},
57+
"fame": {
58+
"type": "boolean",
59+
"default": false,
60+
"title": "Hall of Fame",
61+
"description": "If the level will be highlighted on lists."
62+
}
63+
},
64+
"required": [
65+
"name",
66+
"host",
67+
"showcase",
68+
"type"
69+
],
70+
"additionalProperties": false
71+
}
72+
},
73+
"additionalProperties": false
74+
}

0 commit comments

Comments
 (0)