Skip to content

Commit a54aeb8

Browse files
committed
Continue /cart/authorize route doc
1 parent 46a9062 commit a54aeb8

File tree

5 files changed

+821
-9
lines changed

5 files changed

+821
-9
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Token": {
3+
"_media-type": "application\/vnd.ibexa.api.Token+json",
4+
"value": "DLDDLD.LLLLLDLLLLDLLLLLDLLLLLLLDLLDLLLD_D_LLDDLLLL._LLLDLL-LLLLLLLLLLDLLDLLLLLLLDLLLLLLLLL-LLLLLLLLLLLLLLLDLL"
5+
}
6+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"CartView": {
3+
"_media-type": "application\/vnd.ibexa.api.CartView+json",
4+
"identifier": "loadUserCarts",
5+
"Result": {
6+
"_media-type": "application\/vnd.ibexa.api.ViewResult+json",
7+
"count": 1,
8+
"CartList": {
9+
"_media-type": "application\/vnd.ibexa.api.CartList+json",
10+
"Cart": [
11+
{
12+
"_media-type": "application\/vnd.ibexa.api.Cart+json",
13+
"id": 1,
14+
"identifier": "289ab191-c6ea-45af-9adb-a5060d997361",
15+
"name": "Default",
16+
"createdAt": "2024-09-25T14:44:07+00:00",
17+
"updatedAt": "2024-09-25T14:44:07+00:00",
18+
"owner": {
19+
"_media-type": "application\/vnd.ibexa.api.User+json",
20+
"_href": "\/api\/ibexa\/v2\/user\/users\/10"
21+
},
22+
"Currency": {
23+
"_media-type": "application\/vnd.ibexa.api.Currency+json",
24+
"id": 2,
25+
"code": "EUR",
26+
"subunits": 2,
27+
"enabled": true
28+
},
29+
"entries": [],
30+
"context": {
31+
"foo": "bar"
32+
}
33+
}
34+
]
35+
}
36+
}
37+
}
38+
}

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ post:
5858
type: CartView
5959
application/vnd.ibexa.api.CartView+json:
6060
type: CartViewWrapper
61+
example: !include examples/cart/view/CartView.json.example
6162
/{identifier}:
6263
get:
6364
displayName: Get Cart
@@ -185,4 +186,17 @@ post:
185186
/authorize:
186187
post:
187188
displayName: Cart Authorization
188-
description: Return the CSRF token needed by anonymous users to manipulate their Cart
189+
description: Returns the CSRF token required by anonymous user to interact with own cart.
190+
headers:
191+
Accept:
192+
example: |
193+
application/vnd.ibexa.api.Token+xml
194+
application/vnd.ibexa.api.Token+json
195+
responses:
196+
200:
197+
body:
198+
application/vnd.ibexa.api.Token+xml:
199+
type: Token
200+
application/vnd.ibexa.api.CartConstraintViolationList+json:
201+
type: Token
202+
example: !include examples/cart/authorize/Token.json.example

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3593,7 +3593,7 @@ CartListViewResult:
35933593
type: object
35943594
properties:
35953595
count: integer
3596-
Result: CartList
3596+
CartList: CartList
35973597

35983598
CartList:
35993599
description: 'This class represents a cart list.'
@@ -3637,6 +3637,12 @@ CartConstraintViolation:
36373637
propertyPath: string
36383638
message: string
36393639

3640+
Token:
3641+
description: 'This class represents a CSRF token'
3642+
type: object
3643+
properties:
3644+
value: string
3645+
36403646
CatalogWrapper:
36413647
description: 'JSON object with only a Catalog property.'
36423648
type: object

0 commit comments

Comments
 (0)