fix(@projects/@magic-civilization): 🐛 update autoplay schema to array for layers
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
d72b837eeb
commit
f1f3716c1f
2 changed files with 11 additions and 3 deletions
|
|
@ -26,8 +26,16 @@ import sys
|
|||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
from autoplay_validate import load_schema, validate # noqa: E402
|
||||
import importlib.util as _iu
|
||||
|
||||
_validate_path = Path(__file__).resolve().parent / "autoplay-validate.py"
|
||||
_spec = _iu.spec_from_file_location("autoplay_validate", _validate_path)
|
||||
if _spec is None or _spec.loader is None:
|
||||
raise ImportError(f"cannot load {_validate_path}")
|
||||
_mod = _iu.module_from_spec(_spec)
|
||||
_spec.loader.exec_module(_mod)
|
||||
load_schema = _mod.load_schema
|
||||
validate = _mod.validate
|
||||
|
||||
TURN_STATS_SCHEMA_NAME = "turn-stats-line"
|
||||
EVENTS_SCHEMA_NAME = "events-line"
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
"properties": {
|
||||
"turn_number": { "type": "integer", "minimum": 0 },
|
||||
"players": { "type": "array" },
|
||||
"layers": { "type": "object" }
|
||||
"layers": { "type": "array" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue