Commit 16f208c
committed
Work around Go client OneOf unmarshaling bug for file_metadata
The Go client's OneOf unmarshaler for file_metadata fails because both CloudStorage and LocalFile types can match the JSON response (LocalFile has AdditionalProperties that accepts any extra fields). This causes the unmarshaler to set UnparsedObject instead of populating the typed fields.
Workaround:
- Manually parse UnparsedObject when it's set, checking for 'access_details' to distinguish CloudStorage from LocalFile
- Skip utils.CheckForUnparsed() for reference tables since file_metadata will always have UnparsedObject set
- Update data source to handle Values as interface{} (API spec change)
- Remove LocalFile.upload_id field (no longer in API)1 parent cd03d58 commit 16f208c
File tree
33 files changed
+501
-2460
lines changed- .generator
- V2
- src/generator
- datadog
- fwprovider
- tests
- cassettes
- docs/resources
33 files changed
+501
-2460
lines changedThis file was deleted.
This file was deleted.
0 commit comments