Skip to content

Instantly share code, notes, and snippets.

@mkanoor
Created September 21, 2023 17:39
Show Gist options
  • Select an option

  • Save mkanoor/999d9acc1060e918fe313a46c0caf498 to your computer and use it in GitHub Desktop.

Select an option

Save mkanoor/999d9acc1060e918fe313a46c0caf498 to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-06/schema#",
"type": "array",
"items": {
"$ref": "#/definitions/Welcome1Element"
},
"definitions": {
"Welcome1Element": {
"type": "object",
"additionalProperties": false,
"properties": {
"RuleSet": {
"$ref": "#/definitions/RuleSet"
}
},
"required": [
"RuleSet"
],
"title": "Welcome1Element"
},
"RuleSet": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"hosts": {
"type": "array",
"items": {
"type": "string"
}
},
"sources": {
"type": "array",
"items": {
"$ref": "#/definitions/Source"
}
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/Rule"
}
},
"default_events_ttl": {
"type": "string"
}
},
"required": [
"default_events_ttl",
"hosts",
"name",
"rules",
"sources"
],
"title": "RuleSet"
},
"Rule": {
"type": "object",
"additionalProperties": false,
"properties": {
"Rule": {
"$ref": "#/definitions/RuleClass"
}
},
"required": [
"Rule"
],
"title": "Rule"
},
"RuleClass": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"condition": {
"$ref": "#/definitions/Condition"
},
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/Action"
}
},
"enabled": {
"type": "boolean"
}
},
"required": [
"actions",
"condition",
"enabled",
"name"
],
"title": "RuleClass"
},
"Action": {
"type": "object",
"additionalProperties": false,
"properties": {
"Action": {
"$ref": "#/definitions/ActionClass"
}
},
"required": [
"Action"
],
"title": "Action"
},
"ActionClass": {
"type": "object",
"additionalProperties": false,
"properties": {
"action": {
"type": "string"
},
"action_args": {
"$ref": "#/definitions/ActionArgs"
}
},
"required": [
"action",
"action_args"
],
"title": "ActionClass"
},
"ActionArgs": {
"type": "object",
"additionalProperties": false,
"properties": {
"pretty": {
"type": "boolean"
}
},
"required": [
"pretty"
],
"title": "ActionArgs"
},
"Condition": {
"type": "object",
"additionalProperties": false,
"properties": {
"AllCondition": {
"type": "array",
"items": {
"$ref": "#/definitions/AllCondition"
}
}
},
"required": [
"AllCondition"
],
"title": "Condition"
},
"AllCondition": {
"type": "object",
"additionalProperties": false,
"properties": {
"GreaterThanOrEqualToExpression": {
"$ref": "#/definitions/GreaterThanExpression"
},
"GreaterThanExpression": {
"$ref": "#/definitions/GreaterThanExpression"
},
"SearchMatchesExpression": {
"$ref": "#/definitions/SearchMatchesExpression"
}
},
"required": [],
"title": "AllCondition"
},
"GreaterThanExpression": {
"type": "object",
"additionalProperties": false,
"properties": {
"lhs": {
"$ref": "#/definitions/Lhs"
},
"rhs": {
"$ref": "#/definitions/GreaterThanExpressionRhs"
}
},
"required": [
"lhs",
"rhs"
],
"title": "GreaterThanExpression"
},
"Lhs": {
"type": "object",
"additionalProperties": false,
"properties": {
"Event": {
"type": "string"
}
},
"required": [
"Event"
],
"title": "Lhs"
},
"GreaterThanExpressionRhs": {
"type": "object",
"additionalProperties": false,
"properties": {
"Integer": {
"type": "integer"
}
},
"required": [
"Integer"
],
"title": "GreaterThanExpressionRhs"
},
"SearchMatchesExpression": {
"type": "object",
"additionalProperties": false,
"properties": {
"lhs": {
"$ref": "#/definitions/Lhs"
},
"rhs": {
"$ref": "#/definitions/SearchMatchesExpressionRhs"
}
},
"required": [
"lhs",
"rhs"
],
"title": "SearchMatchesExpression"
},
"SearchMatchesExpressionRhs": {
"type": "object",
"additionalProperties": false,
"properties": {
"SearchType": {
"$ref": "#/definitions/SearchType"
}
},
"required": [
"SearchType"
],
"title": "SearchMatchesExpressionRhs"
},
"SearchType": {
"type": "object",
"additionalProperties": false,
"properties": {
"kind": {
"$ref": "#/definitions/Kind"
},
"pattern": {
"$ref": "#/definitions/Kind"
},
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/Option"
}
}
},
"required": [
"kind",
"pattern"
],
"title": "SearchType"
},
"Kind": {
"type": "object",
"additionalProperties": false,
"properties": {
"String": {
"type": "string",
"qt-uri-protocols": [
"https"
]
}
},
"required": [
"String"
],
"title": "Kind"
},
"Option": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "#/definitions/Kind"
},
"value": {
"$ref": "#/definitions/Value"
}
},
"required": [
"name",
"value"
],
"title": "Option"
},
"Value": {
"type": "object",
"additionalProperties": false,
"properties": {
"Boolean": {
"type": "boolean"
}
},
"required": [
"Boolean"
],
"title": "Value"
},
"Source": {
"type": "object",
"additionalProperties": false,
"properties": {
"EventSource": {
"$ref": "#/definitions/EventSource"
}
},
"required": [
"EventSource"
],
"title": "Source"
},
"EventSource": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"source_name": {
"type": "string"
},
"source_args": {
"$ref": "#/definitions/SourceArgs"
},
"source_filters": {
"type": "array",
"items": {}
}
},
"required": [
"name",
"source_args",
"source_filters",
"source_name"
],
"title": "EventSource"
},
"SourceArgs": {
"type": "object",
"additionalProperties": false,
"properties": {
"limit": {
"type": "integer"
},
"delay": {
"type": "integer"
}
},
"required": [
"delay",
"limit"
],
"title": "SourceArgs"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment