Skip to content

docs(rest/python): align discovery response example - #212

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/python-discovery-profile-readme
Open

docs(rest/python): align discovery response example#212
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/python-discovery-profile-readme

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

The Discovery section of rest/python/server/README.md labels its JSON block
as the response returned by /.well-known/ucp, but the example still uses the
old profile layout:

  • services.dev.ucp.shopping is an object instead of a transport-entry array;
  • capabilities is an array instead of a capability-name map;
  • payment handlers are outside ucp under payment.handlers.

The route now serves routes/discovery_profile.json, with dynamic
signing_keys and ucp.keys added at request time. Its response uses the
current ucp.services, ucp.capabilities, and ucp.payment_handlers shapes.

Fix: update the documented response to match the live endpoint, using
explicit placeholders for runtime-generated shop and signing-key values.

Category (Required)

  • Core Protocol: Changes to the UCP core protocol. (Requires Technical Council approval)
  • Governance/Contributing: Changes to governance or contributing processes. (Requires Governance Council approval)
  • Capability: Changes to UCP capabilities. (Requires Maintainer approval)
  • Documentation: Documentation-only changes. (Requires Maintainer approval)
  • Infrastructure: CI, build, or repository infrastructure changes. (Requires DevOps Maintainer approval)
  • Maintenance: Dependency or maintenance changes. (Requires DevOps Maintainer approval)
  • SDK: Language-specific SDK updates and releases. (Requires DevOps Maintainer approval)
  • Samples / Conformance: Maintaining samples and the conformance suite. (Requires Maintainer approval)
  • UCP Schema: Changes to the ucp-schema tool. (Requires Maintainer approval)
  • Community Health (.github): Community health file changes. (Requires DevOps Maintainer approval)

Related Issues

N/A

Checklist

  • I have followed the Contributing Guide.
  • I have updated the documentation (if applicable).
  • My changes pass all local linting and formatting checks.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • (For Core/Capability) I have included/updated the relevant JSON schemas.
  • I have regenerated Python Pydantic models by running generate_models.sh under python_sdk.

Screenshots / Logs (if applicable)

  • GET /.well-known/ucp through the FastAPI test client returned 200 with
    public, max-age=3600; verified its services, capabilities, payment handlers,
    and signing-key container shapes.
  • Parsed the updated README JSON and asserted the same stable shape, local
    endpoint, and runtime-generated-value placeholders.
  • Full pre-commit and git diff --check pass.

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Aug 25, 2026
@carolinerg1 carolinerg1 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Aug 25, 2026

@niranjanmanjunath niranjanmanjunath left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) While not strictly blocking, adding "use": "sig" and "alg": "ES256" to the README example would make it an exact 1:1 match with the server's actual HTTP output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants