Roll out codegen registry to all client classes (#114)#115
Merged
Conversation
latest/cautions/delistings/volume/premium.__call__ left on hardcoded paths due to registry (openapi.yaml) gaps that would break pinned wire contracts.
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.
Closes #114
Converts remaining client methods off hardcoded
/api/v…paths ontoself.request_endpoint("<op_id>", **wire_params), single-sourcing path/method/path-query split/defaults from the generated_endpoints.py.Validation policy (settled)
Each class keeps its own semantic + required checks unchanged (
check_required_parameter(s),market ∈ [spot,futures],sort ∈ [asc,desc], currency/type enums, "no data found", DataFrame shaping).request_endpointonly owns path/method/split/defaults + a spec-driven required backstop. No error messages or behavior changed; existing tests pass unmodified.Converted (fully)
Left on hardcoded paths — registry/openapi.yaml gaps (would break pinned wire contracts)
funding_rate.latest— registryfunding_rate_latestlackssort+limit(class supports them).cex_token.updates— registrycex_token_updateslackssort(test pinssort=descon wire).cex_symbol.cautions/delistings— registry lacksbase(class sends it).cex_symbol.volume— registrycex_symbol_volumelacksexchange(test pinsexchangeon wire).premium.__call__— registrypremiumuses snake_case wire keys (source_exchange) but class/test pin camelCase (sourceExchange), and registry lacks ~40 min/max/funding filter params the class sends.These need upstream datamaxi-codegen / openapi.yaml fixes before conversion; filed as follow-ups.
Test plan
pytest -m "not integration": 113 passed, 11 skipped, 116 deselected.black --check+flake8ondatamaxi/+tests/: clean./api/vindatamaxi/**.py(excluding_endpoints.py+ doc-link comments/URLs): only the 5 registry-gap methods above remain.