Skip to content

fix(specs): show correct host for MX endpoints in merged API reference#83

Open
walletconnect-agent[bot] wants to merge 1 commit into
mainfrom
wcagent/fix-merged-spec-per-service-servers
Open

fix(specs): show correct host for MX endpoints in merged API reference#83
walletconnect-agent[bot] wants to merge 1 commit into
mainfrom
wcagent/fix-merged-spec-per-service-servers

Conversation

@walletconnect-agent

Copy link
Copy Markdown
Contributor

Problem

scripts/generate-specs.mjs merges the Core and MX OpenAPI specs into one document but sets only a document-level server pointing at Core (api.pay.walletconnect.com). MX-sourced endpoints inherit it, so the docs page + playground show the wrong host for merchant-API endpoints.

Fix

When merging, stamp each operation with its source service's server (servers: [{ url }]) — Core ops get the Core host, MX ops get api.merchant.pay.walletconnect.com. Mintlify respects per-operation servers. Only real HTTP-method keys are stamped, and any pre-existing operation servers is preserved.

Follow-up (not in this PR)

The committed snapshot (api/2026-02-18.json + api-reference/ MDX) is regenerated by fetching the live service specs, which only runs via the manual Update OpenAPI Specs workflow (workflow_dispatch). A maintainer needs to re-run it to (a) apply this per-service-server fix to the output and (b) refresh the stale snapshot (e.g. add Core's /v1/payments/{id}/transition, drop the phantom GET /v1/payments). Consider adding a schedule/trigger so it stops drifting.

Thread: https://reown-inc.slack.com/archives/C0A1N1Q7XS8/p1783931638893429

generate-specs.mjs merged Core+MX specs but only set a document-level Core server, so MX endpoints rendered api.pay.walletconnect.com instead of api.merchant.pay.walletconnect.com. Tag each operation with its source service's server URL.
@walletconnect-agent

Copy link
Copy Markdown
Contributor Author

Closing/abandoning this — confirmed in thread that MX endpoints are already routed under api.pay.walletconnect.com (unified gateway). So the merged spec's single api.pay server is correct, and stamping the api.merchant.pay host per-operation would point the playground at a host that isn't the canonical one. No base-URL change needed.

The real remaining issue is snapshot staleness (phantom GET /v1/payments, missing /v1/payments/{id}/transition), fixed by re-running the manual Update OpenAPI Specs workflow — not by this change. Please close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants