119 lines
4.7 KiB
JSON
119 lines
4.7 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "/optiver/deployment_config.json",
|
|
"title": "DeploymentConfig",
|
|
"description": "Defines the set of components to deploy and, for each, which protocols it implements and its runtime configuration.",
|
|
"type": "object",
|
|
"properties": {
|
|
"components": {
|
|
"type": "array",
|
|
"description": "Ordered list of components to deploy. At least one component must be defined.",
|
|
"minItems": 1,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"$ref": "#/$defs/ComponentConfig"
|
|
}
|
|
},
|
|
"systemTests": {
|
|
"type": "array",
|
|
"description": "One or more system tests to run according to the protocols implemented by the components.",
|
|
"minItems": 1,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"$ref": "#/$defs/SystemTest"
|
|
}
|
|
}
|
|
},
|
|
"required": ["components", "systemTests"],
|
|
"additionalProperties": false,
|
|
"$defs": {
|
|
"Protocol": {
|
|
"type": "string",
|
|
"description": "A protocol defined in the proto/ directory that a component may implement.",
|
|
"oneOf": [
|
|
{
|
|
"const": "admin",
|
|
"description": "Internal instrument admin protocol (optiver.exchange.internal.admin)."
|
|
},
|
|
{
|
|
"const": "execution",
|
|
"description": "Client-facing execution protocol (optiver.exchange.exec)."
|
|
},
|
|
{
|
|
"const": "info",
|
|
"description": "Market-data / information protocol (optiver.exchange.info)."
|
|
},
|
|
{
|
|
"const": "order_book",
|
|
"description": "Order-book protocol (optiver.exchange.orderbook)."
|
|
},
|
|
{
|
|
"const": "risk_limits",
|
|
"description": "Risk-limits protocol (optiver.exchange.risk)."
|
|
}
|
|
]
|
|
},
|
|
"SystemTest": {
|
|
"type": "string",
|
|
"description": "A system test to run. The dependencies are the protocols that must be deployed for the test to run.",
|
|
"oneOf": [
|
|
{
|
|
"const": "order_book",
|
|
"description": "Tests the order book protocol.",
|
|
"dependencies": ["admin"]
|
|
},
|
|
{
|
|
"const": "info",
|
|
"description": "Tests the info protocol.",
|
|
"dependencies": ["order_book", "admin"]
|
|
},
|
|
{
|
|
"const": "execution",
|
|
"description": "Tests the execution protocol.",
|
|
"dependencies": ["order_book", "admin"]
|
|
},
|
|
{
|
|
"const": "risk_limits",
|
|
"description": "Tests the risk limits protocol.",
|
|
"dependencies": ["execution", "admin"]
|
|
}
|
|
]
|
|
},
|
|
"ComponentConfig": {
|
|
"type": "object",
|
|
"description": "Configuration for a single deployable component.",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Unique human-readable identifier for this component (e.g. 'gateway', 'order_book_engine').",
|
|
"minLength": 1
|
|
},
|
|
"packageName": {
|
|
"type": "string",
|
|
"description": "Console-script entry point installed by the wheel (e.g. 'my-exchange'). Used to locate the binary in the virtual environment.",
|
|
"minLength": 1
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"description": "One or more protocols this component is responsible for implementing. Each value must correspond to a .proto file in the proto/ directory.",
|
|
"minItems": 1,
|
|
"uniqueItems": true,
|
|
"items": {
|
|
"$ref": "#/$defs/Protocol"
|
|
}
|
|
},
|
|
"authRequired": {
|
|
"type": "boolean",
|
|
"description": "Indicates whether authentication is required for this component.",
|
|
"default": true
|
|
},
|
|
"config": {
|
|
"$ref": "src/application/config_schema.json"
|
|
}
|
|
},
|
|
"required": ["name", "packageName", "protocols", "config"],
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|