-
Notifications
You must be signed in to change notification settings - Fork 20
/
item-storage.raml
61 lines (56 loc) · 1.79 KB
/
item-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
#%RAML 1.0
title: Item Storage
version: v10.0
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost
documentation:
- title: Item Storage API
content: <b>Storage for items in the inventory</b>
types:
item: !include item.json
items: !include items.json
errors: !include raml-util/schemas/errors.schema
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/items_get.json
schemaCollection: items
schemaItem: item
exampleItem: !include examples/item_get.json
get:
is: [pageable,
searchable: {description: "using CQL (indexes for item and material type)",
example: "title=\"*uproot*\""},
]
post:
is: [validate]
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_get.json
schema: item
get: