-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathorder-lines.raml
98 lines (93 loc) · 3.61 KB
/
order-lines.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
#%RAML 1.0
title: Order-lines
baseUri: https://github.com/folio-org/mod-orders
version: v1
protocols: [ HTTP, HTTPS ]
documentation:
- title: Orders Business Logic API
content: <b>API for managing purchase orders</b>
types:
patch_order_line_request: !include acq-models/mod-orders/schemas/patch_order_line_request.json
create-inventory-type: !include acq-models/mod-orders/schemas/createInventoryType.json
po-line-collection: !include acq-models/mod-orders-storage/schemas/po_line_collection.json
po-line: !include acq-models/mod-orders-storage/schemas/po_line.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}$
validate_fund_distributions_request: !include acq-models/mod-orders/schemas/validate_fund_distributions_request.json
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 rtypes/collection-with-json-response.raml
collection-item: !include rtypes/item-collection-with-json-response.raml
/orders/order-lines:
displayName: Purchase Order Lines
description: Manage purchase order (PO) lines
type:
collection:
exampleCollection: !include acq-models/mod-orders-storage/examples/po_line_collection.sample
exampleItem: !include acq-models/mod-orders-storage/examples/po_line_get.sample
schemaCollection: po-line-collection
schemaItem: po-line
is: [validate]
get:
is: [pageable, searchable: {description: "using CQL (indexes for PO lines)", example: "payment_status==\"Cancelled\""} ]
post:
description: Post a PO lines to corresponding PO
/{id}:
displayName: Purchase Order Line
description: Manage purchase order line (PO line) by id
uriParameters:
id:
description: The UUID of a purchase order line
type: UUID
type:
collection-item:
exampleItem: !include acq-models/mod-orders-storage/examples/po_line_get.sample
schema: po-line
is: [validate]
get:
description: Return a purchase order line with given {id}
put:
description: Update a purchase order line with given {id}
delete:
description: Delete a purchase order line with given {id}
patch:
description: Apply partial modifications to a order line
body:
application/json:
description: Patch order line request
type: patch_order_line_request
example:
strict: false
value: !include acq-models/mod-orders/examples/patch_order_line_request.sample
responses:
204:
description: "Order line successfully updated"
404:
description: Not found
body:
text/plain:
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "internal server error, contact administrator"
/fund-distributions/validate:
displayName: Validate fund distributions amount
put:
description: Validate is cost amount equals to sum of all fund distributions
body:
application/json:
type: validate_fund_distributions_request
example:
strict: false
value: !include acq-models/mod-orders/examples/validate_fund_distributions_request.sample
responses:
204:
description: "Validation passes"
422:
description: "Validation failed, error with description and codes provided"