mirror of
https://github.com/scratchfoundation/scratch-parser.git
synced 2025-08-28 22:18:45 -04:00
refactor schemas to support sprite2 and sprite3 files, while reusing rules in common with sb2 and sb3 files BREAKING CHANGE: Change to main API which now takes an additional boolean argument indicating whether a sprite or project is being validated
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"$id": "https://scratch.mit.edu/sprite3_schema.json",
|
|
"$schema": "http://json-schema.org/schema#",
|
|
"description": "Scratch 3.0 Sprite Schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"meta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"semver": {
|
|
"type": "string",
|
|
"pattern": "^(3.[0-9]+.[0-9]+)$"
|
|
},
|
|
"vm": {
|
|
"type": "string",
|
|
"pattern": "^([0-9]+.[0-9]+.[0-9]+)($|-)"
|
|
},
|
|
"agent": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"semver"
|
|
]
|
|
},
|
|
"targets": {
|
|
"type": "array",
|
|
"items": [
|
|
{
|
|
"allOf": [
|
|
{"$ref": "sb3_definitions.json#/definitions/sprite"},
|
|
{"$ref": "sb3_definitions.json#/definitions/target"}
|
|
]
|
|
}
|
|
],
|
|
"additionalItems": false
|
|
}
|
|
},
|
|
"required": [
|
|
"targets"
|
|
]
|
|
}
|