feat: serve OpenAPI discovery at /openapi.json#466
feat: serve OpenAPI discovery at /openapi.json#466brendanjryan wants to merge 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Redundant — #462 already added the openapi route. Will open a follow-up for just the /openapi.json rewrite. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8ac38b5d19
ℹ️ 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".
| { | ||
| handler: mppx.charge({ | ||
| amount: "0.1", | ||
| currency: USDC, |
There was a problem hiding this comment.
Use configured currency in OpenAPI discovery
The discovery document advertises payment metadata from a hardcoded USDC address here, but the actual /api/ping/paid endpoint charges import.meta.env.VITE_DEFAULT_CURRENCY in src/pages/_api/api/ping/paid.ts. In any deployment where that env var differs (the repository’s .env.example already uses a different address), /openapi.json will publish incorrect x-payment-info, causing clients that rely on discovery to pay with the wrong token and fail when they hit the real Challenge flow.
Useful? React with 👍 / 👎.
Adds an
/api/openapi.jsonroute that generates an OpenAPI 3.1.0 discovery document usingmppx/discovery, plus a Vercel rewrite sohttps://mpp.dev/openapi.jsonserves it.The document describes the site's paid endpoints with
x-payment-infometadata for agent discovery.