JSON Schema
The widget format is published as a JSON Schema (draft 2020-12):
https://atsurae.app/docs/schema/widget.schema.json
Using it
Section titled “Using it”Add a $schema line at the top of your widget.json:
{ "$schema": "https://atsurae.app/docs/schema/widget.schema.json", ...}Editors that understand JSON Schema (VS Code, Zed, JetBrains editors, Nova, and others with a JSON plugin) then:
- suggest fields and allowed values as you type
- show each field’s description on hover
- underline mistakes: unknown fields, wrong types, invalid IDs and colors, images without a
size
Atsurae ignores the $schema field. Widgets made with New Widget… include it.
What the schema can’t check
Section titled “What the schema can’t check”Atsurae checks more than the schema can:
- that images, fonts and scripts exist in the package
- that tokens are spelled correctly
- that
visibleWhennames a declared option - duplicate IDs across your widgets
Those show up in Problems & Console. See Errors and warnings.
Validating from the command line
Section titled “Validating from the command line”curl -O https://atsurae.app/docs/schema/widget.schema.jsonnpx ajv-cli validate --spec=draft2020 -s widget.schema.json -d "My Widget.atsuraewidget/widget.json"