Skip to content
Merged
88 changes: 88 additions & 0 deletions samples/traderx/api-mocks/account-service-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
apiVersion: mocks.microcks.io/v1alpha1
kind: APIExamples
metadata:
name: FINOS TraderX Account Service
version: 0.1.0
operations:
'GET /account/':
allAccounts:
request:
queryParams:
page: 1
size: 10
response:
mediaType: application/json
body:
- id: 10031
displayName: Internal Trading Book
- id: 11413
displayName: Private Clients Fund TTXX
- id : 42422
displayName: Algo Execution Partners
- id : 52335
displayName: Big Corporate Fund
'GET /account/{id}':
Internal Trading Book:
request:
parameters:
id: 10031
response:
mediaType: application/json
body:
id: 10031
displayName: "Internal Trading Book"
Private Clients Fund TTXX:
request:
parameters:
id: 11413
response:
mediaType: application/json
body:
id: 11413
displayName: "Private Clients Fund TTXX"
Algo Execution Partners:
request:
parameters:
id: 42422
response:
mediaType: application/json
body:
id: 42422
displayName: "Algo Execution Partners"
Big Corporate Fund:
request:
parameters:
id: 52335
response:
mediaType: application/json
body:
id: 52335
displayName: "Big Corporate Fund"
'GET /accountuser/':
allAccountUsers:
request:
queryParams:
page: 1
size: 10
response:
mediaType: application/json
body:
- accountId: 10031
username: user01
- accountId: 10031
username: user03
- accountId: 10031
username: user09
- accountId: 22214
username: user01
- accountId: 22214
username: user03
- accountId: 22214
username: user05
- accountId: 22214
username: user07
- accountId: 22214
username: user09



268 changes: 268 additions & 0 deletions samples/traderx/api-mocks/account-service-openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,268 @@
{
"openapi": "3.1.0",
"info": {
"title": "FINOS TraderX Account Service",
"description": "Service for retrieving account data, and for managing accounts",
"version": "0.1.0"
},
"servers": [
{
"url": "",
"description": "Empty URL to help proxied documentation work"
},
{
"url": "http://localhost:18088",
"description": "Local Dev URL"
}
],
"paths": {
"/accountuser/": {
"get": {
"tags": [
"account-user-controller"
],
"operationId": "getAllAccountUsers",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountUser"
}
}
}
}
}
}
},
"put": {
"tags": [
"account-user-controller"
],
"operationId": "updateAccountUser",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountUser"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountUser"
}
}
}
}
}
},
"post": {
"tags": [
"account-user-controller"
],
"operationId": "createAccountUser",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountUser"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountUser"
}
}
}
}
}
}
},
"/account/": {
"get": {
"tags": [
"account-controller"
],
"operationId": "getAllAccount",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
},
"put": {
"tags": [
"account-controller"
],
"operationId": "updateAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
},
"post": {
"tags": [
"account-controller"
],
"operationId": "createAccount",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
},
"/accountuser/{id}": {
"get": {
"tags": [
"account-user-controller"
],
"operationId": "getAccountUserById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccountUser"
}
}
}
}
}
}
},
"/account/{id}": {
"get": {
"tags": [
"account-controller"
],
"operationId": "getAccountById",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Account"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"AccountUser": {
"type": "object",
"properties": {
"accountId": {
"type": "integer",
"format": "int32"
},
"username": {
"type": "string"
}
}
},
"Account": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int32"
},
"displayName": {
"type": "string"
}
}
}
}
}
}
Loading
Loading