fix: harden simulator data contracts

This commit is contained in:
Codex
2026-08-28 09:21:06 +09:00
parent 582d0013e6
commit 691a4b03ce
12 changed files with 512 additions and 60 deletions
+8 -1
View File
@@ -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" } },