cloud-storage-rs
cloud-storage-rs copied to clipboard
Deserialization errors
It appears that the serde
attributes for at least some of the structs don't match what GCP is actually returning. For instance, a bucket has a StorageClass of "ARCHIVE" which is not in the StorageClass enum. I'm happy to add missing items as a PR, but is there a canonical source for the schema (specifically with regards to whether and item is an Option
)? I haven't been able to find one, but I'm reluctant to start making a bunch of fields optional, such as the cors
field.
No I haven't been able to find a truly comprehensive source that explains which fields are required and which are not, so the current implementation is on a best-effort basis. If this is causing bugs for you in practice then please do submit a PR that fixes the errors that you run into, I'd be happy to accept it.
It seems google has removed the field "timeDeleted" from the response so the response fails to deserialize into an "Object". The solution to this general problem is to not make any fields required and allow unknown fields to not fail either.