Skip to content

feat: add published JSON schema CLI#44

Merged
sjquant merged 3 commits into
mainfrom
w3a-json-schema-cli
Jul 5, 2026
Merged

feat: add published JSON schema CLI#44
sjquant merged 3 commits into
mainfrom
w3a-json-schema-cli

Conversation

@sjquant

@sjquant sjquant commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Why

Expose a deterministic JSON Schema for quickthumb JSON specs so agents, editors, and constrained-generation workflows can use the same model contract as the renderer.

Changes

  • Added quickthumb schema with stdout output and optional --output file writing.
  • Added a public canvas_json_schema() helper backed by Pydantic spec models, including built-in layer discriminators, top-level theme, explicit canvas sizing, and supported platform presets.
  • Tightened generated schema metadata for colors, opacity, position arrays, positive percentage fields, enum-like fields, and tuple-style align inputs without widening stored runtime model types.
  • Documented schema usage and constrained-generation guidance in the JSON workflow docs and README.

Validation

  • uv run --locked ty check quickthumb --output-format concise
  • uv run --locked ruff check quickthumb tests
  • uv run --locked ruff format --check quickthumb tests
  • uv run --locked pytest tests/test_cli.py tests/test_canvas.py --no-cov

@sjquant sjquant merged commit fa0e218 into main Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant