merge: The configuration data identified by the element
containing this attribute is merged with the configuration
at the corresponding level in the configuration datastore
identified by the parameter. This is the default
behavior.
Excerpts from RFC 8040:
edit operation: a RESTCONF operation on a data resource using
either a POST, PUT, PATCH, or DELETE method. This is not the same
as the NETCONF edit operation (i.e., one of the values for the
"nc:operation" attribute: "create", "replace", "merge", "delete",
or "remove").
plain patch: a specific media type for use with the PATCH method;
see Section 4.6.1. It can be used for simple "merge" edit operations.
The PATCH method is equivalent to a "merge" edit operation when
using a plain patch (see Section 4.6.1); other media types may
provide more granular control.
Excerpts from RFC 8072:
The "merge", "replace", "create", "delete", and "remove" edit
operations have exactly the same meanings as those defined for the
"operation" attribute described in Section 7.2 of [RFC6241].
merge merge the edit value with the target data resource;
create if it does not already exist
NOTE: this last sample is the closest to a definition anywhere!
After some discussion, it seems that implementations commonly:
combine (not replace) leaf-lists and "bits"
attempt to collate ordered-by user [leaf-]lists
i.e., [A, C] + [B, C] = [A, B, C]
since both both 'A' and 'B' come before 'C' and since existing elements have precedence order incoming elements.
The "merge" operation is ill-defined.
From https://mailarchive.ietf.org/arch/msg/netconf/ea-jLmqdufvum-TzipioRV7shXA:
After some discussion, it seems that implementations commonly: