Skip to content

Commit ea47761

Browse files
committed
schema: allow multiple and more detailed authors
1 parent f1e7cf3 commit ea47761

1 file changed

Lines changed: 35 additions & 9 deletions

File tree

game-schema-d4.json

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,26 @@
1414
"oneOf": [
1515
{
1616
"type": "string",
17-
"description": "A name, username or nickname representing the developer(s)"
17+
"description": "A name, username or nickname representing the developer."
1818
},
1919
{
20-
"type": "array"
20+
"type": "array",
21+
"items": {
22+
"oneOf": [
23+
{
24+
"type": "string"
25+
},
26+
{
27+
"$ref": "#/definitions/author"
28+
}
29+
]
30+
}
2131
},
2232
{
23-
"type": "object"
33+
"$ref": "#/definitions/author"
2434
}
25-
]
35+
],
36+
"description": "The developer of the game, which can be a single string, an array of strings, an author object or an array of author objects."
2637
},
2738
"description": {
2839
"type": "string",
@@ -35,7 +46,7 @@
3546
"platform": {
3647
"type": "string",
3748
"description": "Target console",
38-
"enum": ["GB", "GBC", "GBA"]
49+
"enum": ["GB", "GBC", "GBA", "NES"]
3950
},
4051
"typetag": {
4152
"type": "string",
@@ -98,10 +109,7 @@
98109
},
99110
{
100111
"type": "string",
101-
"enum": [
102-
"hw:gbprinter",
103-
"hw:gbcamera"
104-
]
112+
"enum": ["hw:gbprinter", "hw:gbcamera"]
105113
}
106114
]
107115
}
@@ -155,6 +163,24 @@
155163
},
156164
"required": ["slug"],
157165
"definitions": {
166+
"author": {
167+
"type": "object",
168+
"properties": {
169+
"name": {
170+
"type": "string",
171+
"description": "A name, username or nickname representing the entity/person"
172+
},
173+
"link": {
174+
"type": "string",
175+
"format": "uri",
176+
"description": "A link to the author's website or profile"
177+
},
178+
"role": {
179+
"type": "string",
180+
"description": "The role of the author in the project"
181+
}
182+
}
183+
},
158184
"file": {
159185
"type": "object",
160186
"properties": {

0 commit comments

Comments
 (0)