Skip to content

Commit 310c8e9

Browse files
Merge pull request #9 from lbroudoux/adding-microcks-mocks
Initial import of Microcks mocks
2 parents 6454880 + 9e6fb2c commit 310c8e9

11 files changed

+2853
-3
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
apiVersion: mocks.microcks.io/v1alpha1
2+
kind: APIExamples
3+
metadata:
4+
name: FINOS TraderX Account Service
5+
version: 0.1.0
6+
operations:
7+
'GET /account/':
8+
allAccounts:
9+
request:
10+
queryParams:
11+
page: 1
12+
size: 10
13+
response:
14+
mediaType: application/json
15+
body:
16+
- id: 10031
17+
displayName: Internal Trading Book
18+
- id: 11413
19+
displayName: Private Clients Fund TTXX
20+
- id : 42422
21+
displayName: Algo Execution Partners
22+
- id : 52335
23+
displayName: Big Corporate Fund
24+
'GET /account/{id}':
25+
Internal Trading Book:
26+
request:
27+
parameters:
28+
id: 10031
29+
response:
30+
mediaType: application/json
31+
body:
32+
id: 10031
33+
displayName: "Internal Trading Book"
34+
Private Clients Fund TTXX:
35+
request:
36+
parameters:
37+
id: 11413
38+
response:
39+
mediaType: application/json
40+
body:
41+
id: 11413
42+
displayName: "Private Clients Fund TTXX"
43+
Algo Execution Partners:
44+
request:
45+
parameters:
46+
id: 42422
47+
response:
48+
mediaType: application/json
49+
body:
50+
id: 42422
51+
displayName: "Algo Execution Partners"
52+
Big Corporate Fund:
53+
request:
54+
parameters:
55+
id: 52335
56+
response:
57+
mediaType: application/json
58+
body:
59+
id: 52335
60+
displayName: "Big Corporate Fund"
61+
'GET /accountuser/':
62+
allAccountUsers:
63+
request:
64+
queryParams:
65+
page: 1
66+
size: 10
67+
response:
68+
mediaType: application/json
69+
body:
70+
- accountId: 10031
71+
username: user01
72+
- accountId: 10031
73+
username: user03
74+
- accountId: 10031
75+
username: user09
76+
- accountId: 22214
77+
username: user01
78+
- accountId: 22214
79+
username: user03
80+
- accountId: 22214
81+
username: user05
82+
- accountId: 22214
83+
username: user07
84+
- accountId: 22214
85+
username: user09
86+
87+
88+
Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
{
2+
"openapi": "3.1.0",
3+
"info": {
4+
"title": "FINOS TraderX Account Service",
5+
"description": "Service for retrieving account data, and for managing accounts",
6+
"version": "0.1.0"
7+
},
8+
"servers": [
9+
{
10+
"url": "",
11+
"description": "Empty URL to help proxied documentation work"
12+
},
13+
{
14+
"url": "http://localhost:18088",
15+
"description": "Local Dev URL"
16+
}
17+
],
18+
"paths": {
19+
"/accountuser/": {
20+
"get": {
21+
"tags": [
22+
"account-user-controller"
23+
],
24+
"operationId": "getAllAccountUsers",
25+
"responses": {
26+
"200": {
27+
"description": "OK",
28+
"content": {
29+
"application/json": {
30+
"schema": {
31+
"type": "array",
32+
"items": {
33+
"$ref": "#/components/schemas/AccountUser"
34+
}
35+
}
36+
}
37+
}
38+
}
39+
}
40+
},
41+
"put": {
42+
"tags": [
43+
"account-user-controller"
44+
],
45+
"operationId": "updateAccountUser",
46+
"requestBody": {
47+
"content": {
48+
"application/json": {
49+
"schema": {
50+
"$ref": "#/components/schemas/AccountUser"
51+
}
52+
}
53+
},
54+
"required": true
55+
},
56+
"responses": {
57+
"200": {
58+
"description": "OK",
59+
"content": {
60+
"application/json": {
61+
"schema": {
62+
"$ref": "#/components/schemas/AccountUser"
63+
}
64+
}
65+
}
66+
}
67+
}
68+
},
69+
"post": {
70+
"tags": [
71+
"account-user-controller"
72+
],
73+
"operationId": "createAccountUser",
74+
"requestBody": {
75+
"content": {
76+
"application/json": {
77+
"schema": {
78+
"$ref": "#/components/schemas/AccountUser"
79+
}
80+
}
81+
},
82+
"required": true
83+
},
84+
"responses": {
85+
"200": {
86+
"description": "OK",
87+
"content": {
88+
"application/json": {
89+
"schema": {
90+
"$ref": "#/components/schemas/AccountUser"
91+
}
92+
}
93+
}
94+
}
95+
}
96+
}
97+
},
98+
"/account/": {
99+
"get": {
100+
"tags": [
101+
"account-controller"
102+
],
103+
"operationId": "getAllAccount",
104+
"responses": {
105+
"200": {
106+
"description": "OK",
107+
"content": {
108+
"application/json": {
109+
"schema": {
110+
"type": "array",
111+
"items": {
112+
"$ref": "#/components/schemas/Account"
113+
}
114+
}
115+
}
116+
}
117+
}
118+
}
119+
},
120+
"put": {
121+
"tags": [
122+
"account-controller"
123+
],
124+
"operationId": "updateAccount",
125+
"requestBody": {
126+
"content": {
127+
"application/json": {
128+
"schema": {
129+
"$ref": "#/components/schemas/Account"
130+
}
131+
}
132+
},
133+
"required": true
134+
},
135+
"responses": {
136+
"200": {
137+
"description": "OK",
138+
"content": {
139+
"application/json": {
140+
"schema": {
141+
"$ref": "#/components/schemas/Account"
142+
}
143+
}
144+
}
145+
}
146+
}
147+
},
148+
"post": {
149+
"tags": [
150+
"account-controller"
151+
],
152+
"operationId": "createAccount",
153+
"requestBody": {
154+
"content": {
155+
"application/json": {
156+
"schema": {
157+
"$ref": "#/components/schemas/Account"
158+
}
159+
}
160+
},
161+
"required": true
162+
},
163+
"responses": {
164+
"200": {
165+
"description": "OK",
166+
"content": {
167+
"application/json": {
168+
"schema": {
169+
"$ref": "#/components/schemas/Account"
170+
}
171+
}
172+
}
173+
}
174+
}
175+
}
176+
},
177+
"/accountuser/{id}": {
178+
"get": {
179+
"tags": [
180+
"account-user-controller"
181+
],
182+
"operationId": "getAccountUserById",
183+
"parameters": [
184+
{
185+
"name": "id",
186+
"in": "path",
187+
"required": true,
188+
"schema": {
189+
"type": "integer",
190+
"format": "int32"
191+
}
192+
}
193+
],
194+
"responses": {
195+
"200": {
196+
"description": "OK",
197+
"content": {
198+
"application/json": {
199+
"schema": {
200+
"$ref": "#/components/schemas/AccountUser"
201+
}
202+
}
203+
}
204+
}
205+
}
206+
}
207+
},
208+
"/account/{id}": {
209+
"get": {
210+
"tags": [
211+
"account-controller"
212+
],
213+
"operationId": "getAccountById",
214+
"parameters": [
215+
{
216+
"name": "id",
217+
"in": "path",
218+
"required": true,
219+
"schema": {
220+
"type": "integer",
221+
"format": "int32"
222+
}
223+
}
224+
],
225+
"responses": {
226+
"200": {
227+
"description": "OK",
228+
"content": {
229+
"application/json": {
230+
"schema": {
231+
"$ref": "#/components/schemas/Account"
232+
}
233+
}
234+
}
235+
}
236+
}
237+
}
238+
}
239+
},
240+
"components": {
241+
"schemas": {
242+
"AccountUser": {
243+
"type": "object",
244+
"properties": {
245+
"accountId": {
246+
"type": "integer",
247+
"format": "int32"
248+
},
249+
"username": {
250+
"type": "string"
251+
}
252+
}
253+
},
254+
"Account": {
255+
"type": "object",
256+
"properties": {
257+
"id": {
258+
"type": "integer",
259+
"format": "int32"
260+
},
261+
"displayName": {
262+
"type": "string"
263+
}
264+
}
265+
}
266+
}
267+
}
268+
}

0 commit comments

Comments
 (0)