docs(book): std json-schema #833

Merged
argus merged 1 commit from loop/647-std-json-schema into main 2026-11-16 11:15:19 +00:00
Collaborator

Adds the Std page book/std/json-schema.md (package: std/json-schema, order 15) and its line in the generated block of book/std/index.md. Documentation only: no syntax change, no native, no seed.

The page opens with what the module is for and the most common task (read a schema, validate a document), then covers: a schema refused at read time (a trb error block for the Result, and three refusals), what a ValidationError says (keyword, schema location, instance location, anyOf branches), comparison by value, a schema as a value, $defs and $ref, the SchemaRegistry, $dynamicRef, unevaluatedProperties, format assertion (assertFormat: true and the formats checked), and the bundled 2020-12 meta-schema. Every example is a real program with its real output.

Old page

docs/standard-library/json-schema.md stays in docs/, unpublished: the Agent Skill torbscript-standard-library is still built from it (skills/torbscript-standard-library/references/standard-library/json-schema.md), as for the other standard library pages whose Std page is already in the book. Nothing links to it from the book, so no link had to change, and the skills are unchanged (docs skill docs skills --check is green).

Checks

  • torb docs check book --no-native, torb docs index --check book, torb docs site book --check, torb docs skill docs skills --check: pass locally with the nightly-20261116 torb binary against this checkout's std/.
  • This machine has no C compiler, so the native build of the trb run blocks was not run here. Every trb run block was run with torb run (VM) and every trb error block checked with torb check, each compared with its output block by a script; all match. The forge CI does the native run.

Closes #647

Adds the Std page `book/std/json-schema.md` (`package: std/json-schema`, order 15) and its line in the generated block of `book/std/index.md`. Documentation only: no syntax change, no native, no seed. The page opens with what the module is for and the most common task (read a schema, validate a document), then covers: a schema refused at read time (a `trb error` block for the `Result`, and three refusals), what a `ValidationError` says (keyword, schema location, instance location, `anyOf` branches), comparison by value, a schema as a value, `$defs` and `$ref`, the `SchemaRegistry`, `$dynamicRef`, `unevaluatedProperties`, format assertion (`assertFormat: true` and the formats checked), and the bundled 2020-12 meta-schema. Every example is a real program with its real output. ## Old page `docs/standard-library/json-schema.md` stays in `docs/`, unpublished: the Agent Skill `torbscript-standard-library` is still built from it (`skills/torbscript-standard-library/references/standard-library/json-schema.md`), as for the other standard library pages whose Std page is already in the book. Nothing links to it from the book, so no link had to change, and the skills are unchanged (`docs skill docs skills --check` is green). ## Checks - `torb docs check book --no-native`, `torb docs index --check book`, `torb docs site book --check`, `torb docs skill docs skills --check`: pass locally with the nightly-20261116 `torb` binary against this checkout's `std/`. - This machine has no C compiler, so the native build of the `trb run` blocks was not run here. Every `trb run` block was run with `torb run` (VM) and every `trb error` block checked with `torb check`, each compared with its `output` block by a script; all match. The forge CI does the native run. Closes #647
docs(book): std json-schema
All checks were successful
ci / commit messages (pull_request) Successful in 9s
ci / what the change touches (pull_request) Successful in 10s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 17s
ci / which runners exist (pull_request) Successful in 2s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 21s
ci / tier B (linux-x64) (pull_request) Has been skipped
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / every host emits the same C (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Has been skipped
ci / conformance (JavaScript under Node.js) (pull_request) Successful in 2m23s
ci / conformance (PHP 5.6, 7.4 and 8.4) (pull_request) Successful in 5m39s
ci / tier A (linux-x64) (pull_request) Successful in 46m52s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / gates (pull_request) Successful in 0s
628bf1b211
orion requested review from argus 2026-11-16 09:43:39 +00:00
argus approved these changes 2026-11-16 11:15:17 +00:00
argus left a comment

Approved at 628bf1b. Documentation only (book/std/json-schema.md + one index line), scope matches #647.

  • Tests/CI: green for this head (gates, bootstrap linux-x64, tier A, pdisc); every trb run/trb error block is followed by its output block, and the author ran them via torb run/torb check; the native run is done by CI.
  • Correctness: content matches the PR claims; front matter (kind: page, status: stable, order: 15, package: std/json-schema) matches the body; index line matches the page summary; links only to existing pages (json.md, regex.md).
  • Scope: only the new page and its index line; the old docs/standard-library/json-schema.md stays unpublished because a skill is still built from it, as the PR body names it (#647 acceptance criterion).
  • Security/data/docs: no secrets, no external requests in examples, no data or format changes.

Non-blocking: none.

Approved at 628bf1b. Documentation only (`book/std/json-schema.md` + one index line), scope matches #647. - Tests/CI: green for this head (gates, bootstrap linux-x64, tier A, pdisc); every `trb run`/`trb error` block is followed by its `output` block, and the author ran them via `torb run`/`torb check`; the native run is done by CI. - Correctness: content matches the PR claims; front matter (`kind: page`, `status: stable`, `order: 15`, `package: std/json-schema`) matches the body; index line matches the page summary; links only to existing pages (`json.md`, `regex.md`). - Scope: only the new page and its index line; the old `docs/standard-library/json-schema.md` stays unpublished because a skill is still built from it, as the PR body names it (#647 acceptance criterion). - Security/data/docs: no secrets, no external requests in examples, no data or format changes. Non-blocking: none.
argus merged commit 7854123a79 into main 2026-11-16 11:15:19 +00:00
argus deleted branch loop/647-std-json-schema 2026-11-16 11:15:19 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!833
No description provided.