Skip to content

Payload Schemas and Validation

This page provides concrete JSON Schema files you can reuse and extend.

Important:

  • match-payload.schema.json describes host-required generic match fields.
  • invite-options.schema.json and move-payload.schema.json are strict starter templates for extension authors.
  • YABFS does not enforce one universal game-specific payload shape. You own your game-specific schema design.

Published schema files

Published example payloads

Validation command

python3 scripts/validate_schemas.py

The script validates all shipped examples against the shipped schemas and exits non-zero on failure.

How to use in your own game package

  1. Copy invite-options.schema.json and move-payload.schema.json as a starting point.
  2. Replace placeholder keys with your game-specific keys.
  3. Keep the host generic match keys untouched in payloads returned to base UI.
  4. Validate example payloads in CI before publishing your package.