fix(assets): add asset description field#828
Draft
KSHITIZ6341 wants to merge 1 commit into
Draft
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.
Description
The Assets API documentation and detailed asset payloads include a
descriptionfield, but the shared OpenAPIAssetschema does not currently define it. Generated SDK types therefore cannot expose the value returned byGET /Assets/{id}or allow it in create and update payloads.This change adds
descriptionas an optional string property and documents its endpoint behavior. It also adds the field to the POST request and single-asset response examples while leaving collection examples unchanged because collection responses may omit it.This is backward compatible: it only adds an optional request and response property and does not change existing required fields.
Sharp eye, @orangethunder; the individual-asset reproduction made the schema omission clear.
Fixes #621
Validation
descriptionis an optional string and appears in the detailed examplesuvx yamllint -c .yamllint.yml xero_assets.yaml./scripts/api-diff/api-diff.test.shoasdiff breaking --fail-on WARN: no breaking changesoasdiff changelog: four informational optional-property additions, zero warnings or errorsoapi-codegen: generatedAssetgains only optionalDescription *stringwithjson:"description,omitempty"git diff --checkThe local Spectral run could not complete because its ruleset crashes on an existing null enum in both
masterand this branch (Cannot read properties of null (reading 'enum')).