fix(image_variant): fix nested variant response deserialization - #7278
Open
Monark-Arkmon wants to merge 1 commit into
Open
fix(image_variant): fix nested variant response deserialization#7278Monark-Arkmon wants to merge 1 commit into
Monark-Arkmon wants to merge 1 commit into
Conversation
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.
Changes being requested
HAND-PATCH: needs reseal
This fixes generated files (
model.go,resource.go,schema.go) directly, because the root cause is inside Stainless's own generator, not in our OpenAPI spec or Stainless config. Confirmed via a real preview build (config fix tested, verified via actual generated artifact to have zero effect). See IMAGES-1782 / APIX-1226 for the full history of attempted upstream fixes.The API returns image variant responses with data nested under
result.variant, but Create/Read/Update/ImportState were deserializing against a flat envelope, sooptions.fit/metadatacame back null after any Update unless masked by ano_refreshtag on the affected fields.Switches to
ImageVariantWriteResultEnvelope, which correctly parses the nestedresult.variantshape, and removes the now-redundant computedvariantfield from the resource schema/model.Acceptance test run results
Steps to run acceptance tests
Test output
Additional context & links
Supersedes #6918 (same underlying fix, redone on top of current
main, with acceptance tests actually run and passing against a real account).Ref IMAGES-1782 / APIX-1226.