Creates a resource shape from property definitions.
Accepts Member values including full Property definitions, naked SetShape values for the concise syntax, and Id/Type markers. Property IRIs are resolved against defaultNamespace; use the constraints overload to declare a different default namespace or to inherit from parent shapes.
name: required(string()) is equivalent to name: property(required(string())).
The entries record type
The property definitions, mapping property names to entries
An immutable resource shape with the specified entries
Creates a resource shape from constraints and property definitions.
Accepts Member values including full Property definitions, naked
SetShape values for the concise syntax, and Id/Type markers. The
constraints argument may declare a custom namespace, target classes, identifier patterns,
resource-level validators, or parent shapes via extends.
When constraints includes extends, parent shapes are recursively flattened and merged
into the returned shape. Consumers can work with the result directly without traversing the
inheritance chain. The extends field is retained for reference, but all inherited
constraints are already resolved.
This function is idempotent: the returned shape is branded and won't be re-flattened if used as a parent in another shape.
The constraints type, used to infer the inherited model
The entries record type
The composed model type, combining local entries with inherited entries
An immutable resource shape with inherited constraints and entries flattened and merged
Creates resource shapes.