Commit 58f14de
committed
spec: extract Manifest JSON Schema to schemas/v1/manifest.schema.json + minimal fixture
The manifest contract has lived as prose + an inline schema block inside
spec/04-manifest.md §5 since v1.0. That made every downstream tool
re-implement its own interpretation: the Hub validates server-side, the
CLI bounces all decisions to the Hub, an IDE has nothing to autocomplete
against, CI lint cannot validate a candidate manifest before publish.
This commit lifts the inline schema into a standalone, canonical
JSON Schema 2020-12 file. spec/04-manifest.md now points at the file
as the source of truth for any tooling that needs to validate a
manifest. Inline snippets remain for human readers.
## What landed
schemas/v1/manifest.schema.json
641 lines, Draft 2020-12, $id = https://jecp.dev/schemas/v1/manifest.schema.json
additionalProperties: false at every level (catches typos)
Per-field descriptions ported from spec prose so the schema is
self-documenting in IDEs that surface JSON Schema descriptions
Captures: namespace/capability identity, endpoint, authentication,
actions (with composes / pricing / input_schema / output_schema /
sla / side_effects), compliance, billing, deprecation,
metadata + extensions escape hatch.
fixtures/manifest-minimal-valid.json
The smallest object that validates. Smoke-tested with
Python jsonschema.Draft202012Validator — both schema-validity
and fixture-validity green.
## What this unblocks
- CLI client-side `jecp provider validate <yaml>` without round-
tripping to the Hub.
- IDE autocomplete + inline validation in VS Code / JetBrains via
the standard JSON Schema mechanism (point the editor at the $id URL).
- Conformance YAMLs for /v1/providers/* can reference the schema by
$id, removing prose-vs-test drift.
- A future @jecpdev/sdk JecpProviderClient can generate TypeScript
types from the schema instead of hand-rolling them.
- CI lint on jecp-spec itself can verify every example in the
manifest documentation against the schema.
## What this does NOT do
- No x402 fields (usdc_payout_address, payment_methods). Those are
in the AUTHORIZED_SETTLER redesign currently in flight. Until the
redesign lands they live under manifest.extensions{} as
extension-namespace properties. v1.1 of this schema will promote
them to first-class fields.
- No spec wording change beyond a pointer line. The prose schema
description in §5 still reads exactly as before; the new schema
is normative because it is referenced from §5, not because it
replaces the prose.
Verified: schema valid against Draft 2020-12 metaschema; fixture
validates; one negative test (invalid namespace) rejects with the
expected pattern violation.1 parent d31e4cb commit 58f14de
3 files changed
Lines changed: 430 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments