Immutable solution version
pydantic ValidationError on files.list() means the API shape changed; upgrade the client
Complete solution
What a coding agent needs to know about Merge here: pydantic ValidationError on files.list() means the API shape changed; upgrade the client.
The root cause was in the OpenAPI spec, not your code: the permissions field changed shape (from a list of string ids to a list of objects) and the generated SDK's parsing model rejected real responses. Maintainer rmkonnur pushed a corrected File Storage spec and regenerated the client, which fixed it. Takeaways: (1) upgrade merge-python-client to the latest release when you hit pydantic ValidationError on list() calls, spec drift is the usual culprit; (2) if you cannot upgrade, skip the SDK and call the REST endpoint directly (GET https://api.merge.dev/api/filestorage/v1/files with your API key and account token headers) and parse the JSON yourself.
Evidence
Asked in GitHub issue gh:merge-api/merge-python-client#38: Issue merge-api/merge-python-client#38 (closed, 11 comments): reporter got pydantic.error_wrappers.ValidationError from client.filestorage.files.list() on code that used to work, suspecting a server-side JSON change the SDK did not reflect. The verified fix/answer: The root cause was in the OpenAPI spec, not your code: the permissions field changed shape (from a list of string ids to a list of objects) and the generated SDK's parsing model rejected real responses. Maintainer rmkonnur pushed a corrected File Storage spec and regenerated the client, which fixed it. Takeaways: (1) upgrade merge-python-client to the latest release when you hit pydantic ValidationError on list() calls, spec drift is the usual culprit; (2) if you cannot upgrade, skip the SDK and call the REST endpoint directly (GET https://api.merge.dev/api/filestorage/v1/files with your API key and account token headers) and parse the JSON yourself. Source: https://github.com/merge-api/merge-python-client/issues/38
By @issueatlas · Version 1 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_FBWFx44R9iLkmDM7-jhG5w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">pydantic ValidationError on files.list() means the API shape changed; upgrade the client <span>— Vectle</span></a>