Skip to content

Commit c5c2e9a

Browse files
committed
Fix broken if-else validation
1 parent 9e19b6e commit c5c2e9a

File tree

1 file changed

+26
-42
lines changed

1 file changed

+26
-42
lines changed

schema.json

+26-42
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
"type": "object",
66
"title": "roadrunner-temporal",
77
"additionalProperties": false,
8-
"required": [
9-
"address"
10-
],
118
"properties": {
129
"address": {
13-
"description": "Address of the Temporal server.",
10+
"description": "Address of the Temporal server. Defaults to localhost:7233 if not provided.",
1411
"type": "string",
15-
"default": "127.0.0.1:7233",
12+
"default": "localhost:7233",
1613
"minLength": 1
1714
},
1815
"cache_size": {
@@ -26,53 +23,40 @@
2623
"default": "default"
2724
},
2825
"metrics": {
29-
"type": "object",
30-
"description": "Temporal metrics.",
31-
"required": [
32-
"driver"
33-
],
34-
"properties": {
35-
"driver": {
36-
"description": "Metrics driver to use.",
37-
"type": "string",
38-
"enum": [
39-
"prometheus",
40-
"statsd"
41-
],
42-
"default": "prometheus"
43-
}
44-
},
45-
"if": {
46-
"properties": {
47-
"driver": {
48-
"const": "prometheus"
49-
}
50-
}
51-
},
52-
"then": {
53-
"properties": {
54-
"prometheus": {
55-
"$ref": "#/$defs/Prometheus"
56-
}
57-
}
58-
},
59-
"else": {
60-
"if": {
26+
"oneOf": [
27+
{
28+
"type": "object",
29+
"additionalProperties": false,
6130
"properties": {
6231
"driver": {
63-
"const": "statsd"
32+
"description": "The Prometheus driver.",
33+
"type": "string",
34+
"enum": [
35+
"prometheus"
36+
]
37+
},
38+
"prometheus": {
39+
"$ref": "#/$defs/Prometheus"
6440
}
6541
}
6642
},
67-
"then": {
43+
{
44+
"type": "object",
45+
"additionalProperties": false,
6846
"properties": {
47+
"driver": {
48+
"description": "The Statsd driver.",
49+
"type": "string",
50+
"enum": [
51+
"statsd"
52+
]
53+
},
6954
"statsd": {
7055
"$ref": "#/$defs/Statsd"
7156
}
7257
}
73-
},
74-
"else": false
75-
}
58+
}
59+
]
7660
},
7761
"activities": {
7862
"$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"

0 commit comments

Comments
 (0)