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

update policy serialization #178

Merged
merged 1 commit into from
Jul 9, 2024
Merged

update policy serialization #178

merged 1 commit into from
Jul 9, 2024

Conversation

khieta
Copy link
Contributor

@khieta khieta commented Jul 9, 2024

Issue #, if available:

Description of changes:

cedar#1041 uncovered a bug in #173 😱 ValidationRequest objects were being serialized as { "schema":..., "policies": ..., "policySet": ...} where the policies and policySet values were identical. This PR gets rid of the unwanted policySet field.

Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this fixes anything, but I'll trust you on it

@khieta
Copy link
Contributor Author

khieta commented Jul 9, 2024

I don't understand how this fixes anything

Also mysterious to me. But it appears that Jackson was getting two different names from the getter (getPolicySet) and the class field (policies). And instead of warning or failing to build, it decided that we must want both fields.

@khieta khieta merged commit 34a974e into main Jul 9, 2024
4 checks passed
@khieta khieta deleted the khieta/update-json branch July 9, 2024 19:56
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.

3 participants