-
Notifications
You must be signed in to change notification settings - Fork 19
/
circulation-settings-storage.raml
105 lines (99 loc) · 3.22 KB
/
circulation-settings-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
99
100
101
102
103
104
#%RAML 1.0
title: Circulation Settings Storage
version: v1.0
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost:9130
documentation:
- title: Circulation Settings Storage API
content: <b>Storage for circulation settings</b>
traits:
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
types:
circulation-setting: !include circulation-setting.json
circulation-settings: !include circulation-settings.json
errors: !include raml-util/schemas/errors.schema
parameters: !include raml-util/schemas/parameters.schema
resourceTypes:
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
/circulation-settings-storage:
/circulation-settings:
type:
collection:
exampleCollection: !include examples/circulation-settings.json
exampleItem: !include examples/circulation-setting.json
schemaCollection: circulation-settings
schemaItem: circulation-setting
post:
is: [validate]
description: Create a new circulation setting
body:
application/json:
type: circulation-setting
responses:
201:
description: "Circulation setting has been created"
body:
application/json:
type: circulation-setting
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
get:
is: [validate, pageable, searchable: { description: "with valid searchable fields", example: "id=497f6eca-6276-4993-bfeb-98cbbbba8f79" }]
description: Get all circulation settings
responses:
200:
description: "Circulation settings successfully retreived"
body:
application/json:
type: circulation-settings
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
/{circulationSettingsId}:
type:
collection-item:
exampleItem: !include examples/circulation-setting.json
schema: circulation-setting
get:
responses:
200:
description: "Circulation setting successfully retreived"
body:
application/json:
type: circulation-setting
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
put:
is: [ validate ]
body:
application/json:
type: circulation-setting
responses:
204:
description: "Circulation settings have been saved."
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
delete:
is: [ validate ]
responses:
204:
description: "Circulation settings deleted"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"