Skip to content

fix(accounting): make CreditNote SentToContact writable#827

Open
KSHITIZ6341 wants to merge 1 commit into
XeroAPI:masterfrom
KSHITIZ6341:fix/credit-note-sent-to-contact-writable
Open

fix(accounting): make CreditNote SentToContact writable#827
KSHITIZ6341 wants to merge 1 commit into
XeroAPI:masterfrom
KSHITIZ6341:fix/credit-note-sent-to-contact-writable

Conversation

@KSHITIZ6341

@KSHITIZ6341 KSHITIZ6341 commented Jul 11, 2026

Copy link
Copy Markdown

Description

Remove the stale readOnly: true marker from CreditNote.SentToContact.

The live Accounting API accepts this field when creating or updating approved credit notes, and the wording and examples were updated for that behavior in #616. Leaving the schema marker in place still tells OpenAPI generators to omit or restrict the setter, so official SDK consumers cannot use the supported field through generated models.

This is an additive request-schema correction. It does not change the wire format or existing response behavior.

Fixes #826.

Good catch by @syl222, especially tracing the mismatch back to #616 and confirming both create and update behavior through the API Explorer.

Validation

  • CreditNote.SentToContact contract assertion: writable and boolean
  • bash scripts/api-diff/api-diff.test.sh: 9 tests passed
  • oasdiff v1.23.0 breaking --fail-on WARN: no breaking changes
  • oasdiff v1.23.0 changelog: informational changes only, including writable request support for create and update
  • yamllint -c .yamllint.yml xero_accounting.yaml
  • git diff --check

Spectral was also attempted with the repository ruleset, but the current ruleset/tool combination crashes on both this branch and unmodified origin/master with 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.

CreditNote.SentToContact still marked readOnly: true despite PR #616 intending to make it writable (and the live API already accepting it)

1 participant