-
Notifications
You must be signed in to change notification settings - Fork 72
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
Deny unknown fields in FFI. (#815) #1041
Conversation
Signed-off-by: Andrew Wells <anmwells@amazon.com>
Signed-off-by: Andrew Wells <anmwells@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll want to add #[serde(deny_unknown_fields)]
to several more types here (e.g., PartialAuthorizationCall
and TemplateLink
).
You might as well just add this annotation to every struct
defined in ffi/
. Some of these structs are expected to be output rather than input (e.g., Response
), but it doesn't hurt to error on unknown fields anyways.
Made the changes requested above (with @andrewmwells-amazon's permission) and merged with the new changes in #1014. Read for re-review! |
Fyi Edit: fix for Java in cedar-java#178 |
Description of changes
Deny unknown fields in FFI.
Issue #, if available
Resolves #815
Checklist for requesting a review
The change in this PR is (choose one, and delete the other options):
cedar-policy
(e.g., changes to the signature of an existing API).I confirm that this PR (choose one, and delete the other options):
I confirm that
cedar-spec
(choose one, and delete the other options):