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

fix(storage iam policies): Make description field optional in Condition struct #307

Merged

Conversation

nhudson
Copy link
Contributor

@nhudson nhudson commented Sep 8, 2024

When requesting IAM policies with conditions (options_requested_policy_version version 3) using the get_iam_policy function, a de-serialization error occurs if the condition doesn't include a description. This is because the description field in the Condition struct is currently defined as a required String.

This PR modifies the Condition struct to make the description field optional by changing its type to Option<String> and adding the #[serde(default)] attribute. This allows the struct to be correctly de-serialized even when the description is missing from the API response.

@nhudson nhudson changed the title fix(iam): Make description field optional in Condition struct fix(storage iam): Make description field optional in Condition struct Sep 8, 2024
@nhudson nhudson changed the title fix(storage iam): Make description field optional in Condition struct fix(storage iam policies): Make description field optional in Condition struct Sep 8, 2024
@yoshidan yoshidan added the safe to test safe to test label Sep 9, 2024
@yoshidan yoshidan merged commit d85716b into yoshidan:main Sep 9, 2024
9 checks passed
@yoshidan
Copy link
Owner

yoshidan commented Sep 9, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test safe to test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants