Schema Authoring Guide
Overview
This guide documents the conventions for authoring UCP JSON schemas, including required metadata fields and versioning strategy.
Schema Metadata Fields
UCP schemas use a combination of standard JSON Schema fields and UCP-specific metadata:
| Field | Standard | Purpose | Required For |
|---|---|---|---|
$schema | JSON Schema | Declares JSON Schema draft version (SHOULD use draft/2020-12) | All schemas |
$id | JSON Schema | Schema’s canonical URI for $ref resolution | All schemas |
title | JSON Schema | Human-readable display name | All schemas |
description | JSON Schema | Schema purpose and usage | All schemas |
name | UCP | Reverse-domain capability identifier | Capability schemas only |
version | UCP | Capability version (YYYY-MM-DD format) | Capability schemas only |
Self-Describing Schemas
Capability schemas MUST be self-describing. When a platform fetches a schema, it should be able to determine exactly what capability and version it represents without cross-referencing other documents.
Why self-describing?
- Independent versioning: Capabilities MAY version independently
- Validation: Validators can cross-check that capability declarations match
- Developer experience: Integrators immediately see what capability the schema defines
- Compact namespace: The
namefield provides a standardized reverse-domain identifier
The name Field
The name field uses reverse-domain notation for capability identification:
dev.ucp.shopping.checkout # UCP checkout capability
dev.ucp.shopping.fulfillment # UCP fulfillment extension
com.shopify.loyalty # Vendor capabilityThe version Field
The version field uses date-based versioning (YYYY-MM-DD):
"version": "2026-01-11"Schema Categories
Capability Schemas
Schemas that define negotiated capabilities. These appear in ucp.capabilities[] arrays.
MUST include: $schema, $id, title, description, name, version
Component Schemas
Schemas that define data structures embedded within capabilities but are not independently negotiated.
MUST include: $schema, $id, title, description
MUST NOT include: name, version
Type Schemas
Reusable type definitions referenced by capability and component schemas.
MUST include: $schema, $id, title, description
MUST NOT include: name, version
Example: Capability Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://ucp.dev/schemas/shopping/checkout.json",
"name": "dev.ucp.shopping.checkout",
"version": "2026-01-11",
"title": "Checkout",
"description": "Base checkout schema. Extensions compose via allOf.",
"type": "object",
"required": ["ucp", "id", "line_items", "status", "currency"],
"properties": {
...
}
}