Module cedar_policy_validator::json_schema
source · Expand description
Structures defining the JSON syntax for Cedar schemas
Structs§
- Represents the
cedar_policy_core::ast::EntityUID
of an action - An
ActionType
describes a specific action entity. It also describes what principals/resources/contexts are valid for the action. - The apply spec specifies what principals and resources an action can be used with. This specification can either be done through containing to entity types. An empty list is interpreted as specifying that there are no principals or resources that an action applies to.
- Describes the type of an entity attribute. It contains the type of the attribute and whether the attribute is required. The type is flattened for serialization, so, in JSON format, this appears as a regular type with one extra property
required
. - Helper struct containing the contents of
EntityAttributes::EntityAttributes
. This doesn’t cover all possible legal JSON forms for entity attributes (useEntityAttributes
for that) – in particular this struct doesn’t accept a single common-type reference; it requires a record declaration. But, this struct does cover all legal JSON forms for entity attributes that aren’t accepted as legal JSON forms for record attributes. - Represents the full definition of an entity type in the schema. Entity types describe the relationships in the entity store, including what entities can be members of groups of what types, and what attributes can/should be included on entities of each type.
- A
Fragment
is split into multiple namespace definitions, and is just a map from namespace name to namespace definition (i.e., definitions of common types, entity types, and actions in that namespace). The namespace name is implicitly applied to all definitions in the corresponding [NamespaceDefinition
]. See [NamespaceDefinition
]. - Describes the type of a record attribute. It contains the type of the attribute and whether the attribute is required. The type is flattened for serialization, so, in JSON format, this appears as a regular type with one extra property
required
. - Declaration of record attributes, or of an action context. These share a JSON format.
- Represents the type-level information about a record type.
Enums§
- Describes the underlying type of an entity attribute (not including the required/optional flag).
- Declaration of entity attributes
- A restricted version of the
crate::types::Type
enum containing only the types which are exposed to users.