forked from folio-org/mod-circulation-storage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckout-lock-storage.raml
98 lines (94 loc) · 2.67 KB
/
checkout-lock-storage.raml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#%RAML 1.0
title: Checkout Lock Storage
version: v1.0
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost:9130
documentation:
- title: Checkout Lock API
content: <b>Storage for checkout lock</b>
types:
checkout-lock: !include checkout-lock.json
checkout-locks: !include checkout-locks.json
checkout-lock-request: !include checkout-lock-request.json
errors: !include raml-util/schemas/errors.schema
traits:
validate: !include raml-util/traits/validation.raml
/check-out-lock-storage:
displayName: Checkout lock storage
get:
description: "Retrieve a list of checkout lock items"
queryParameters:
userId:
description: Filter locks by user ID.
type: string
offset:
description: The number of items to skip in the result set.
type: integer
limit:
description: The maximum number of locks to return.
type: integer
responses:
200:
description: "Returns a list of checkout lock items"
body:
application/json:
type: checkout-locks
422:
description: "Invalid Parameters"
body:
text/plain:
example: "Invalid Parameters"
post:
is: [validate]
description: "Create a lock for the given userid"
body:
application/json:
type: checkout-lock-request
example: !include examples/checkout-lock-request.json
responses:
201:
description: "Checkout lock is created"
body:
application/json:
type: checkout-lock
example: !include examples/checkout-lock.json
400:
description: "Bad Request"
body:
text/plain:
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
503:
description: "Failed to create lock for patron {userId}"
body:
text/plain:
example: "Failed to create lock for patron "
/{lockId}:
get:
description: "Get checkout lock"
responses:
200:
description: "Returns item with a given ID"
body:
application/json:
type: checkout-lock
example: !include examples/checkout-lock.json
400:
description: "Bad Request"
body:
text/plain:
404:
description: "Item with a given ID not found"
delete:
description: "Delete checkout lock"
responses:
204:
description: "Item deleted successfully"
500:
description: "Internal Server error"
body:
text/plain:
example: "Internal server error"