*.unit.create.meta.json: Fix syntax for not-required checks

not required [A, B] is not right as it means its not required to have
both. Instead we want not any-of [ required: a, required: b ]
This commit is contained in:
Alexander Larsson 2024-09-17 16:16:46 +02:00 committed by Simon de Vlieger
parent e7699e0c70
commit 2393299510
2 changed files with 66 additions and 24 deletions

View file

@ -78,10 +78,17 @@
"Install"
],
"not": {
"required": [
"Service",
"Volume",
"Network"
"anyOf": [
{
"required": [
"Volume"
]
},
{
"required": [
"Network"
]
}
]
}
},
@ -90,10 +97,17 @@
"Volume"
],
"not": {
"required": [
"Container",
"Network",
"Service"
"anyOf": [
{
"required": [
"Container"
]
},
{
"required": [
"Network"
]
}
]
}
},
@ -102,10 +116,17 @@
"Network"
],
"not": {
"required": [
"Service",
"Container",
"Volume"
"anyOf": [
{
"required": [
"Container"
]
},
{
"required": [
"Volume"
]
}
]
}
}
@ -247,9 +268,6 @@
"additionalProperties": false,
"type": "object",
"description": "'Volume' configuration section of a unit file.",
"required": [
"What"
],
"properties": {
"VolumeName": {
"description": "Override volume name",

View file

@ -90,9 +90,17 @@
"Install"
],
"not": {
"required": [
"Mount",
"Socket"
"anyOf": [
{
"required": [
"Mount"
]
},
{
"required": [
"Socket"
]
}
]
}
},
@ -101,9 +109,17 @@
"Socket"
],
"not": {
"required": [
"Mount",
"Service"
"anyOf": [
{
"required": [
"Mount"
]
},
{
"required": [
"Service"
]
}
]
}
},
@ -112,9 +128,17 @@
"Mount"
],
"not": {
"required": [
"Service",
"Socket"
"anyOf": [
{
"required": [
"Service"
]
},
{
"required": [
"Socket"
]
}
]
}
}