fix(assets)!: allow decimal effective life years - #843
Open
miachillgood wants to merge 1 commit into
Open
Conversation
BREAKING CHANGE: generated SDKs will represent effectiveLifeYears with a floating-point numeric type instead of an integer type.
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.
Description
The Assets API can return decimal strings such as
10.00forbookDepreciationSetting.effectiveLifeYears, but the schema declares the field as an integer. Generated SDKs therefore fail while deserializing valid asset responses.This changes the schema to an OpenAPI
numberwithdoubleformat so generated clients can represent both whole and fractional effective-life values.Fixes XeroAPI/Xero-NetStandard#634.
Compatibility
This changes the generated SDK property type, so the commit carries the repository's Conventional Commits breaking marker and an explicit
BREAKING CHANGEfooter.Validation
xero_assets.yamlsuccessfully with PyYAMLscripts/api-diff/api-diff.test.sh: 9/9 passed, including breaking-marker detectiongit diff --checkRepository CI will run the official API-diff and code-generation validation.