Skip to content

Commit c03b2ee

Browse files
authored
Merge pull request #2692 from ampleyfly/topic-schema-type-fixes
Fix various type issues in schemas
2 parents b321b17 + 2cfe601 commit c03b2ee

2 files changed

Lines changed: 51 additions & 51 deletions

File tree

schema/m3-room.schema.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,15 +1755,13 @@
17551755
"type": "string",
17561756
"title": "Node Type",
17571757
"description": "Examples: door, item, junction",
1758-
"default": "",
17591758
"examples": ["door", "entrance", "exit", "item"],
17601759
"enum": ["door", "entrance", "exit", "item", "junction", "utility"],
17611760
"pattern": "^(.*)$"
17621761
},
17631762
"nodeSubType": {
17641763
"type": "string",
17651764
"title": "Node SubType",
1766-
"default": "",
17671765
"examples": ["chozo", "hidden", "visible"],
17681766
"enum": [
17691767
"chozo",
@@ -1880,7 +1878,6 @@
18801878
"type": "array",
18811879
"title": "Node Locks",
18821880
"description": "An array of corresponding lock and unlock conditions for this node",
1883-
"default": null,
18841881
"items": {
18851882
"type": "object",
18861883
"title": "Lock Object",
@@ -1895,7 +1892,6 @@
18951892
"lockType": {
18961893
"type": "string",
18971894
"title": "Lock Type",
1898-
"default": "",
18991895
"enum": [
19001896
"bossFight",
19011897
"coloredDoor",
@@ -2047,7 +2043,6 @@
20472043
"type": "string",
20482044
"title": "Obstacle Type",
20492045
"description": "The main type of obstacle. Examples include 'inanimate', 'enemies', and 'abstract'",
2050-
"default": "",
20512046
"examples": ["inanimate", "enemies", "abstract"],
20522047
"enum": ["inanimate", "enemies", "abstract"],
20532048
"pattern": "^(.*)$"
@@ -2100,7 +2095,7 @@
21002095
"quantity": {
21012096
"type": "integer",
21022097
"title": "Quantity",
2103-
"default": "",
2098+
"minimum": 1,
21042099
"examples": [3]
21052100
},
21062101
"homeNodes": {

schema/m3-tech.schema.json

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,55 @@
33
"$id": "https://raw.githubusercontent.com/vg-json-data/sm-json-data/master/schema/m3-tech.schema.json",
44
"type": "object",
55
"title": "Super Metroid Tech Schema",
6+
"definitions": {
7+
"tech": {
8+
"type": "object",
9+
"title": "Tech",
10+
"description": "A tech that represents an in-game technique and the requirements for performing it",
11+
"required": ["name", "techRequires", "otherRequires"],
12+
"additionalProperties": false,
13+
"properties": {
14+
"id": {
15+
"type": "integer",
16+
"title": "Tech ID",
17+
"description": "Identifier for this tech, unique across all tech."
18+
},
19+
"name": {
20+
"type": "string",
21+
"title": "Tech Name",
22+
"description": "The name of this tech, to be referenced in logical requirements",
23+
"pattern": "^(.*)$"
24+
},
25+
"techRequires": {
26+
"$ref": "m3-requirements.schema.json#/definitions/logicalRequirements",
27+
"title": "Tech Requirements",
28+
"description": "Dependent tech required for this tech."
29+
},
30+
"otherRequires": {
31+
"$ref": "m3-requirements.schema.json#/definitions/logicalRequirements",
32+
"title": "Other Requirements",
33+
"description": "Other requirements to perform this tech, such as items or ammo."
34+
},
35+
"note": {
36+
"$ref": "m3-note.schema.json#/definitions/note"
37+
},
38+
"detailNote": {
39+
"$ref": "m3-note.schema.json#/definitions/detailNote"
40+
},
41+
"devNote": {
42+
"$ref": "m3-note.schema.json#/definitions/devNote"
43+
},
44+
"extensionTechs": {
45+
"type": "array",
46+
"title": "Extension techs",
47+
"description": "An array of extension techs. An extension tech is a more complex version of its parent tech. Its requirements stand alone and explicitly require the parent tech, but it's positioned under the parent to provide hints for cleaning up a tech UI.",
48+
"items": {
49+
"$ref": "#/definitions/tech"
50+
}
51+
}
52+
}
53+
}
54+
},
655
"properties": {
756
"$schema": {
857
"type": "string",
@@ -37,51 +86,7 @@
3786
"title": "Super Metroid Techs",
3887
"description": "An array of techs, each representing an in-game technique and the requirements for performing it. Any such technique could feasibly be turned off for randomizer logic.",
3988
"items": {
40-
"type": "object",
41-
"title": "Tech",
42-
"description": "A tech that represents an in-game technique and the requirements for performing it",
43-
"required": ["name", "techRequires", "otherRequires"],
44-
"additionalProperties": false,
45-
"properties": {
46-
"id": {
47-
"type": "integer",
48-
"title": "Tech ID",
49-
"description": "Identifier for this tech, unique across all tech."
50-
},
51-
"name": {
52-
"type": "string",
53-
"title": "Tech Name",
54-
"description": "The name of this tech, to be referenced in logical requirements",
55-
"pattern": "^(.*)$"
56-
},
57-
"techRequires": {
58-
"$ref": "m3-requirements.schema.json#/definitions/logicalRequirements",
59-
"title": "Tech Requirements",
60-
"description": "Dependent tech required for this tech."
61-
},
62-
"otherRequires": {
63-
"$ref": "m3-requirements.schema.json#/definitions/logicalRequirements",
64-
"title": "Other Requirements",
65-
"description": "Other requirements to perform this tech, such as items or ammo."
66-
},
67-
"note": {
68-
"$ref": "m3-note.schema.json#/definitions/note"
69-
},
70-
"detailNote": {
71-
"$ref": "m3-note.schema.json#/definitions/detailNote"
72-
},
73-
"devNote": {
74-
"$ref": "m3-note.schema.json#/definitions/devNote"
75-
},
76-
"extensionTechs": {
77-
"type": "array",
78-
"title": "Extension techs",
79-
"description": "An array of extension techs. An extension tech is a more complex version of its parent tech. Its requirements stand alone and explicitly require the parent tech, but it's positioned under the parent to provide hints for cleaning up a tech UI.",
80-
"items": {
81-
"$ref": "#/properties/techCategories/items/properties/techs/items"
82-
}
83-
}
84-
}
89+
"$ref": "#/definitions/tech"
8590
}
8691
}
8792
}

0 commit comments

Comments
 (0)