You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Makes the params argument optional on compareMarketPrices, fetchRelatedMarkets, and fetchHedges in both BaseExchange.ts (abstract declarations) and Router.ts (concrete implementations), allowing callers to invoke these methods without arguments for "browse all" mode.
OpenAPI spec: openapi.yaml is AST-generated from BaseExchange.ts -- signature changes require regeneration
SDKs: Generated TS and Python clients depend on the OpenAPI spec
Findings
CRITICAL: OpenAPI spec not regenerated.BaseExchange.ts is changed but openapi.yaml is not updated. Per CLAUDE.md and the .github/workflows/openapi-check.yml CI check, this will fail CI. The PR must run npm run generate:openapi --workspace=pmxt-core and include the updated openapi.yaml and method-verbs.json.
Note on compareMarketPrices OpenAPI behavior. The current OpenAPI spec for compareMarketPrices uses a POST with required: ["args"] in the request body. Making params optional in TS does not automatically make the args array optional in the spec -- the regeneration step should handle this, but it needs verification.
Router.ts uses params.market without null-guarding for the = {} default. When params defaults to {}, params.market is undefined, so the if (params.market && !params.marketId) guard works correctly. No issue here.
Good immutable patterns. Router.ts already uses params = { ...params, ... } spread for reassignment, consistent with project conventions.
PMXT Pipeline Check
Field propagation: N/A
OpenAPI sync: ISSUE (BaseExchange.ts changed, openapi.yaml not regenerated)
Type safety: OK (optional params with = {} defaults are sound)
Semver Impact
minor -- relaxes required argument to optional, backward-compatible
Risk
CI will reject this PR until openapi.yaml is regenerated. After regeneration, SDKs should be regenerated too to reflect the optional params.
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
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.
Fixes #448