Required feature properties will only fail the validation if features is enabled and they are missing. If the feature is not enabled, validation does not fail

This commit is contained in:
SKP
2019-08-19 18:30:41 +02:00
parent 7520c97ae5
commit 8eac60f023

View File

@@ -30,14 +30,7 @@
"gatekeeper_clientkeyspassword",
"gatekeeper_datapath",
"gatekeeper_port",
"lightning_announce",
"lightning_expose",
"lightning_implementation",
"lightning_datapath",
"lightning_nodename",
"lightning_nodecolor",
"proxy_datapath",
"otsclient_datapath",
"traefik_datapath",
"traefik_http_port",
"traefik_https_port"
@@ -91,6 +84,47 @@
"bitcoin_prune_size"
]
}
},
{
"if": {
"properties": {
"features": {
"contains": {
"enum": [
"lightning"
]
}
}
}
},
"then": {
"required": [
"lightning_announce",
"lightning_expose",
"lightning_implementation",
"lightning_datapath",
"lightning_nodename",
"lightning_nodecolor"
]
}
},
{
"if": {
"properties": {
"features": {
"contains": {
"enum": [
"otsclient"
]
}
}
}
},
"then": {
"required": [
"otsclient_datapath"
]
}
}
],
"properties": {
@@ -552,4 +586,4 @@
]
}
}
}
}