Files
backstage/plugins/tech-insights-backend-module-jsonfc/config.json
T
Patrick Jungermann bc72782dd6 feat(tech-insights): define fact checks in app-config.yaml
Allow to define JSON checks in `app-config.yaml`
as `techInsights.factChecker.checks`.

Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
2024-01-30 00:11:49 +01:00

184 lines
3.8 KiB
JSON

{
"$schema": "https://backstage.io/schema/config-v1",
"type": "object",
"properties": {
"techInsights": {
"type": "object",
"properties": {
"factChecker": {
"type": "object",
"properties": {
"checks": {
"type": "object",
"additionalProperties": {
"$ref": "#/$defs/check"
}
}
}
}
}
}
},
"$defs": {
"check": {
"type": "object",
"required": ["type", "name", "description", "factIds", "rule"],
"properties": {
"type": {
"type": "string"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"factIds": {
"type": "array",
"items": {
"type": "string"
}
},
"rule": {
"$ref": "#/$defs/rule"
}
}
},
"conditionProperties": {
"type": "object",
"required": ["fact", "operator", "value"],
"properties": {
"fact": {
"type": "string"
},
"operator": {
"type": "string"
},
"value": {
"oneOf": [
{
"type": "object",
"required": ["fact"],
"properties": {
"fact": {
"type": "string"
}
}
},
{}
]
},
"path": {
"type": "string"
},
"name": {
"type": "string"
},
"priority": {
"type": "number"
},
"params": {
"type": "object",
"additionalProperties": true
}
}
},
"conditionReference": {
"type": "object",
"required": ["condition"],
"properties": {
"condition": {
"type": "string"
},
"name": {
"type": "string"
},
"priority": {
"type": "number"
}
}
},
"nestedCondition": {
"oneOf": [
{
"$ref": "#/$defs/conditionProperties"
},
{
"$ref": "#/$defs/topLevelCondition"
}
]
},
"rule": {
"type": "string",
"required": ["conditions"],
"properties": {
"conditions": {
"$ref": "#/$defs/topLevelCondition"
},
"name": {
"type": "string"
},
"priority": {
"type": "number"
},
"successMetadata": {
"type": "object",
"additionalProperties": true
},
"failureMetadata": {
"type": "object",
"additionalProperties": true
}
}
},
"topLevelCondition": {
"oneOf": [
{
"type": "object",
"required": ["all"],
"properties": {
"all": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/nestedCondition"
}
]
}
}
}
},
{
"type": "object",
"required": ["any"],
"properties": {
"any": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/$defs/nestedCondition"
}
]
}
}
}
},
{
"type": "object",
"required": ["not"],
"properties": {
"not": {
"$ref": "#/$defs/nestedCondition"
}
}
},
{
"$ref": "#/$defs/conditionReference"
}
]
}
}
}