Skip to content

fix(files): remove invalid FileObject requirements - #833

Draft
ryanduguid wants to merge 1 commit into
XeroAPI:masterfrom
ryanduguid:fix/files-file-object-required-fields
Draft

fix(files): remove invalid FileObject requirements#833
ryanduguid wants to merge 1 commit into
XeroAPI:masterfrom
ryanduguid:fix/files-file-object-required-fields

Conversation

@ryanduguid

@ryanduguid ryanduguid commented Aug 6, 2026

Copy link
Copy Markdown

Draft hold — domain decision required. Do not merge this change until the Files API owner confirms whether FileObject.Id and FileObject.Name are required response fields and whether the shared response/update schema should be split. Local schema validation cannot establish that contract.

Proposed change

  • remove four undefined, lower-case required fields from the Files FileObject schema
  • allow the documented partial PUT /Files/{FileId} request body (for example, { "FolderId": "..." })

FileObject is shared by file responses and the partial-update request body. Replacing the fields with Name/Id would still make valid partial updates invalid. Removing the list is mechanically consistent with the partial-update example, but may weaken the response contract; splitting request and response schemas may be the correct domain-owned solution.

Limited verification

  • parsed the OpenAPI YAML with PyYAML
  • validated the documented FolderId-only PUT example against the proposed FileObject with jsonschema
  • npx -y @redocly/cli lint xero_files.yaml --format stylish: removes the four FileObject no-required-schema-properties-undefined warnings; the file retains unrelated baseline lint findings

These checks establish schema mechanics only. They are not authoritative evidence for Files API field requiredness.

@ryanduguid
ryanduguid marked this pull request as draft August 12, 2026 17:49
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.

1 participant