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: Enhance nested JSON comparison in Contains function #33

Merged

Conversation

arielsepton
Copy link
Member

Description

This PR addresses an issue where the provider's Contains function did not properly handle nested JSON structures. The updated logic ensures that nested maps within the PUT body are correctly compared with those in the GET response.

Changes

  • Enhanced the Contains function to handle nested maps recursively.

Testing

  • Verified the changes with test cases involving nested JSON structures.
  • Ensured that the modified Contains function correctly identifies if the PUT body is contained within the GET response.

Impact

  • This change improves the accuracy of state comparison for resources with nested JSON structures.
  • The provider now more reliably maintains the desired state by accurately tracking resource modifications.

Notes

  • Future considerations may include making this comparison behavior more configurable based on user feedback.

Closes #27

- Modified Contains function to properly handle nested JSON structures.

Signed-off-by: Ariel Septon <[email protected]>
@arielsepton arielsepton merged commit 6fe8f77 into crossplane-contrib:main Jul 1, 2024
7 checks passed
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.

Nested JSON in PUT body
1 participant