Skip to content

fix(core): add required spec/schema fields to UCP discovery profile (SAL-DIS-001) - #58

Merged
Mani-fdt merged 1 commit into
mainfrom
fix/sal-dis-001-discovery-schema
Jul 21, 2026
Merged

fix(core): add required spec/schema fields to UCP discovery profile (SAL-DIS-001)#58
Mani-fdt merged 1 commit into
mainfrom
fix/sal-dis-001-discovery-schema

Conversation

@Mani-fdt

Copy link
Copy Markdown
Collaborator

Summary

  • Adds schema field to the REST service block in /.well-known/ucp (UCP spec requires it for REST/MCP/embedded transports)
  • Adds spec and schema fields to all four capability entries (checkout, order, catalog.search, catalog.lookup) — UCP spec marks both as required for every capability

Root cause

formatUcpProfile in packages/core/src/lib/formatters/ucp.ts was emitting only version on each capability and omitting schema from the service block. A compliant agent validating the profile against the spec would see missing required fields.

What was NOT changed (intentional)

  • fulfillment capability not added — spec uses MAY language, optional
  • No top-level name field — not in the UCP spec
  • No dummy_payment gating — no spec guidance, implementation decision

Test plan

  • /.well-known/ucp on staging returns spec + schema on all 4 capabilities
  • Service block contains schema: https://ucp.dev/2026-04-08/services/shopping/rest.openapi.json
  • All URL patterns return HTTP 200 (versioned ucp.dev paths confirmed live)
  • Existing E2E checkout + settle flow unaffected (discovery is read-only)

UCP spec requires `schema` on REST service blocks and both `spec` and
`schema` on every capability entry. Saleor discovery was returning only
`version` on capabilities and omitting `schema` from the service block.

Fixes SAL-DIS-001.
@Mani-fdt
Mani-fdt merged commit 6b153bf into main Jul 21, 2026
1 check passed
@Mani-fdt
Mani-fdt deleted the fix/sal-dis-001-discovery-schema branch July 21, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant