Skip to content

docs: add Discovery protocol page#471

Merged
brendanjryan merged 3 commits intomainfrom
docs/discovery-page
Mar 26, 2026
Merged

docs: add Discovery protocol page#471
brendanjryan merged 3 commits intomainfrom
docs/discovery-page

Conversation

@brendanjryan
Copy link
Copy Markdown
Collaborator

Adds a new Discovery section to the docs covering OpenAPI-first service discovery from wevm/mppx#235.

New page: /protocol/discovery

  • Overview — what discovery is, how x-payment-info and x-service-info extensions work, with highlighted JSON examples
  • Generate with mppx — framework helpers for Hono (auto mode), Express, and Next.js, plus CLI generate and validate commands
  • Build manually — step-by-step guide for hand-authoring a discovery document per the spec
  • Registries — links to MPPScan and the mpp.dev services directory
  • Validation — CLI usage and common validation issues table

Sidebar

Adds a "Discovery" section before "Payment Methods & Intents" with a single Overview link.

References

Vercel rewrites run after SSR, so the Vocs 404 handler catches
/openapi.json before the rewrite applies. Redirects run before
SSR and reliably route to the API endpoint.
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mpp Ready Ready Preview, Comment Mar 26, 2026 4:50am

Request Review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3188d12b32

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2 to +6
"redirects": [
{
"source": "/openapi.json",
"destination": "/api/openapi.json"
}
],
"redirects": [
"destination": "/api/openapi.json",
"permanent": false
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve /openapi.json as direct JSON endpoint

Switching this rule from a rewrite to a redirect means GET /openapi.json now returns an HTTP redirect instead of the OpenAPI document itself. Discovery tooling and crawlers that validate the canonical endpoint (or do not follow redirects) can fail to ingest the service, and even redirect-following clients get an unnecessary extra hop and a different final URL (/api/openapi.json). Keep /openapi.json as a rewrite so it serves 200 application/json directly at the canonical path.

Useful? React with 👍 / 👎.

- New protocol/discovery page covering OpenAPI-first discovery
- Overview with x-payment-info and x-service-info extensions
- Framework examples for Hono, Express, Next.js
- CLI generate and validate commands
- Manual authoring guide and registries section
- Add Discovery sidebar section
@brendanjryan brendanjryan merged commit ac9c99a into main Mar 26, 2026
8 checks passed
@brendanjryan brendanjryan deleted the docs/discovery-page branch March 26, 2026 04:42
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.

1 participant