feat: add /api/openapi.json discovery endpoint#462
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9686c57374
ℹ️ 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".
| express: '>=5' | ||
| hono: '>=4' | ||
| viem: '>=2.46.2' | ||
| viem: '>=2.47.5' |
There was a problem hiding this comment.
Upgrade viem to satisfy mppx 0.4.9 peer requirement
This update bumps mppx to 0.4.9, but that version now declares viem >=2.47.5 while the project still pins viem to ^2.46.2 in package.json. That leaves the repo in an unsupported dependency state, which can fail installs in environments enforcing strict peer dependencies and risks runtime/type incompatibilities if mppx uses APIs introduced after 2.46.x.
Useful? React with 👍 / 👎.
- Bump mppx to 0.4.9 (wevm/mppx#235) for OpenAPI-first discovery tooling - Add /api/openapi.json route using discovery() from mppx/nextjs - Serves OpenAPI 3.1.0 doc with x-payment-info for /api/ping/paid
9231284 to
7254de9
Compare
VITE_DEFAULT_CURRENCY is not available during SSG in CI, and discovery() eagerly evaluates mppx.charge() at import time.
7254de9 to
7db6fbd
Compare
Summary
Adds an OpenAPI 3.1.0 discovery endpoint at
/api/openapi.jsonusing the newdiscovery()helper frommppx/nextjs(wevm/mppx#235).Changes
0.4.9(PR preview from feat: add OpenAPI-first discovery tooling wevm/mppx#235) for OpenAPI-first discovery tooling/api/openapi.jsonroute usingdiscovery()frommppx/nextjswith the site's ownmppxserver instancex-payment-infoforGET /api/ping/paidandx-service-infometadataEndpoint
Returns a spec-strict OpenAPI discovery document describing the site's paid API surface.