Skip to content

Commit 6ebc9e5

Browse files
committed
Update YarnProject.schema.json
1 parent 86f1d30 commit 6ebc9e5

File tree

1 file changed

+42
-92
lines changed

1 file changed

+42
-92
lines changed

YarnSpinner.Compiler/YarnProject.schema.json

Lines changed: 42 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"title": "Yarn Spinner Project",
55
"description": "Configuration file for a Yarn Spinner project (.yarnproject)",
66
"type": "object",
7-
"required": ["projectFileVersion"],
7+
"required": ["projectFileVersion", "sourceFiles", "baseLanguage"],
88
"properties": {
99
"projectFileVersion": {
1010
"type": "integer",
@@ -27,17 +27,20 @@
2727
"type": "string"
2828
}
2929
},
30+
"authorName": {
31+
"type": "string"
32+
},
33+
"projectName": {
34+
"type": "string"
35+
},
3036
"baseLanguage": {
3137
"type": "string",
32-
"description": "The base language code for the project (e.g., 'en', 'en-US', 'zh-Hans').",
33-
"default": "en",
34-
"pattern": "^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$"
38+
"default": "en"
3539
},
3640
"localisation": {
3741
"type": "object",
3842
"description": "Localization configuration mapping language codes to their string tables and asset directories.",
39-
"patternProperties": {
40-
"^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{1,8})*$": {
43+
"additionalProperties": {
4144
"type": "object",
4245
"properties": {
4346
"strings": {
@@ -75,98 +78,45 @@
7578
"type": "boolean",
7679
"default": false
7780
},
78-
"requireNodeTags": {
79-
"type": "boolean",
80-
"default": false
81-
},
8281
"allowPreviewFeatures": {
8382
"type": "boolean",
8483
"default": false
85-
},
86-
"disableSpellcheck": {
87-
"type": "boolean",
88-
"default": false
89-
},
90-
"spellcheckWords": {
84+
}
85+
},
86+
"additionalProperties": true
87+
},
88+
"editorOptions": {
89+
"type": "object",
90+
"description": "Editor and tooling configuration.",
91+
"properties": {
92+
"disableSpellcheck": { "type": "boolean", "default": false },
93+
"spellcheckWords": { "type": "array", "items": { "type": "string" }, "default": [] },
94+
"defaultPresenter": { "type": "string", "default": "try" },
95+
"editorCharacterColors": {
9196
"type": "array",
9297
"items": {
93-
"type": "string"
94-
},
95-
"default": []
98+
"type": "object",
99+
"properties": {
100+
"id": { "type": "string" },
101+
"name": { "type": "string" },
102+
"colour": { "type": "string", "pattern": "^#[0-9A-Fa-f]{6}$" },
103+
"portraitPath": { "type": "string" }
104+
}
105+
}
96106
},
97-
"playgroundOptions": {
107+
"editorFontSize": { "type": "number", "minimum": 8, "maximum": 72 },
108+
"previewFontSize": { "type": "number", "minimum": 8, "maximum": 72 },
109+
"startNode": { "type": "string" },
110+
"projectGraphPositions": {
98111
"type": "object",
99-
"description": "Configuration for the Yarn Spinner Playground and VSCode preview.",
100-
"properties": {
101-
"projectName": {
102-
"type": "string"
103-
},
104-
"authorName": {
105-
"type": "string"
106-
},
107-
"defaultPresenter": {
108-
"type": "string",
109-
"enum": [
110-
"try",
111-
"default",
112-
"director",
113-
"classic",
114-
"barebones"
115-
],
116-
"default": "try"
117-
},
118-
"editorCharacterColors": {
119-
"type": "array",
120-
"items": {
121-
"type": "object",
122-
"properties": {
123-
"id": {
124-
"type": "string"
125-
},
126-
"name": {
127-
"type": "string"
128-
},
129-
"colour": {
130-
"type": "string",
131-
"pattern": "^#[0-9A-Fa-f]{6}$"
132-
},
133-
"portraitPath": {
134-
"type": "string"
135-
}
136-
}
137-
}
138-
},
139-
"editorFontSize": {
140-
"type": "number",
141-
"minimum": 8,
142-
"maximum": 72
143-
},
144-
"previewFontSize": {
145-
"type": "number",
146-
"minimum": 8,
147-
"maximum": 72
148-
},
149-
"startNode": {
150-
"type": "string"
151-
},
152-
"projectGraphPositions": {
153-
"type": "object",
154-
"additionalProperties": {
155-
"type": "object",
156-
"properties": {
157-
"x": { "type": "number" },
158-
"y": { "type": "number" }
159-
}
160-
}
161-
},
162-
"projectGraphColours": {
163-
"type": "object",
164-
"additionalProperties": {
165-
"type": ["string", "null"]
166-
}
167-
}
168-
},
169-
"additionalProperties": false
112+
"additionalProperties": {
113+
"type": "object",
114+
"properties": { "x": { "type": "number" }, "y": { "type": "number" } }
115+
}
116+
},
117+
"projectGraphColours": {
118+
"type": "object",
119+
"additionalProperties": { "type": ["string", "null"] }
170120
}
171121
},
172122
"additionalProperties": true
@@ -213,5 +163,5 @@
213163
"default": "bestLeastRecentlyViewed"
214164
}
215165
},
216-
"additionalProperties": true
166+
"additionalProperties": false
217167
}

0 commit comments

Comments
 (0)