IGA-719: add JSON round-trip regression test for integer-as-string types - #119
Merged
btipling merged 2 commits intoAug 25, 2026
Merged
Conversation
Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
- Add lossless-vs-input assertion and fresh-target round-trip (FN4) - Add integer:"string" list-response test (FN1) - Add negative/error-path unmarshal tests (FN3) - Replace fragile raw-JSON Contains with structured assertions (FN5) - Assert all fields in SFixed64Rules/SInt64Rules cases (FN6) - Correct Facets test input to only real fields Co-authored-by: c1-squire-dev[bot] <c1-squire-dev[bot]@users.noreply.github.com>
loganintech
approved these changes
Aug 25, 2026
btipling
deleted the
fix/marshal-json-integer-string-tags-src-t1m2-src-80pb
branch
August 25, 2026 20:49
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.
Summary
This PR adds a regression test for the Go SDK's JSON handling of types with
integer:"string"tags. The API serializes int64 values as JSON strings, like"12345", and the SDK's generated types were erroring on marshal and failing to unmarshal string values into int64 fields. The 17 affected types were already fixed in main; this PR locks that behavior in with a round-trip test that covers every one of them.Linear
IGA-719: Go SDK MarshalJSON fails on union type with all fields null
Linear requirements
This PR is test-only. The 17 type fixes it validates are already in main; this PR adds the regression test covering all 17 affected types.
integer:"string"tagsfacetvalue.go,int64rules.gohaveMarshalJSON); this PR is test-onlyutils.MarshalJSON/utils.UnmarshalJSONdelegation patternmarshal_roundtrip_test.gohas a round-trip case for all 17 affected typesgo build ./...andgo test ./...passRelease Notes
No user-facing change. This PR adds a regression test for the Go SDK's JSON handling of integer-as-string fields; the underlying fix is already in main.
What changed
No production files. This is a test-only PR.
Excluded
pkg/models/shared/marshal_roundtrip_test.go— new regression test. It unmarshals each of the 17 affected types from JSON, marshals back, and asserts the output is lossless and round-trips through a fresh instance. It also covers the exact List Users → marshal scenario from the issue.