Skip to content

feat: add /api/openapi.json discovery endpoint#462

Merged
brendanjryan merged 2 commits intomainfrom
feat/openapi-discovery
Mar 25, 2026
Merged

feat: add /api/openapi.json discovery endpoint#462
brendanjryan merged 2 commits intomainfrom
feat/openapi-discovery

Conversation

@brendanjryan
Copy link
Collaborator

Summary

Adds an OpenAPI 3.1.0 discovery endpoint at /api/openapi.json using the new discovery() helper from mppx/nextjs (wevm/mppx#235).

Changes

  • Bump mppx to 0.4.9 (PR preview from feat: add OpenAPI-first discovery tooling wevm/mppx#235) for OpenAPI-first discovery tooling
  • Add /api/openapi.json route using discovery() from mppx/nextjs with the site's own mppx server instance
  • Serves an OpenAPI 3.1.0 doc with x-payment-info for GET /api/ping/paid and x-service-info metadata

Endpoint

GET https://mpp.dev/api/openapi.json

Returns a spec-strict OpenAPI discovery document describing the site's paid API surface.

@vercel
Copy link

vercel bot commented Mar 25, 2026

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

Project Deployment Actions Updated (UTC)
mpp Ready Ready Preview, Comment Mar 25, 2026 9:23pm

Request Review

Copy link

@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: 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'

Choose a reason for hiding this comment

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

P2 Badge 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
@brendanjryan brendanjryan force-pushed the feat/openapi-discovery branch from 9231284 to 7254de9 Compare March 25, 2026 21:20
VITE_DEFAULT_CURRENCY is not available during SSG in CI, and
discovery() eagerly evaluates mppx.charge() at import time.
@brendanjryan brendanjryan force-pushed the feat/openapi-discovery branch from 7254de9 to 7db6fbd Compare March 25, 2026 21:21
@brendanjryan brendanjryan merged commit fa7559d into main Mar 25, 2026
8 checks passed
@brendanjryan brendanjryan deleted the feat/openapi-discovery branch March 25, 2026 21:36
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