Repository navigation
Preserve OpenAPI JSON examples during x402 endpoint probing - #1256
Open
epistemedeus wants to merge 2 commits into
Open
epistemedeus wants to merge 2 commits into
epistemedeus wants to merge 2 commits into
Conversation
Discovery 1.7.5 returns the JSON schema without the sibling example, so the probe synthesized a placeholder URI and the string "test". Use the document example before those defaults, and do not fetch externalValue.
Contributor
|
@epistemedeus is attempting to deploy a commit to the Merit Systems Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Oct 21, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Addresses #1255. Body-dependent x402 endpoints can be missed when discovery strips a declared OpenAPI media-type example and the probe falls back to synthesized placeholder values.
Change
application/jsonwhen reconstructing the probe body from the original OpenAPI document.probeX402Endpointfallback handoff, not only the example selector.Verification
pnpm exec vitest run src/lib/discovery: 92 tests passed across 9 files on Node22, including caller precedence, unavailable-document synthesis fallback, JSON-only selection and method order.The original worker also reproduced the reported unpaid HTTP controls: the documented AcqPath body returned402, the synthesized
max_total_micro: "test"returned400, and a placeholder resource with a valid amount returned422. No payment was made. This is probe compatibility, not a claim that the registration UI was exercised.A full repository typecheck is not claimed: the worker checkout lacked generated Prisma types and reported pre-existing/setup errors outside the changed files.