cedar-policy / cedar

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

Add support for annotations without explicit value #1231

Closed john-h-kastner-aws closed 1 month ago

john-h-kastner-aws commented 2 months ago

Description of changes

Adds support for annotations like @foo as sugar for @foo("").

Will require a small DRT update to account for the change in data structures. Will also require a small change to the docs to note that this syntax is also allowed.

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):

I confirm that docs.cedarpolicy.com (choose one, and delete the other options):

john-h-kastner-aws commented 1 month ago

Though I'd like to propose a new terminology. Can we call what's after @ the annotation name and what's inside () the annotation argument.

I don't particularly want to pull a change in terminology into this PR.