-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathpieces-batch.raml
More file actions
84 lines (78 loc) · 2.73 KB
/
pieces-batch.raml
File metadata and controls
84 lines (78 loc) · 2.73 KB
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
#%RAML 1.0
title: Pieces Batch Operations
baseUri: https://github.com/folio-org/mod-orders
version: v1
protocols: [ HTTP, HTTPS ]
documentation:
- title: Endpoint for batch operations on Pieces
content: <b>Endpoint for batch operations on Pieces</b>
types:
piece-collection: !include acq-models/mod-orders-storage/schemas/piece_collection.json
piece-batch-status-collection: !include acq-models/mod-orders/schemas/pieceStatusBatchCollection.json
errors: !include raml-util/schemas/errors.schema
# workaround to prevent api-lint errors for FQM vendor extensions
# see https://github.com/folio-org/fqm-tools/blob/main/docs/generation/field-schema.md#raml-validation-errors
annotationTypes:
fqm-essential:
type: boolean
fqm-visibility:
type: string
fqm-visible-by-default:
type: boolean
traits:
validate: !include raml-util/traits/validation.raml
resourceTypes:
post-with-200: !include rtypes/post-json-200.raml
/orders/pieces-batch:
type:
post-with-200:
requestSchema: piece-collection
responseSchema: piece-collection
requestExample: !include acq-models/mod-orders-storage/examples/piece_collection.sample
responseExample: !include acq-models/mod-orders-storage/examples/piece_collection.sample
is: [ validate ]
post:
description: Create batch pieces
queryParameters:
createItem:
displayName: Should item will be created for piece
type: boolean
description: Should item will be created for piece
example: true
required: false
default: false
/status:
put:
description: Batch status update for pieces
body:
application/json:
type: piece-batch-status-collection
example:
strict: false
value: !include acq-models/mod-orders/examples/pieceStatusBatchCollection.sample
responses:
204:
description: "Piece records successfully updated"
400:
description: "Bad request"
body:
application/json:
example:
strict: false
value: !include examples/errors_400.sample
text/plain:
example: "Unable to update pieces - Bad request"
404:
description: "Pieces do not exist"
body:
text/plain:
example: "Following pieces are not found: [id1, id2]"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
application/json:
example:
strict: false
value: !include examples/errors_500.sample
text/plain:
example: "Unable to update pieces - Internal server error, e.g. due to misconfiguration"