Hosted Schema
This page covers the games meta-schema that randsum.dev hosts. For rolling dice, game systems and
random numbers over HTTP, use the RANDSUM API at
https://api.randsum.dev/v1.
Hosted meta-schema
Section titled “Hosted meta-schema”The @randsum/games package validates every *.randsum.json game spec against a
JSON Schema. That schema is published at its declared
$id:
https://randsum.dev/schemas/v1/randsum.jsonIt is served as application/json and is byte-identical to the source of truth
in the monorepo (packages/games/randsum.json): the site keeps a copy in
apps/site/public/schemas/v1/, and a sync test fails if the two ever drift.
Editor autocompletion
Section titled “Editor autocompletion”Until the schema lands in SchemaStore (tracked in
issue #1130), reference it
explicitly with a $schema key so editors like VS Code give you completion and
validation while authoring a game spec:
{ "$schema": "https://randsum.dev/schemas/v1/randsum.json", "name": "My Game", "shortcode": "mygame", "game_url": "https://example.com", "roll": { "dice": { "pool": { "sides": 6, "quantity": 2 } }, "resolve": "sum" }}