Skip to content

Commit

Permalink
[#572]: chore: Fix broken if-else logic in JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
rustatian authored Oct 26, 2024
2 parents 40b5e1c + c5c2e9a commit 1ea74cc
Showing 1 changed file with 26 additions and 42 deletions.
68 changes: 26 additions & 42 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,11 @@
"type": "object",
"title": "roadrunner-temporal",
"additionalProperties": false,
"required": [
"address"
],
"properties": {
"address": {
"description": "Address of the Temporal server.",
"description": "Address of the Temporal server. Defaults to localhost:7233 if not provided.",
"type": "string",
"default": "127.0.0.1:7233",
"default": "localhost:7233",
"minLength": 1
},
"cache_size": {
Expand All @@ -26,53 +23,40 @@
"default": "default"
},
"metrics": {
"type": "object",
"description": "Temporal metrics.",
"required": [
"driver"
],
"properties": {
"driver": {
"description": "Metrics driver to use.",
"type": "string",
"enum": [
"prometheus",
"statsd"
],
"default": "prometheus"
}
},
"if": {
"properties": {
"driver": {
"const": "prometheus"
}
}
},
"then": {
"properties": {
"prometheus": {
"$ref": "#/$defs/Prometheus"
}
}
},
"else": {
"if": {
"oneOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"driver": {
"const": "statsd"
"description": "The Prometheus driver.",
"type": "string",
"enum": [
"prometheus"
]
},
"prometheus": {
"$ref": "#/$defs/Prometheus"
}
}
},
"then": {
{
"type": "object",
"additionalProperties": false,
"properties": {
"driver": {
"description": "The Statsd driver.",
"type": "string",
"enum": [
"statsd"
]
},
"statsd": {
"$ref": "#/$defs/Statsd"
}
}
},
"else": false
}
}
]
},
"activities": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/pool/refs/heads/master/schema.json"
Expand Down

0 comments on commit 1ea74cc

Please sign in to comment.