Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions samples/traderx/api-mocks/trade-processor-examples.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: mocks.microcks.io/v1alpha1
kind: APIExamples
metadata:
name: FINOS TraderX Trading Processor
version: 0.1.0
operations:
'POST /tradeservice/order':
Big Buy Adobe:
request:
headers:
Content-Type: application/json
body:
accountId: 52335
security: ADBE
quantity: 100
side: Buy
state: New
response:
status: 200
mediaType: application/json
body:
trade:
id: 12345
accountId: 52335
security: ADBE
quantity: 100
side: Buy
state: Processing
createdAt: {{ now()}}
157 changes: 157 additions & 0 deletions samples/traderx/api-mocks/trade-processor-openapi.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
{
"openapi": "3.1.0",
"info": {
"title": "FINOS TraderX Trading Processor",
"description": "Service for processing trades from the Trade Feed, Persisting trades, updating positions, and Publishing updates to the feed",
"version": "0.1.0"
},
"servers": [
{
"url": "",
"description": "Empty URL to help proxied documentation work"
},
{
"url": "http://localhost:18091",
"description": "Local Dev URL"
}
],
"paths": {
"/tradeservice/order": {
"post": {
"tags": [
"trade-service-controller"
],
"operationId": "processOrder",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TradeOrder"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"$ref": "#/components/schemas/TradeBookingResult"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"TradeOrder": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"type": "string"
},
"security": {
"type": "string"
},
"quantity": {
"type": "integer",
"format": "int32"
},
"accountId": {
"type": "integer",
"format": "int32"
},
"side": {
"type": "string",
"enum": [
"Buy",
"Sell"
]
}
}
},
"Position": {
"type": "object",
"properties": {
"accountId": {
"type": "integer",
"format": "int32"
},
"security": {
"type": "string"
},
"quantity": {
"type": "integer",
"format": "int32"
},
"updated": {
"type": "string",
"format": "date-time"
}
}
},
"Trade": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"accountId": {
"type": "integer",
"format": "int32"
},
"security": {
"type": "string"
},
"side": {
"type": "string",
"enum": [
"Buy",
"Sell"
]
},
"state": {
"type": "string",
"enum": [
"New",
"Processing",
"Settled",
"Cancelled"
]
},
"quantity": {
"type": "integer",
"format": "int32"
},
"updated": {
"type": "string",
"format": "date-time"
},
"created": {
"type": "string",
"format": "date-time"
}
}
},
"TradeBookingResult": {
"type": "object",
"properties": {
"trade": {
"$ref": "#/components/schemas/Trade"
},
"position": {
"$ref": "#/components/schemas/Position"
}
}
}
}
}
}
Loading