-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathloan-storage.raml
103 lines (98 loc) · 3.04 KB
/
loan-storage.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
#%RAML 1.0
title: Loan Storage
version: v7.3
protocols: [ HTTP, HTTPS ]
baseUri: http://localhost:9130
documentation:
- title: Loan Storage API
content: <b>Storage for loans</b>
types:
loan: !include loan.json
loans: !include loans.json
loans-history-item: !include loans-history-item.json
loans-history-items: !include loans-history-items.json
errors: !include raml-util/schemas/errors.schema
parameters: !include raml-util/schemas/parameters.schema
anonymize-loans-response: !include anonymize-storage-loans-response.json
anonymize-loans-request: !include anonymize-storage-loans-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 raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
get-only: !include raml-util/rtypes/get-only.raml
/loan-storage:
/loans:
displayName: Loans
type:
collection:
exampleCollection: !include examples/loans.json
exampleItem: !include examples/loan.json
schemaCollection: loans
schemaItem: loan
get:
is: [pageable,
searchable: {description: "searchable using CQL",
example: "requesterId=\"cf23adf0-61ba-4887-bf82-956c4aae2260\""},
]
responses:
501:
description: "Not implemented yet"
post:
is: [validate]
delete:
responses:
204:
description: "All loans deleted"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
/anonymize/{userId}:
post:
is: [validate]
responses:
204:
description: "Closed loans for this user have been anonymized"
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
400:
description: "Bad request, e.g. malformed request body or query parameter."
body:
text/plain:
/{loanId}:
type:
collection-item:
exampleItem: !include examples/loan.json
schema: loan
get:
responses:
501:
description: "Not implemented yet"
put:
is: [validate]
responses:
501:
description: "Not implemented yet"
delete:
responses:
501:
description: "Not implemented yet"
/loan-history:
displayName: Loan-history
type:
get-only:
exampleCollection: !include examples/loans-history-items.json
schema: loans-history-items
get:
is: [
pageable,
searchable: {description: "using CQL",
example: "loan.status.name==Closed"}
]