Skip to content

Commit 33e2b70

Browse files
committed
uncomment copy, pusblish, swap, move custom verbs
1 parent d6bb69f commit 33e2b70

File tree

7 files changed

+196
-196
lines changed

7 files changed

+196
-196
lines changed

docs/api/rest_api/rest_api_reference/input/ibexa-commerce.raml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,22 @@ displayName: eCommerce API (removed)
3737
example: !include examples/commerce/basket/Basket.json.example
3838

3939
/{basketId}:
40-
# copy:
41-
# displayName: Copy basket to user session (removed)
42-
# description: |-
43-
# Adds basket lines into current basket in user session, if any, using basket stored in permanent storage.
44-
# Removed as of Ibexa DXP 4.4.
45-
# responses:
46-
# 200:
47-
# body:
48-
# application/vnd.ibexa.api.Basket+json:
49-
# type: BasketWrapper
50-
# example: !include examples/commerce/basket/Basket.json.example
51-
# 400:
52-
# body:
53-
# application/vnd.ibexa.api.ValidationResponse+json:
54-
# type: ValidationResponseWrapper
55-
# example: !include examples/commerce/basket/current/copyfrom/_basket_id_/POST/ValidationResponse.json.example
40+
copy:
41+
displayName: Copy basket to user session (removed)
42+
description: |-
43+
Adds basket lines into current basket in user session, if any, using basket stored in permanent storage.
44+
Removed as of Ibexa DXP 4.4.
45+
responses:
46+
200:
47+
body:
48+
application/vnd.ibexa.api.Basket+json:
49+
type: BasketWrapper
50+
example: !include examples/commerce/basket/Basket.json.example
51+
400:
52+
body:
53+
application/vnd.ibexa.api.ValidationResponse+json:
54+
type: ValidationResponseWrapper
55+
example: !include examples/commerce/basket/current/copyfrom/_basket_id_/POST/ValidationResponse.json.example
5656

5757
/referencenumber:
5858
patch:

docs/api/rest_api/rest_api_reference/input/ibexa-content-locations.raml

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -51,34 +51,34 @@ get:
5151
description: Error - the user is not authorized to read this Location.
5252
404:
5353
description: Error - the Location with the given path does not exist.
54-
# move:
55-
# displayName: Move subtree
56-
# description: Moves Location to a different parent. The destination can also be '/content/trash' where the Location is put into the trash. (NOTE - Be aware that the user might lose access to the item after it has been moved, for example when read access is limited by a subtree). MOVE or POST with header X-HTTP-Method-Override MOVE.
57-
# headers:
58-
# Destination:
59-
# description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
60-
# responses:
61-
# 201:
62-
# description: Created. If destination is '/api/ibexa/v2/content/trash' and content only has one Location (NOTE - Like on normal subtree moves, be aware that the user might lose access to the item after it has been moved to Trash.)
63-
# 204:
64-
# description: No Content. If destination is '/api/ibexa/v2/content/trash' and content still has other Locations (no trash item is created).
65-
# 401:
66-
# description: Error - the user is not authorized to move this Location.
67-
# 404:
68-
# description: Error - the Location with the given ID does not exist.
69-
# copy:
70-
# displayName: Copy subtree
71-
# description: Copies the subtree to a different parent. COPY or POST with header X-HTTP-Method-Override COPY.
72-
# headers:
73-
# Destination:
74-
# description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
75-
# responses:
76-
# 201:
77-
# description: Created. Copied the subtree to a different parent.
78-
# 401:
79-
# description: Error - the user is not authorized to move this Location.
80-
# 404:
81-
# description: Error - the Location with the given ID does not exist.
54+
move:
55+
displayName: Move subtree
56+
description: Moves Location to a different parent. The destination can also be '/content/trash' where the Location is put into the trash. (NOTE - Be aware that the user might lose access to the item after it has been moved, for example when read access is limited by a subtree). MOVE or POST with header X-HTTP-Method-Override MOVE.
57+
headers:
58+
Destination:
59+
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
60+
responses:
61+
201:
62+
description: Created. If destination is '/api/ibexa/v2/content/trash' and content only has one Location (NOTE - Like on normal subtree moves, be aware that the user might lose access to the item after it has been moved to Trash.)
63+
204:
64+
description: No Content. If destination is '/api/ibexa/v2/content/trash' and content still has other Locations (no trash item is created).
65+
401:
66+
description: Error - the user is not authorized to move this Location.
67+
404:
68+
description: Error - the Location with the given ID does not exist.
69+
copy:
70+
displayName: Copy subtree
71+
description: Copies the subtree to a different parent. COPY or POST with header X-HTTP-Method-Override COPY.
72+
headers:
73+
Destination:
74+
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
75+
responses:
76+
201:
77+
description: Created. Copied the subtree to a different parent.
78+
401:
79+
description: Error - the user is not authorized to move this Location.
80+
404:
81+
description: Error - the Location with the given ID does not exist.
8282
delete:
8383
displayName: Delete subtree
8484
description: Deletes the complete subtree for the given path. Every content item which does not have any other Location is deleted. Otherwise the deleted Location is removed from the content item. The children are recursively deleted.
@@ -125,19 +125,19 @@ get:
125125
description: Error - the user is not authorized to update this Location.
126126
404:
127127
description: Error - the Location with the given ID does not exist.
128-
# swap:
129-
# displayName: Swap Location
130-
# description: Swaps the Location of a content item with the given Location of another content item. SWAP or POST with header X-HTTP-Method-Override SWAP.
131-
# headers:
132-
# Destination:
133-
# description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
134-
# responses:
135-
# 204:
136-
# description: No Content. Swapped the Location of a content item with the given Location of another content item.
137-
# 401:
138-
# description: Error - the user is not authorized to swap this Location.
139-
# 404:
140-
# description: Error - the Location with the given ID does not exist.
128+
swap:
129+
displayName: Swap Location
130+
description: Swaps the Location of a content item with the given Location of another content item. SWAP or POST with header X-HTTP-Method-Override SWAP.
131+
headers:
132+
Destination:
133+
description: A parent Location resource to which the Location is moved e.g. '/api/ibexa/v2/content/locations/1/63'.
134+
responses:
135+
204:
136+
description: No Content. Swapped the Location of a content item with the given Location of another content item.
137+
401:
138+
description: Error - the user is not authorized to swap this Location.
139+
404:
140+
description: Error - the Location with the given ID does not exist.
141141
/children:
142142
get:
143143
displayName: Get child Locations.

docs/api/rest_api/rest_api_reference/input/ibexa-content-objects.raml

Lines changed: 73 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -138,19 +138,19 @@ get:
138138
description: Error - content item was not found.
139139
401:
140140
description: Error - the user is not authorized to delete this content item.
141-
# copy:
142-
# displayName: Copy content
143-
# description: Creates new content item as a copy, under the given parent Location given in the destination header. COPY or POST with header X-HTTP-Method-Override COPY.
144-
# headers:
145-
# destination:
146-
# description: A Location resource to which the content item should be copied.
147-
# responses:
148-
# 201:
149-
# description: Copy created.
150-
# 401:
151-
# description: Error - the user is not authorized to copy this content item to the given Location.
152-
# 404:
153-
# description: Error - the source or destination resource does not exist.
141+
copy:
142+
displayName: Copy content
143+
description: Creates new content item as a copy, under the given parent Location given in the destination header. COPY or POST with header X-HTTP-Method-Override COPY.
144+
headers:
145+
destination:
146+
description: A Location resource to which the content item should be copied.
147+
responses:
148+
201:
149+
description: Copy created.
150+
401:
151+
description: Error - the user is not authorized to copy this content item to the given Location.
152+
404:
153+
description: Error - the source or destination resource does not exist.
154154
/translations/{languageCode}:
155155
delete:
156156
displayName: Delete translation (permanently)
@@ -183,31 +183,31 @@ get:
183183
description: Temporary redirect.
184184
404:
185185
description: Error - the resource does not exist.
186-
# copy:
187-
# displayName: Create a draft from current version
188-
# description: The system creates a new draft as a copy of the current version. COPY or POST with header X-HTTP-Method-Override COPY.
189-
# headers:
190-
# Accept:
191-
# description: If set, the updated version is returned in XML or JSON format.
192-
# example: |
193-
# application/vnd.ibexa.api.Version+xml
194-
# application/vnd.ibexa.api.Version+json
195-
# responses:
196-
# 201:
197-
# description: Created
198-
# body:
199-
# application/vnd.ibexa.api.Version+xml:
200-
# type: Version
201-
# example: !include examples/content/objects/content_id/currentversion/COPY/Version.xml.example
202-
# application/vnd.ibexa.api.Version+json:
203-
# type: VersionWrapper
204-
# example: !include examples/content/objects/content_id/currentversion/COPY/Version.json.example
205-
# 401:
206-
# description: Error - the user is not authorized to update this content item.
207-
# 403:
208-
# description: Error - the current version is already a draft.
209-
# 404:
210-
# description: Error - the content item was not found.
186+
copy:
187+
displayName: Create a draft from current version
188+
description: The system creates a new draft as a copy of the current version. COPY or POST with header X-HTTP-Method-Override COPY.
189+
headers:
190+
Accept:
191+
description: If set, the updated version is returned in XML or JSON format.
192+
example: |
193+
application/vnd.ibexa.api.Version+xml
194+
application/vnd.ibexa.api.Version+json
195+
responses:
196+
201:
197+
description: Created
198+
body:
199+
application/vnd.ibexa.api.Version+xml:
200+
type: Version
201+
example: !include examples/content/objects/content_id/currentversion/COPY/Version.xml.example
202+
application/vnd.ibexa.api.Version+json:
203+
type: VersionWrapper
204+
example: !include examples/content/objects/content_id/currentversion/COPY/Version.json.example
205+
401:
206+
description: Error - the user is not authorized to update this content item.
207+
403:
208+
description: Error - the current version is already a draft.
209+
404:
210+
description: Error - the content item was not found.
211211
/versions:
212212
get:
213213
displayName: List versions
@@ -311,29 +311,29 @@ get:
311311
description: Error - the content ID or version ID does not exist.
312312
412:
313313
description: Error - the current ETag does not match with the one provided in the If-Match header.
314-
# copy:
315-
# displayName: Create a draft from a version
316-
# description: The system creates a new draft as a copy of the given version. COPY or POST with header X-HTTP-Method-Override COPY.
317-
# headers:
318-
# Accept:
319-
# description: If set, the updated version is returned in XML or JSON format.
320-
# example: |
321-
# application/vnd.ibexa.api.Version+xml
322-
# application/vnd.ibexa.api.Version+json
323-
# responses:
324-
# 201:
325-
# description: Created.
326-
# body:
327-
# application/vnd.ibexa.api.Version+xml:
328-
# type: Version
329-
# example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example
330-
# application/vnd.ibexa.api.Version+json:
331-
# type: VersionWrapper
332-
# example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.json.example
333-
# 401:
334-
# description: Error - the user is not authorized to update this content item.
335-
# 404:
336-
# description: Error - the content item was not found.
314+
copy:
315+
displayName: Create a draft from a version
316+
description: The system creates a new draft as a copy of the given version. COPY or POST with header X-HTTP-Method-Override COPY.
317+
headers:
318+
Accept:
319+
description: If set, the updated version is returned in XML or JSON format.
320+
example: |
321+
application/vnd.ibexa.api.Version+xml
322+
application/vnd.ibexa.api.Version+json
323+
responses:
324+
201:
325+
description: Created.
326+
body:
327+
application/vnd.ibexa.api.Version+xml:
328+
type: Version
329+
example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example
330+
application/vnd.ibexa.api.Version+json:
331+
type: VersionWrapper
332+
example: !include examples/content/objects/content_id/versions/version_no/COPY/Version.json.example
333+
401:
334+
description: Error - the user is not authorized to update this content item.
335+
404:
336+
description: Error - the content item was not found.
337337
delete:
338338
displayName: Delete content version
339339
description: Deletes the content version.
@@ -346,18 +346,18 @@ get:
346346
description: Error - the user is not authorized to delete this version.
347347
403:
348348
description: Error - the version is in published state.
349-
# publish:
350-
# displayName: Publish a content version
351-
# description: Publishes the content version. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH
352-
# responses:
353-
# 204:
354-
# description: No Content - the content version is published.
355-
# 401:
356-
# description: Error - the user is not authorized to publish this version.
357-
# 403:
358-
# description: Error - the version is not a draft.
359-
# 404:
360-
# description: Error - the content item or version were not found.
349+
publish:
350+
displayName: Publish a content version
351+
description: Publishes the content version. PUBLISH or POST with header X-HTTP-Method-Override PUBLISH
352+
responses:
353+
204:
354+
description: No Content - the content version is published.
355+
401:
356+
description: Error - the user is not authorized to publish this version.
357+
403:
358+
description: Error - the version is not a draft.
359+
404:
360+
description: Error - the content item or version were not found.
361361
/translations/{languageCode}:
362362
delete:
363363
displayName: Delete translation from version draft

docs/api/rest_api/rest_api_reference/input/ibexa-content-trash.raml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,21 +55,21 @@ delete:
5555
description: Error - The user has no permission to read the item in Trash.
5656
404:
5757
description: Error - An item in Trash with the provided ID does not exist.
58-
# move:
59-
# displayName: Untrash content item
60-
# description: Restores an item from Trash. MOVE or POST with header X-HTTP-Method-Override MOVE.
61-
# headers:
62-
# Destination:
63-
# description: If the destination Location URI is provided, the item from Trash is restored under this Location, otherwise it is restored under its original parent Location.
64-
# responses:
65-
# 201:
66-
# description: Item restored.
67-
# 401:
68-
# description: Error - The user is not authorized to restore this item from Trash.
69-
# 403:
70-
# description: Error - The provided parent Location does not exist.
71-
# 404:
72-
# description: Error - The provided item does not exist in Trash.
58+
move:
59+
displayName: Untrash content item
60+
description: Restores an item from Trash. MOVE or POST with header X-HTTP-Method-Override MOVE.
61+
headers:
62+
Destination:
63+
description: If the destination Location URI is provided, the item from Trash is restored under this Location, otherwise it is restored under its original parent Location.
64+
responses:
65+
201:
66+
description: Item restored.
67+
401:
68+
description: Error - The user is not authorized to restore this item from Trash.
69+
403:
70+
description: Error - The provided parent Location does not exist.
71+
404:
72+
description: Error - The provided item does not exist in Trash.
7373
delete:
7474
displayName: Delete Trash item
7575
description: Deletes the provided item from Trash.

0 commit comments

Comments
 (0)