-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathitem-storage.raml
More file actions
142 lines (137 loc) · 4.57 KB
/
item-storage.raml
File metadata and controls
142 lines (137 loc) · 4.57 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#%RAML 1.0
title: Item Storage
version: v11.2
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost
documentation:
- title: Item Storage API
content: <b>Storage for items in the inventory</b>
types:
item: !include schemas/item-storage/item.json
items: !include schemas/item-storage/items.json
itemsPatchRequest: !include schemas/item-storage/itemsPatch.json
errors: !include raml-util/schemas/errors.schema
retrieveEntitiesRequest: !include schemas/common/retrieveEntitiesDto.json
itemPatchRequest: !include schemas/common/patchRequest.json
traits:
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
resourceTypes:
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
/item-storage:
/items:
displayName: Items
type:
collection:
exampleCollection: !include examples/item-storage/items_get.json
schemaCollection: items
schemaItem: item
exampleItem: !include examples/item-storage/item_get.json
get:
is: [pageable,
searchable: {description: "using CQL (indexes for item and material type)",
example: "title=\"*uproot*\""},
]
post:
is: [validate]
patch:
description: Update multiple items by a single request
is: [validate]
body:
application/json:
type: itemsPatchRequest
example:
strict: false
value: !include examples/items_patch.json
responses:
204:
description: "Items successfully updated"
400:
description: "Bad request: malformed request body"
body:
text/plain:
example: "Bad request: malformed request body"
404:
description: "There is no source record for that item ID"
body:
text/plain:
example: "There is no source record for that item ID"
409:
description: "Optimistic locking version conflict"
body:
text/plain:
example: "Optimistic locking version conflict"
413:
description: "Payload Too Large"
body:
text/plain:
example: "Payload Too Large"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
delete:
is: [searchable: { description: "CQL to select items to delete, use cql.allRecords=1 to delete all", example: "barcode==\"123-0*\"" } ]
responses:
204:
description: "Selected items deleted"
400:
description: "Bad request, e.g. malformed query parameter"
body:
text/plain:
example: "query parameter is empty"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
/{itemId}:
type:
collection-item:
exampleItem: !include examples/item-storage/item_get.json
schema: item
get:
patch:
is: [ validate ]
description: Partial update of item with given ID
body:
application/json:
type: itemPatchRequest
example: !include examples/patchRequest.json
responses:
204:
description: "Item successfully updated"
404:
description: "Item with a given ID not found"
body:
text/plain:
example: Not found
400:
description: "Bad request, e.g. malformed request body or query parameter."
body:
text/plain:
example: "unable to update instance - malformed JSON"
409:
description: "Optimistic locking version conflict"
body:
text/plain:
example: "version conflict"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "internal server error, contact administrator"
/retrieve:
post:
is: [validate]
body:
application/json:
type: retrieveEntitiesRequest
example:
strict: false
value: !include examples/retrieveEntitiesDto.json
description: |
Fetch inventory items collection by POST request