fix: harden simulator data contracts
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
"title": "micarrsim acoustic scene",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["schemaVersion", "kind", "id", "name", "units", "sampleRate", "duration", "speedOfSound", "seed", "sources"],
|
||||
"required": ["schemaVersion", "kind", "id", "name", "units", "sampleRate", "duration", "speedOfSound", "seed", "mix", "sources"],
|
||||
"properties": {
|
||||
"schemaVersion": { "const": "1.0.0" }, "kind": { "const": "micarrsim.scene" },
|
||||
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._-]*$" },
|
||||
@@ -14,6 +14,13 @@
|
||||
"duration": { "type": "number", "exclusiveMinimum": 0, "maximum": 300 },
|
||||
"speedOfSound": { "type": "number", "minimum": 250, "maximum": 400 },
|
||||
"seed": { "type": "integer", "minimum": 0, "maximum": 4294967295 },
|
||||
"mix": {
|
||||
"type": "object", "additionalProperties": false, "required": ["normalization", "targetPeak"],
|
||||
"properties": {
|
||||
"normalization": { "enum": ["none", "peak"] },
|
||||
"targetPeak": { "type": "number", "exclusiveMinimum": 0, "maximum": 1 }
|
||||
}
|
||||
},
|
||||
"image": { "$ref": "#/$defs/image" },
|
||||
"assets": { "type": "array", "maxItems": 128, "items": { "$ref": "#/$defs/asset" } },
|
||||
"sources": { "type": "array", "minItems": 1, "maxItems": 32, "items": { "$ref": "#/$defs/source" } },
|
||||
|
||||
Reference in New Issue
Block a user