feat: regenerate for openapi 0.99.2 (202 on getBacktestResult) - #2
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. GetBacktestResultResponse widens from BacktestJobResult to a union with the 202's empty-object type. That is why this is a minor and not a patch: reading `data.state` still compiles (the 202 member is an index signature, so the property resolves), but assigning the response to BacktestJobResult no longer does. A polling caller must treat the 202 member as "ask again", never as a finished job. Bumped to 0.6.0. Typecheck and build clean.
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. Bumped to0.6.0.The generated change
GetBacktestResultResponsewidens fromBacktestJobResultto a union with the 202's empty-object type:Why minor, not patch
Reading
data.statestill compiles — the 202 member is an index signature, so the property resolves and the union access is fine. But assigning the response toBacktestJobResultno longer does, so a consumer doingconst r: BacktestJobResult = data!breaks. That is a consumer-visible type change and deserves the minor.A polling caller must treat the 202 member as "ask again", never as a finished job: it carries no
state, which is exactly what stops a poll loop from mistaking it for a completed run with no results.Validation
tsc --noEmitclean,tsupbuild clean. Diff is limited tosdk.gen.ts(doc comment) andtypes.gen.ts(the union member) — no other operation moved.