JSON Schema for the game-state feed #49

Closed
opened 2026-10-20 19:14:27 +00:00 by mintopia · 3 comments
Owner

What to build

Clients can validate every game-state feed message against a published JSON Schema that follows the ADR 0019 message contract. Kept hand-written docs stay the primary explanation; the schema is linked from them.

Acceptance criteria

  • Schema covers snapshot, change and every event type
  • A test validates examples/live-timing/sample-race.jsonl against the schema
  • Feed docs link to the schema

Decided in the docs-site grilling (2026-10-20).

## What to build Clients can validate every game-state feed message against a published JSON Schema that follows the ADR 0019 message contract. Kept hand-written docs stay the primary explanation; the schema is linked from them. ## Acceptance criteria - [ ] Schema covers snapshot, change and every event type - [ ] A test validates `examples/live-timing/sample-race.jsonl` against the schema - [ ] Feed docs link to the schema Decided in the docs-site grilling (2026-10-20).
mintopia removed their assignment 2026-10-20 22:31:10 +00:00
Author
Owner

Blocked on #31–#38: the schema must match the final ADR 0019 contract, sample-race.jsonl is migrated in #31, and the use/collect/decoy/award event payloads land in #35–#38. Earlier escalation (missing blocked-by) resolved.

Blocked on #31–#38: the schema must match the final ADR 0019 contract, `sample-race.jsonl` is migrated in #31, and the use/collect/decoy/award event payloads land in #35–#38. Earlier escalation (missing blocked-by) resolved.
Author
Owner

Added examples/live-timing/feed.schema.json (draft 2020-12; served at /live-timing/feed.schema.json): snapshot, change (typed known keys, roster/standings/race_result), events hit/use/collect/decoy_drop/decoy_hit; unknown keys/events allowed. tests/feed_schema_test.py (ctest feed_schema, needs python jsonschema) validates all 1368 sample-race.jsonl messages, example events, and negative cases. Linked from docs/state-websocket.md and docs/testing.md. Note: sample has no events and no totals, so those are covered by inline examples; totals optional in schema. Docs-site build not run (no node_modules).

Added `examples/live-timing/feed.schema.json` (draft 2020-12; served at /live-timing/feed.schema.json): snapshot, change (typed known keys, roster/standings/race_result), events hit/use/collect/decoy_drop/decoy_hit; unknown keys/events allowed. `tests/feed_schema_test.py` (ctest `feed_schema`, needs python jsonschema) validates all 1368 sample-race.jsonl messages, example events, and negative cases. Linked from docs/state-websocket.md and docs/testing.md. Note: sample has no events and no `totals`, so those are covered by inline examples; `totals` optional in schema. Docs-site build not run (no node_modules).
Author
Owner

Completed and merged by Harmonic (task 41).

Completed and merged by Harmonic (task 41).
Sign in to join this conversation.
No description provided.