Skip to content

Commit 1f8a651

Browse files
committed
feat(sb3_schema): add comment validation for sb3
1 parent 1f05cb4 commit 1f8a651

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

lib/sb3_definitions.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@
220220
"opcode": {
221221
"type": "string"
222222
},
223+
"comment": {
224+
"type": "string"
225+
},
223226
"inputs": {
224227
"type": "object",
225228
"additionalProperties": {
@@ -281,6 +284,21 @@
281284
"opcode"
282285
]
283286
},
287+
"comment": {
288+
"type": "object",
289+
"properties": {
290+
"blockId": {"$ref": "#/definitions/optionalString"},
291+
"text": {"type": "string"},
292+
"minimized": {"type": "boolean"},
293+
"x": {"type": "number"},
294+
"y": {"type": "number"},
295+
"width": {"type": "number"},
296+
"height": {"type": "number"}
297+
},
298+
"required": [
299+
"text"
300+
]
301+
},
284302
"stage": {
285303
"type": "object",
286304
"description": "Description of property (and/or property/value pairs) that are unique to the stage.",
@@ -378,6 +396,10 @@
378396
"type": "object",
379397
"additionalProperties": {"$ref":"#/definitions/broadcast_message"}
380398
},
399+
"comments": {
400+
"type": "object",
401+
"additionalProperties": {"$ref": "#/definitions/comment"}
402+
},
381403
"costumes": {
382404
"type": "array",
383405
"items": {"$ref":"#/definitions/costume"},

0 commit comments

Comments
 (0)