/
setting.raml
79 lines (73 loc) · 2.32 KB
/
setting.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
#%RAML 1.0
title: "Settings"
baseUri: https://github.com/folio-org/mod-organizations-storage
version: v1.0
documentation:
- title: Settings
content: <b>CRUD APIs used to manage settings for mod-organizations.</b>
types:
setting: !include acq-models/common/schemas/setting.json
setting_collection: !include acq-models/common/schemas/setting_collection.json
errors: !include raml-util/schemas/errors.schema
UUID:
type: string
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
traits:
orderable: !include raml-util/traits/orderable.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
resourceTypes:
collection-get: !include raml-util/rtypes/collection-get.raml
collection-item-get: !include raml-util/rtypes/item-collection-get.raml
/organizations-storage/settings:
type:
collection-get:
exampleCollection: !include acq-models/common/examples/setting_collection.sample
exampleItem: !include acq-models/common/examples/setting_post.sample
schemaCollection: setting_collection
schemaItem: setting
get:
description: Get a list of settings
is: [
searchable: { description: "CQL query", example: "key=BANKING_INFORMATION_ENABLED" },
pageable
]
/{id}:
uriParameters:
id:
description: The UUID of a setting
type: UUID
type:
collection-item-get:
exampleItem: !include acq-models/common/examples/setting_get.sample
schema: setting
put:
description: Update a setting by id
is: [ validate ]
body:
application/json:
example:
strict: false
value: !include acq-models/common/examples/setting_post.sample
type: setting
responses:
204:
description: Setting updated ok
400:
description: Bad Request
body:
text/plain:
404:
description: Not found
body:
text/plain:
409:
description: "Optimistic locking version conflict"
body:
text/plain:
example: "version conflict"
500:
description: Internal error
body:
text/plain: