-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.json
74 lines (74 loc) · 2.01 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"required": ["hosts", "triggers", "command"],
"properties": {
"hosts": {
"type": "array",
"description": "List of server hostnames this configuration applies to",
"items": {
"type": "string",
"pattern": "^[a-zA-Z0-9][a-zA-Z0-9-._]*\\.[a-zA-Z]{2,}$",
"minLength": 4
},
"minItems": 1,
"uniqueItems": true
},
"triggers": {
"type": "array",
"items": {
"type": "object",
"required": ["pattern"],
"properties": {
"pattern": {
"type": "string",
"minLength": 1,
"description": "The text pattern to match against"
},
"matchType": {
"type": "string",
"enum": ["exact", "prefix", "contains", "suffix"],
"default": "prefix",
"description": "How the pattern should be matched against the text"
},
"caseSensitive": {
"type": "boolean",
"default": true,
"description": "Whether the pattern matching should be case-sensitive"
}
}
},
"minItems": 1,
"uniqueItems": true
},
"command": {
"type": "string",
"pattern": "^/.*\\{message\\}.*$",
"minLength": 2,
"description": "Command with {message} parameter placeholder"
},
"validation": {
"type": "object",
"properties": {
"startsWith": {
"type": "string",
"description": "Required prefix for valid messages"
},
"endsWith": {
"type": "string",
"description": "Required suffix for valid messages"
},
"excludePatterns": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
},
"uniqueItems": true,
"default": [],
"description": "Patterns that should not appear in valid messages"
}
}
}
}
}