Skip to content

feat: regenerate for openapi 0.99.2 (202 on getBacktestResult) - #3

Merged
mrmx merged 1 commit into
mainfrom
feat/regenerate-for-spec-0.99.2
Jul 27, 2026
Merged

feat: regenerate for openapi 0.99.2 (202 on getBacktestResult)#3
mrmx merged 1 commit into
mainfrom
feat/regenerate-for-spec-0.99.2

Conversation

@mrmx

@mrmx mrmx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What

Regenerated from spec 0.99.2, which declares the 202 the execute-result endpoint already returned. Version tracks the spec (0.99.2), as scripts/regenerate.sh pins it.

The generated change

get_backtest_result gains a 202 branch and a model for its body:

if response.status_code == 202:
    response_202 = GetBacktestResultResponse202.from_dict(response.json())
    return response_202

The return type widens to BacktestJobResult | GetBacktestResultResponse202 | ResponseError. A polling caller must treat the 202 member as "ask again", never as a finished job: it carries no state, 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 the get_backtest_result module, 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 the text/plain strategy POST which is not generated at all. The diff confirms it: nothing outside the 202 moved.

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.
@mrmx
mrmx merged commit 7403605 into main Jul 27, 2026
5 checks passed
@mrmx
mrmx deleted the feat/regenerate-for-spec-0.99.2 branch July 27, 2026 09:04
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