Skip to content

feat: document and validate --json for scriptable commands - #32

Merged
HaoZeke merged 1 commit into
mainfrom
feat/json-output
Nov 17, 2026
Merged

HaoZeke merged 1 commit into
mainfrom
feat/json-output

Conversation

@HaoZeke

@HaoZeke HaoZeke commented Nov 17, 2026

Copy link
Copy Markdown
Collaborator

This change makes machine-readable output for the Zig-only commands consistent and checkable.

The commands why, history, used and usage already accepted --json with schema_version 1. This kit adds the same opt-in flag to loads, runs and pending, documents the shape of every JSON document in JSON Schema files under docs/orgmode/reference/json/, and adds a reference page that lists those files. The shell script still refuses the Zig-only commands; only the Zig build implements --json.

tests/test_json_schemas.sh runs each command on fixtures and validates stdout with the jsonschema Python package against the matching schema. The Zig CI job installs that dependency and runs the suite through zig build test. The shell and Zig help text stay byte-for-byte compatible for shared commands.

Local CI covered shellcheck, the site-name grep, zig fmt --check, zig build test, a release build, the shell regression suite, and pixi run -e docs docbld.

Add JSON Schema files for why, history, loads, runs, used, usage and
pending, wire loads, runs and pending to opt-in --json output, and check
every document in tests/test_json_schemas.sh.
@HaoZeke
HaoZeke merged commit db929bb into main Nov 17, 2026
8 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