Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deserialization errors #106

Open
chrisboyce opened this issue Apr 12, 2022 · 2 comments
Open

Deserialization errors #106

chrisboyce opened this issue Apr 12, 2022 · 2 comments

Comments

@chrisboyce
Copy link

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.

@ThouCheese
Copy link
Owner

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.

@mattwowza
Copy link

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.

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

No branches or pull requests

3 participants