Expand description
$patch application — add / remove / replace over the $ref base (SPEC
§5). There are no $after/$before/$merge/$change/$remove directives;
$patch is the only overlay.
CRUDUI normalization (the analysis patch_ops): $patch is an OBJECT of operations.
Two order-preserving input shapes are supported:
-
Deep-path set —
"field.validate.required": ".other". The dotted key is split into path segments and the value is SET at that node (creating intermediate objects). SPEC §5 canonical form. The value replaces a scalar leaf; for object values it deep-merges (both objects → deep merge, else the latter wins). -
Structured ops — explicit
add/remove/replacekeys:- add:
{ "path.to.new": value, … }— deep-merge value at path - replace:
{ "path.to.key": value, … }— same merge rule (scalar override) - remove:
[ "path.to.key", … ] | { … }— deep delete
- add:
Resolution order: base ($ref) first, then $patch overlays. add/replace
deep-merge; remove deep-deletes; deep-path set splits then applies. An
unresolved patch (op shape error, path conflict, strict-remove miss) is a
LOAD ERROR — never valid:true.
Functions§
- apply_
patch - Apply a
$patchvalue to the (already$ref-expanded) base spec.