ReadonlykindDiscriminator identifying this as a resource shape.
Inheritance — cannot be overridden.
ReadonlymodelPrototype value for runtime model assembly.
Provides an immutable retrieval template matching this shape. When a shape extends parent shapes, inherited entries are merged into the template; local definitions override inherited ones. Entries whose cardinality admits absence are carried as optional keys, so a matching literal spells out only the entries it supplies. The runtime state type may be recovered via Instance.
Inheritance — computed from entries, not user-defined.
Optional ReadonlyvalidatorsCustom resource validators.
When specified, all validators are applied during validation. Must be non-empty. Each validator reports
violations as a Trace, returning undefined if the resource passes.
Inheritance — parent and child validators are merged; all apply.
ReadonlyentriesThe entries constraining the resource.
Each entry constrains one field of the JSON-LD node object the shape describes: its @id (an Id), its
@type (a Type), or a data or object Property keyed by a predicate IRI. At most one Id
and one Type entry are allowed, counted after inheritance merging: declarations sharing a property name
collapse into a single entry, so a marker reaching the shape through several parents or redeclared by the shape
counts once, while markers of the same kind under distinct names are rejected.
Inheritance — parent and child entries are merged; clashing keys are merged per property rules.
Optional ReadonlyvirtualMarks the resource as dynamically generated.
When true, indicates the resource is at least partially computed rather than stored.
Inheritance — inherited from parent; conflicting parents without child override are reported as an error.
Optional ReadonlynameHuman-readable name for the shape.
Inheritance — always from child; not inherited.
Optional ReadonlydescriptionHuman-readable description of the shape.
Inheritance — always from child; not inherited.
Optional ReadonlynamespaceDefault namespace for converting property names to IRIs.
Property names without explicit IRI mappings are resolved relative to this namespace.
Inheritance — inherited from parent; conflicting parents without child override are reported as an error.
Optional ReadonlyextendsParent shape(s) this shape inherits from.
Inherited entries and constraints are merged into the derived shape. When a child overrides an inherited property, constraints are enforced conjunctively: values must satisfy both the child's and all inherited constraints. This ensures overrides can only restrict, never relax, inherited definitions.
When inheriting from multiple shapes with different namespace values, an overriding namespace must be declared in this shape.
Inheritance — structural; outside inheritance scope.
Optional ReadonlyclassTarget class for resource instances.
The absolute IRI identifying the primary class that resource instances must belong to. Shape-specific and not
inherited. If defined, this value is exposed through the property mapped to @type using type.
Inheritance — shape-specific target class; outside inheritance scope.
Optional ReadonlyclassesAncillary class constraints for resource instances.
Additional class IRIs that resource instances must conform to. Empty arrays are ignored.
Inheritance — union of parent class and child/parent classes.
Optional ReadonlypatternIRI path pattern that resource identifiers must match.
Patterns are IRI-like templates using {name} placeholders for single path segments and /* for trailing
wildcards. Patterns may be absolute or root-relative; root-relative patterns match absolute IRIs, ignoring the
origin.
Inheritance — only the trailing /* wildcard admits narrowing: a child may replace /* with more specific
segments (for example, /products/* to /products/{id}/reviews/{rid}), provided the fixed prefix matches.
All other cases require exact equality; a mismatch is reported as an error.
Optional ReadonlyinAllowed resource identifiers (closed enumeration).
When specified, resource identifiers must be members of this list. IRIs must be absolute. Empty arrays are ignored.
Inheritance — intersection of parent and child sets; empty result is reported as an error.
Optional ReadonlyhasRequired resource identifiers that must be present.
When specified, all listed resource identifiers must appear. IRIs must be absolute. Empty arrays are ignored.
Inheritance — union of parent and child required values; child must require all parent values.
Shape definition for linked data resources.
Validates linked data resources with structural constraints including inheritance, property definitions, and SHACL-aligned validation rules. Resource shapes define the expected structure of linked data resources and support type inference for property values.
Resource shapes are closed: validated resources may only contain entries explicitly defined in the shape. Any additional entries will cause validation to fail.
Inheritance
When a resource shape extends a parent via extends, fields are merged according to the following rules. The child is the extending shape; the parent is the inherited shape.
kindmodelvirtualnamedescriptionnamespaceextendsclassclassesclassand child/parentclassespattern/*wildcard with more specific segmentsinhasValuevalidatorsentrieskindmismatch is reported as an errorCross-Field Validation
hasValueentries must be members of the mergedinset (if defined)forwardpredicate IRIs must be unique across all entriesreversepredicate IRIs must be unique across all entriesforwardandreverseare independent sets: the same IRI may appear in bothSee