Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,24 @@ repos:
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
# JSON Schema: validate UCP schema files against their declared meta-schema
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.33.0
hooks:
- id: check-metaschema
files: ^source/(schemas|discovery)/.*\.json$
- id: check-jsonschema
name: Validate OpenAPI definitions
files: ^source/(services/.*\.openapi\.json|handlers/.*/openapi\.json)$
args:
- --schemafile
- https://spec.openapis.org/oas/3.1/schema/2022-10-07
- id: check-jsonschema
name: Validate OpenRPC definitions
files: ^source/services/.*\.openrpc\.json$
args:
- --schemafile
- https://meta.open-rpc.org/
# Python: Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.13
Expand Down
1 change: 1 addition & 0 deletions source/services/shopping/embedded.openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"openrpc": "1.3.2",
"info": {
"title": "UCP Shopping Embedded Protocol",
"version": "draft",
"description": "Embedded Protocol (EP) methods for the UCP shopping service. Methods are sent from Merchant to Host via postMessage using JSON-RPC 2.0. Method prefixes indicate capability scope: ep.{capability} (i.e. ep.checkout). Schema references are logical pointers - actual payload shape is determined by negotiated capabilities.\n\nEmbedded Protocol is a client-to-client postMessage interface, so there is no endpoint URL to access this API. Platforms detect merchant support for this protocol based on the presence of `services[\"dev.ucp.shopping\"][transport=embedded]` in discovery responses."
},
"servers": [],
Expand Down
1 change: 1 addition & 0 deletions source/services/shopping/mcp.openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"openrpc": "1.3.2",
"info": {
"title": "UCP Shopping Service",
"version": "draft",
"description": "Canonical MCP/JSON-RPC interface for UCP Shopping service. Schema references are logical pointers - actual payload shape is determined by negotiated capabilities.\n\n**Endpoint Resolution:** This spec defines methods only. The endpoint URL MUST be obtained from the merchant's discovery profile at `/.well-known/ucp` under `services[\"dev.ucp.shopping\"][transport=mcp].endpoint`. The server entry below is a placeholder for tooling compatibility."
},
"servers": [
Expand Down
1 change: 1 addition & 0 deletions source/services/shopping/rest.openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "UCP Shopping Service",
"version": "draft",
"description": "Canonical REST interface for UCP Shopping service. Schema references are logical pointers - actual payload shape is determined by negotiated capabilities.\n\n**Endpoint Resolution:** This spec defines operations only. The base URL MUST be obtained from the merchant's discovery profile at `/.well-known/ucp` under `services[\"dev.ucp.shopping\"][transport=rest].endpoint`. The `{endpoint}` server variable below is a placeholder for tooling compatibility."
},
"servers": [
Expand Down