Skip to content

fix(openapi): declare Base Fee response contract - #1

Open
epistemedeus wants to merge 1 commit into
Rotwang9000:mainfrom
epistemedeus:codex/base-fee-response-contract-20260820
Open

fix(openapi): declare Base Fee response contract#1
epistemedeus wants to merge 1 commit into
Rotwang9000:mainfrom
epistemedeus:codex/base-fee-response-contract-20260820

Conversation

@epistemedeus

Copy link
Copy Markdown

What

Give GET /v1/q/base-fee a truthful machine-readable success contract in both
the Bazaar discovery metadata and generated OpenAPI document.

The runtime already guarantees these values on every successful fresh, cached,
and blob-less response:

  • as_of_ms: integer
  • block: integer
  • source: string

The OpenAPI generator now projects a response schema only when seller discovery
declares a non-empty required array, and copies only those required property
definitions. That keeps optional RPC-dependent fields out of the guaranteed
response contract.

Scope

  • No route, handler, price, payment, settlement, facilitator, or MIME behavior
    changes.
  • Every unrelated paid operation keeps its existing untyped
    application/json success response.
  • CSV and JSONL response modeling is intentionally out of scope.

Verification

  • Full suite: 631 passed, 0 failed across 30 suites.
  • Focused OpenAPI, fee, and x402 suites pass.
  • Generated document audit inspected all 33 paid operations. Only Base Fee is
    strengthened, with properties and required both exactly
    as_of_ms, block, and source.
  • git diff --check passes.

The upstream main branch's current npm ci failure from the existing ws
override and lockfile mismatch predates this change. The full suite passes with
the repository dependencies installed without changing the lockfile.

Signed-off-by: epistemedeus <epistemedeus@gmail.com>
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.

1 participant