メインコンテンツまでスキップ

TM Scenario Definition v2

フィールド
Schema IDhttps://github.com/ksuk/merlon/schemas/tm_scenario_v2.json
JSON Schema dialecthttps://json-schema.org/draft/2020-12/schema
object
Required top-level fieldsschema_version, scenario_id, name, type, conditions, severity

プロパティ

名前必須説明
schema_versionstringYes
scenario_idstringYes
namestringYes
descriptionstringNo
typeenumYes
conditionsobjectYes
evaluation_modeenumNo
severityenumYes
tagsarray of stringNo

scenario_id

制約
Pattern^[a-z][a-z0-9_]*$

type

制約
Enum"aggregation"

conditions

名前必須説明
transaction_typearray of stringNo
aggregationobjectNo
thresholdobjectNo
absolute_thresholdnumberNo
additionalobjectNo

conditions.aggregation

名前必須説明
fieldstringNo
functionstringNo
periodstringNo
group_bystringNo

conditions.threshold

名前必須説明
by_customer_typeobjectNo
conditions.threshold.by_customer_type
名前必須説明
(any key)object
conditions.threshold.by_customer_type.*
名前必須説明
by_risk_tierobjectNo
conditions.threshold.by_customer_type.*.by_risk_tier
名前必須説明
LOWnumberNo
MEDIUMnumberNo
HIGHnumberNo

evaluation_mode

制約
Enum"realtime", "batch", "both"
デフォルト"batch"

severity

制約
Enum"LOW", "MEDIUM", "HIGH", "CRITICAL"

完全なスキーマ

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/ksuk/merlon/schemas/tm_scenario_v2.json",
"title": "TM Scenario Definition v2",
"type": "object",
"required": [
"schema_version",
"scenario_id",
"name",
"type",
"conditions",
"severity"
],
"properties": {
"schema_version": {
"type": "string"
},
"scenario_id": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"type": {
"type": "string",
"enum": [
"aggregation"
]
},
"conditions": {
"type": "object",
"properties": {
"transaction_type": {
"type": "array",
"items": {
"type": "string"
}
},
"aggregation": {
"type": "object",
"properties": {
"field": {
"type": "string"
},
"function": {
"type": "string"
},
"period": {
"type": "string"
},
"group_by": {
"type": "string"
}
}
},
"threshold": {
"type": "object",
"properties": {
"by_customer_type": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"by_risk_tier": {
"type": "object",
"properties": {
"LOW": {
"type": "number"
},
"MEDIUM": {
"type": "number"
},
"HIGH": {
"type": "number"
}
}
}
}
}
}
}
},
"absolute_threshold": {
"type": "number"
},
"additional": {
"type": "object"
}
}
},
"evaluation_mode": {
"type": "string",
"enum": [
"realtime",
"batch",
"both"
],
"default": "batch"
},
"severity": {
"type": "string",
"enum": [
"LOW",
"MEDIUM",
"HIGH",
"CRITICAL"
]
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
}
}