Skip to content

fix(assets): add asset description field#828

Draft
KSHITIZ6341 wants to merge 1 commit into
XeroAPI:masterfrom
KSHITIZ6341:fix/asset-description
Draft

fix(assets): add asset description field#828
KSHITIZ6341 wants to merge 1 commit into
XeroAPI:masterfrom
KSHITIZ6341:fix/asset-description

Conversation

@KSHITIZ6341

Copy link
Copy Markdown

Description

The Assets API documentation and detailed asset payloads include a description field, but the shared OpenAPI Asset schema does not currently define it. Generated SDK types therefore cannot expose the value returned by GET /Assets/{id} or allow it in create and update payloads.

This change adds description as 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

  • Parser-backed contract check confirming description is an optional string and appears in the detailed examples
  • uvx yamllint -c .yamllint.yml xero_assets.yaml
  • ./scripts/api-diff/api-diff.test.sh
  • oasdiff breaking --fail-on WARN: no breaking changes
  • oasdiff changelog: four informational optional-property additions, zero warnings or errors
  • oapi-codegen: generated Asset gains only optional Description *string with json:"description,omitempty"
  • git diff --check

The local Spectral run could not complete because its ruleset crashes on an existing null enum in both master and this branch (Cannot read properties of null (reading 'enum')).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing description field for assets

1 participant