Skip to content

Conversation

@vozhyk-
Copy link
Collaborator

@vozhyk- vozhyk- commented Nov 7, 2025

Currently, toBody() does not distinuish between list-of-maps attributes
being null and empty.
This results in the provider omitting the attribute from the API request
when the value is an empty list,
making it impossible for the user to clear a list of maps.

Handling of lists of primitive values like strings
does not have this issue -
attributes with an empty list value are included in the request
while ones with a null value are skipped.

Change the check to only omit list-of-maps attributes with null values.

TODO: Only appliance_security_malware was tested. Test most of the other resources.

TODO: Change organization_extensions_thousand_eyes_network customized code as well?

Fixes #128

Currently, toBody() does not distinuish between list-of-maps attributes
being null and empty.
This results in the provider omitting the attribute from the API request
when the value is an empty list,
making it impossible for the user to clear a list of maps.

Handling of lists of primitive values like strings
does not have this issue -
attributes with an empty list value are included in the request
while ones with a null value are skipped.

Change the check to only omit list-of-maps attributes with null values.
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

Successfully merging this pull request may close these issues.

unable to set empty attributes list | multiple resources

1 participant