Skip to content

Commit

Permalink
feat: add new config in the schema
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Feb 14, 2024
1 parent af3c3c8 commit 043f965
Showing 1 changed file with 74 additions and 75 deletions.
149 changes: 74 additions & 75 deletions src/types/config.schema.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,78 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rpc": {
"type": "string",
"format": "uri"
},
"deploymentBlock": {
"type": "integer"
},
"watchdogTimeout": {
"type": "integer"
},
"orderBookApi": {
"type": "string",
"format": "uri"
},
"pageSize": {
"type": "integer"
},
"filterPolicy": {
"type": "object",
"properties": {
"defaultAction": {
"$ref": "#/$defs/filterAction"
},
"owners": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
},
"handlers": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
}
},
"required": [
"defaultAction"
],
"additionalProperties": false
}
},
"required": [
"name",
"rpc",
"deploymentBlock",
"filterPolicy"
],
"additionalProperties": false
}
}
},
"required": [
"networks"
],
"additionalProperties": false,
"$defs": {
"filterAction": {
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"networks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"rpc": {
"type": "string",
"format": "uri"
},
"deploymentBlock": {
"type": "integer"
},
"watchdogTimeout": {
"type": "integer"
},
"orderBookApi": {
"type": "string",
"enum": [
"ACCEPT",
"DROP",
"SKIP"
]
}
"format": "uri"
},
"pageSize": {
"type": "integer"
},
"filterPolicy": {
"type": "object",
"properties": {
"defaultAction": {
"$ref": "#/$defs/filterAction"
},
"conditionalOrderIds": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
},
"transactions": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
},
"owners": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
},
"handlers": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/filterAction"
}
}
},
"required": ["defaultAction"],
"additionalProperties": false
}
},
"required": ["name", "rpc", "deploymentBlock", "filterPolicy"],
"additionalProperties": false
}
}
},
"required": ["networks"],
"additionalProperties": false,
"$defs": {
"filterAction": {
"type": "string",
"enum": ["ACCEPT", "DROP", "SKIP"]
}
}
}

0 comments on commit 043f965

Please sign in to comment.