You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/overlay.md
+9-10Lines changed: 9 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ The main purpose of the Overlay Specification is to provide a way to repeatably
21
21
22
22
### Overlay
23
23
24
-
An Overlay is a JSON or YAML structure containing an ordered list of [Action Objects](#overlay-actions) that are to be applied to the target document. Each [Action Object](#action-object) has a `target` property and a modifier type (`update`or `remove`). The `target` property is a [[RFC9535|JSONPath]] query expression that identifies the elements of the target document to be updated and the modifier determines the change.
24
+
An Overlay is a JSON or YAML structure containing an ordered list of [Action Objects](#overlay-actions) that are to be applied to the target document. Each [Action Object](#action-object) has a `target` property and a modifier type (`update`, `remove`or `copy`). The `target` property is a [[RFC9535|JSONPath]] query expression that identifies the elements of the target document to be updated and the modifier determines the change.
25
25
26
26
## Specification
27
27
@@ -270,11 +270,11 @@ This approach allows inversion of control as to where the Overlay updates apply
270
270
271
271
#### Copy example
272
272
273
-
Copy actions behave similarly to update actions but source the node to from the document being transformed. Copy actions MAY be used in sequence with update or remove actions to perform more advanced transformations like moving or renaming nodes.
273
+
Copy actions behave similarly to `update` actions but source the node to from the document being transformed. Copy `actions` MAY be used in sequence with `update` or `remove` actions to perform more advanced transformations like moving or renaming nodes.
274
274
275
275
##### Simple copy
276
276
277
-
The following example demonstrates how the operations from the "items" path item are copied to the "some-items" path item.
277
+
This example shows how to copy all operations from the `items` path item to the `some-items` path item.
278
278
279
279
###### Source description
280
280
@@ -335,7 +335,7 @@ paths:
335
335
336
336
##### Ensure the target exists and copy
337
337
338
-
The following example demonstrates how the operations from the "items" path item are copied to the "other-items" path item, while ensuring the "other-items" path item exists first by using an update action.
338
+
This example shows how to copy all operations from the `items` path item to the `other-items` path item after first ensuring the target exists with an update action.
339
339
340
340
###### Source description
341
341
@@ -399,12 +399,11 @@ paths:
399
399
400
400
##### Move example
401
401
402
-
The following example demonstrates how the "items" path item is renamed as "new-items" through a combination of actions:
403
-
404
-
1. An update action to ensure the target exists.
405
-
1. A copy action to copy the source path item object to the target.
406
-
1. A remove action to remove the source path item.
402
+
This example shows how to rename the `items` path item to `new-items` using a sequence of overlay actions:
407
403
404
+
1. Use an `update` action to ensure the target path item exists.
405
+
2. Use a `copy` action to copy the source path item to the target.
406
+
3. Use a `remove` action to delete the original source path item.
408
407
409
408
###### Source description
410
409
@@ -440,7 +439,7 @@ actions:
440
439
copy: '$.paths["/items"]'
441
440
- target: '$.paths["/items"]'
442
441
remove: true
443
-
description: 'moves/rename the "items" path item to "new-items"'
442
+
description: 'moves (renames) the "items" path item to "new-items"'
0 commit comments