Skip to content

docs: clarify explicit schema validation direction - #74

Open
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/faq-explicit-schema-direction
Open

docs: clarify explicit schema validation direction#74
FanouZeng-TT wants to merge 1 commit into
Universal-Commerce-Protocol:mainfrom
FanouZeng-TT:docs/faq-explicit-schema-direction

Conversation

@FanouZeng-TT

Copy link
Copy Markdown
Contributor

Description

FAQ.md says payloads without ucp.capabilities or meta.profile always hit
an error and must pass --request or --response:

| Neither | Error (must specify `--request` or `--response`) |

That is true for self-describing payloads, but explicit schema validation has a
different default. In the validate --schema ... path, the CLI falls back to
request direction when no direction flag is set:

determine_direction(request, response, None).unwrap_or(Direction::Request)

A minimal explicit schema validation with no payload metadata therefore succeeds
without either flag.

Fix: scope the table to self-describing payloads and document the explicit
--schema default, while keeping the existing note that resolving a plain schema
still requires an explicit direction.

Category (Required)

  • Core Protocol: Protocol specification changes. (Requires Technical Council approval)
  • Governance/Contributing: Governance or contribution process changes. (Requires Governance Council approval)
  • Capability: Capability specification changes. (Requires Maintainer approval)
  • Documentation: Documentation updates. (Requires Maintainer approval)
  • Infrastructure: Build, CI, tooling, or release changes. (Requires DevOps Maintainer approval)
  • Maintenance: Dependency, compatibility, or routine 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): Repository-wide health files and configuration. (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)

$ cargo run --quiet -- validate /tmp/payload.json --schema /tmp/schema.json --op create
Valid

$ cargo test validate_schema_local_base_accepted_with_explicit_schema --test cli_test
1 passed

$ uvx pre-commit run --all-files
trim trailing whitespace...Passed
fix end of files...Passed
check yaml...Passed
check json...Passed
check for added large files...Passed
detect private key...Passed
check that scripts with shebangs are executable...Passed
prettier...Passed
fmt...Passed
codespell...Passed

$ git diff --check
# no output

@damaz91 damaz91 added the status:needs-triage Signal that the PR is ready for human triage label Sep 2, 2026
@carolinerg1 carolinerg1 added status:under-review and removed status:needs-triage Signal that the PR is ready for human triage labels Sep 3, 2026
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.

3 participants