Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3188d12 to
63b3e57
Compare
There was a problem hiding this comment.
💡 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".
| "redirects": [ | ||
| { | ||
| "source": "/openapi.json", | ||
| "destination": "/api/openapi.json" | ||
| } | ||
| ], | ||
| "redirects": [ | ||
| "destination": "/api/openapi.json", | ||
| "permanent": false |
There was a problem hiding this comment.
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
63b3e57 to
1023bcd
Compare
Adds a new Discovery section to the docs covering OpenAPI-first service discovery from wevm/mppx#235.
New page:
/protocol/discoveryx-payment-infoandx-service-infoextensions work, with highlighted JSON examplesgenerateandvalidatecommandsSidebar
Adds a "Discovery" section before "Payment Methods & Intents" with a single Overview link.
References