-
Notifications
You must be signed in to change notification settings - Fork 2
/
patron-block-conditions.raml
71 lines (65 loc) · 2.52 KB
/
patron-block-conditions.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
#%RAML 1.0
title: Patron Block Conditions
version: v0.1
baseUri: http://github.com/org/folio/mod-users
documentation:
- title: mod-users Patron Block Conditions API
content: Query and manage each condition that can trigger a patron block and the messages that should be displayed when triggered.
types:
patron-block-condition: !include patron-block-condition.json
patron-block-conditions: !include patron-block-conditions.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-get: !include raml-util/rtypes/collection-get.raml
item-collection-get: !include raml-util/rtypes/item-collection-get.raml
/patron-block-conditions:
type:
collection-get:
exampleCollection: !include examples/patron-block-conditions.sample
exampleItem: !include examples/patron-block-condition.sample
schemaCollection: patron-block-conditions
get:
is: [
pageable,
searchable: {description: "searchable using CQL", example: "name=\"undergrad*\""}
]
description: Return a list of patron block conditions
/{patronBlockConditionId}:
type:
item-collection-get:
schema: patron-block-condition
exampleItem: !include examples/patron-block-condition.sample
put:
is: [validate]
description: |
Update <<resourcePathName|!singularize>> item with given {<<resourcePathName|!singularize>>Id}
body:
application/json:
type: patron-block-condition
example:
strict: false
value: exampleItem
responses:
204:
description: "Item successfully updated"
404:
description: "Item with a given ID not found"
body:
text/plain:
example: |
"<<resourcePathName|!singularize>> not found"
400:
description: "Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response."
body:
text/plain:
example: |
"unable to update <<resourcePathName|!singularize>> -- malformed JSON at 13:4"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "internal server error, contact administrator"