Repository navigation
fix(indexes)!: keep IndexConstituent.founded verbatim as a string - #396
Merged
Merged
Conversation
The `founded` member on `IndexConstituent` was decoded as a date, but the provider sends founding years in forms that are not dates: a single year (`"1994"`), several years joined by `/` (`"1902/1985"`), and only sometimes a full date (`"1982-12-01"`). Parsing these as a date failed to decode the whole response. Change `founded` to a string across all bindings so the provider value is preserved as sent: `String` in Rust, `string` in Go, and `str` in Python. Callers must now compare or parse the string themselves instead of treating it as a date. Fixtures and parity tests are updated to cover the year, multi-year, and full-date forms. BREAKING CHANGE: IndexConstituent.founded is now String (Rust) / string (Go) / str (Python) holding the founding year(s) verbatim, e.g. "1994" or "1902/1985"; it was a Date. Compare or parse the string instead of a date. close #378
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.
The
foundedmember onIndexConstituentwas decoded as a date, but theprovider sends founding years in forms that are not dates: a single year
(
"1994"), several years joined by/("1902/1985"), and only sometimesa full date (
"1982-12-01"). Parsing these as a date failed to decodethe whole response.
Change
foundedto a string across all bindings so the provider value ispreserved as sent:
Stringin Rust,stringin Go, andstrin Python.Callers must now compare or parse the string themselves instead of
treating it as a date. Fixtures and parity tests are updated to cover the
year, multi-year, and full-date forms.
BREAKING CHANGE: IndexConstituent.founded is now String (Rust) / string
(Go) / str (Python) holding the founding year(s) verbatim, e.g. "1994" or
"1902/1985"; it was a Date. Compare or parse the string instead of a date.
close #378