feat: regenerate for openapi 0.99.2 (202 on getBacktestResult) - #3
Merged
Conversation
The spec now declares the 202 the execute-result endpoint already returned: the job is known but its result is not readable yet, so the response carries an empty body and no state. The generator picks it up as its own model. _parse_response gains a 202 branch returning GetBacktestResultResponse202, and the return type widens to BacktestJobResult | GetBacktestResultResponse202 | ResponseError. A caller that polls must treat the 202 member as "ask again", never as a finished job. Regenerated with scripts/regenerate.sh; version tracks the spec, as that script pins it. The three generator warnings in the output are pre-existing and unrelated: two binary download endpoints (vnd.lastra / parquet) and the text/plain strategy POST, none of which this spec change touches.
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.
What
Regenerated from spec
0.99.2, which declares the202the execute-result endpoint already returned. Version tracks the spec (0.99.2), asscripts/regenerate.shpins it.The generated change
get_backtest_resultgains a202branch and a model for its body:The return type widens to
BacktestJobResult | GetBacktestResultResponse202 | ResponseError. A polling caller must treat the202member as "ask again", never as a finished job: it carries nostate, which is what stops a poll loop from mistaking it for a completed run with no results.Validation
uv run pytest— 13 passed. Diff is limited to theget_backtest_resultmodule, the new model, the models__init__, and the version pin.On the generator warnings: the run prints three, all pre-existing and unrelated to this change — two binary download endpoints (
application/vnd.lastra/ parquet) whose responses are omitted, and thetext/plainstrategy POST which is not generated at all. The diff confirms it: nothing outside the 202 moved.