-
Notifications
You must be signed in to change notification settings - Fork 20
/
instance-preceding-succeeding-titles.raml
146 lines (141 loc) · 5.19 KB
/
instance-preceding-succeeding-titles.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
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
143
144
145
146
#%RAML 1.0
title: Preceding/succeeding Titles API
version: v0.2
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost
documentation:
- title: Preceding/succeeding Titles API
content: <b>Storage for preceding/succeeding titles in the inventory</b>
types:
precedingSucceedingTitle: !include instanceprecedingsucceedingtitle.json
precedingSucceedingTitles: !include instanceprecedingsucceedingtitles.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
/preceding-succeeding-titles:
displayName: Preceding/Succeeding titles
type:
collection:
exampleCollection: !include examples/precedingsucceedingtitles_get.json
schemaCollection: precedingSucceedingTitles
schemaItem: precedingSucceedingTitle
exampleItem: !include examples/precedingsucceedingtitle_get.json
get:
is: [pageable,
searchable: {description: "by preceding instance ID or by succeeding instance ID (using CQL))",
example: "precedingInstanceId==83a50dc6-b887-43d9-93ee-28b2c4cd11f8
succeedingInstanceId==30fcc8e7-a019-43f4-b642-2edc389f4501"},
]
description: Return a list of preceding succeeding titles
responses:
200:
description: "The new preceding/succeeding title has been successfully returned"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
post:
description: Create a new preceding/succeeding title
is: [validate]
responses:
201:
description: "The new preceding/succeeding title has been successfully created"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
/{precedingSucceedingTitleId}:
type:
collection-item:
exampleItem: !include examples/precedingsucceedingtitle_get.json
schema: precedingSucceedingTitle
get:
description: Get a preceding/succeeding title by id
responses:
200:
description: "The preceding/succeeding title has been returned"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
put:
description: Update a preceding/succeeding title by id
is: [validate]
responses:
204:
description: "The preceding/succeeding title has been updated"
422:
description: "Unprocessable Entity"
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
delete:
description: Delete a preceding/succeeding title by id
responses:
204:
description: "The preceding/succeeding title has been deleted"
400:
description: "Bad request"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
/instances/{instanceId}:
put:
description: Update preceding/succeeding titles related to the instance
is: [validate]
body:
application/json:
type: precedingSucceedingTitles
example:
strict: false
value: !include examples/precedingsucceedingtitles_get.json
responses:
204:
description: "Successfully updated"
404:
description: "Instance with a given ID not found"
body:
text/plain:
example: |
"Instance with a given ID not found"
400:
description: "Bad request: malformed request body"
body:
text/plain:
example: |
"unable to update preceding/succeeding titles"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "internal server error, contact administrator"