The View Descriptor Protocol (VDP) lets an API tell its clients which templates render which data: each response carries a view descriptor — a compact JSON block naming a root template by URI and the sub-templates that fill its named slots. Any client — Android, iOS, browser, desktop, or a BFF — reads the same descriptor and renders with its own framework's templates.
Note: This repository also contains archived content from RVST (Representational View State Transfer), VDP's predecessor. RVST schemas are in
schemas/and old examples inexamples/example-*.json. The VDP specification, schema, and examples supersede RVST.
- Spec: view-descriptor-protocol.md
- Schemas: vdp.v0-2.schema.json, vdp-discovery.v0-2.schema.json
- Examples: examples/vdp-*.json
- Test corpus: tests/ — language-neutral fixtures and a reference transform runner
This repository is the working draft of the VDP specification. Alongside the spec it ships the JSON Schema and a set of schema-validated example payloads you can drop into your own integration tests as fixtures.
VDP descriptors declare:
- A template URI pointing to the UI template to render
- Slots that map named insertion points to nested view descriptors (or arrays of descriptors)
- An optional transform per node — a declarative, pointer-based reshaping of the response into the JSON model the node's template expects
- Transport via inline
_view/_views(HAL-compatible) or HTTPLinkheaders (RFC 8288)
Templates handle the actual data binding (Qute, JSONPath, HTMT, etc.) — VDP says which templates to use and, via transforms, which model each one receives; expression logic, filtering, and formatting stay out of the descriptor.
For archived RVST concepts, see docs/archive/concepts-and-principles.md.
The original RVST standard is preserved in:
schemas/— RVST JSON schemas (v1, v1-1, v1-2)examples/example-*.json— RVST example payloadsexamples/rvst-hal-draft.json— unfinished draft of a HAL-based RVST variant (not schema-validated)docs/archive/— RVST documentation and diagrams
Corrections, clarifications, design feedback, and implementation experience reports are all welcome. CONTRIBUTING.md covers the workflow: discuss non-trivial changes in an issue first, target pull requests at develop, and keep the spec, schema, and examples in sync.
View Descriptor Protocol (VDP) is released under the MIT License. For more details, see the LICENSE file.