cedar-policy / cedar

Implementation of the Cedar Policy Language
https://www.cedarpolicy.com
Apache License 2.0
892 stars 80 forks source link

implement schema-format parsers for RFC 68 #1136

Closed cdisselkoen closed 3 months ago

cdisselkoen commented 3 months ago

Description of changes

Implements the needed changes for RFC 68 in the parsers for both schema formats (Cedar schema format and JSON schema format). Includes tests that things parse properly and that invalid uses of embedded attribute maps correctly fail to parse. Does not include any changes to the validator/typechecker itself; those will come in a future PR. These parser changes are reasonably separable though, and this PR is large enough as-is.

With this PR, if anyone tries to use the new RFC 68 syntax, instead of an incomprehensible parser error, they will get a nice message saying that embedded attribute maps are not fully supported yet.

Issue #, if available

Part of #1104

Checklist for requesting a review

The change in this PR is (choose one, and delete the other options):

I confirm that this PR (choose one, and delete the other options):

I confirm that cedar-spec (choose one, and delete the other options):

shaobo-he-aws commented 3 months ago

There are merge conflicts. Could you resolve them?

cdisselkoen commented 3 months ago

Working on it

cdisselkoen commented 3 months ago

Merge conflicts fixed