-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Strengthen the specification of CopyAction (#370)
- Loading branch information
1 parent
80ec2a4
commit 9dfb163
Showing
3 changed files
with
20 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,7 +224,7 @@ | |
"$IsBound": true, | ||
"@Common.Experimental": true, | ||
"@Core.Description": "Template for actions that copy a node and its descendants and are named in [`RecursiveHierarchyActions/CopyAction`](#RecursiveHierarchyActionsType)", | ||
"@Core.LongDescription": "To give the copied sub-hierarchy a parent, the action invocation can be followed\nby a PATCH that binds the parent navigation property (for example, `Superordinate` in the following JSON batch request).\n```json\n{\"requests\": [{\n \"id\": \"1\",\n \"method\": \"post\",\n \"url\": \"HierarchyDirectory(1)/Nodes('A')/CopyAction\"\n}, {\n \"id\": \"2\",\n \"dependsOn\": [\"1\"],\n \"method\": \"patch\",\n \"url\": \"$1\",\n \"body\": {\n \"[email protected]\": \"Nodes('B')\"\n }\n}]}\n```", | ||
"@Core.LongDescription": "The action copies a node A and its descendants and the parent navigation properties between them\nso that the copied nodes form a sub-hierarchy. It returns the copy of A. No assumption is made about the parent of the copy of A.\n\nTo specify the parent of the copy of A, the action invocation MUST be followed\nby a PATCH that binds its parent navigation property (for example, `Superordinate` in the following JSON batch request)\nto the desired parent B or to `null`.\n```json\n{\"requests\": [{\n \"id\": \"1\",\n \"method\": \"post\",\n \"url\": \"HierarchyDirectory(1)/Nodes('A')/CopyAction\"\n}, {\n \"id\": \"2\",\n \"dependsOn\": [\"1\"],\n \"method\": \"patch\",\n \"url\": \"$1\",\n \"body\": {\n \"[email protected]\": \"Nodes('B')\"\n }\n}]}\n```\nIf a certain position of the copy of A among its new siblings is desired, an additional invocation of\n[`ChangeNextSiblingAction`](#Template_ChangeNextSiblingAction) can be included in the batch request.", | ||
"$Parameter": [{ "$Name": "Node", "$Type": "Edm.EntityType", "@Core.Description": "The node to be copied" }], | ||
"$ReturnType": { "$Type": "Edm.EntityType", "@Core.Description": "The copied node" } | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -338,8 +338,12 @@ and [`RecursiveHierarchy/MatchedDescendantCount`](#RecursiveHierarchyType) are a | |
<Annotation Term="Common.Experimental" /> | ||
<Annotation Term="Core.Description" String="Template for actions that copy a node and its descendants and are named in [`RecursiveHierarchyActions/CopyAction`](#RecursiveHierarchyActionsType)" /> | ||
<Annotation Term="Core.LongDescription"> | ||
<String>To give the copied sub-hierarchy a parent, the action invocation can be followed | ||
by a PATCH that binds the parent navigation property (for example, `Superordinate` in the following JSON batch request). | ||
<String>The action copies a node A and its descendants and the parent navigation properties between them | ||
so that the copied nodes form a sub-hierarchy. It returns the copy of A. No assumption is made about the parent of the copy of A. | ||
|
||
To specify the parent of the copy of A, the action invocation MUST be followed | ||
by a PATCH that binds its parent navigation property (for example, `Superordinate` in the following JSON batch request) | ||
to the desired parent B or to `null`. | ||
```json | ||
{"requests": [{ | ||
"id": "1", | ||
|
@@ -354,7 +358,9 @@ by a PATCH that binds the parent navigation property (for example, `Superordinat | |
"[email protected]": "Nodes('B')" | ||
} | ||
}]} | ||
```</String> | ||
``` | ||
If a certain position of the copy of A among its new siblings is desired, an additional invocation of | ||
[`ChangeNextSiblingAction`](#Template_ChangeNextSiblingAction) can be included in the batch request.</String> | ||
</Annotation> | ||
<Parameter Name="Node" Type="Edm.EntityType" Nullable="false"> | ||
<Annotation Term="Core.Description" String="The node to be copied" /> | ||
|