Commit 42083eea authored by Rafael Monnerat's avatar Rafael Monnerat

kvm/theia: Dont use allOf on resilient to extend properties

  allOf implies that all (both) schemas should be valid, but
    additionalProperties false wont allow it, since it become multually
    invalid. (You can validate only one or None)

  Just use $ref to expand the list, it end up with the expected outcome
   reducing complexity.

  Note: kvm wasn't using additionalProperties false but it was changed
   because it makes it future proof, in case we set it (we should set).
parent 5b2556a1
{ {
"type": "object", "type": "object",
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema",
"allOf": [ "description": "Parameters to instantiate resilient KVM",
{ "additionalProperties": false,
"$ref": "./instance-kvm-input-schema.json#"
},
{
"properties": { "properties": {
"$ref": "./instance-kvm-input-schema.json#/properties",
"resilient-clone-number": { "resilient-clone-number": {
"title": "Amount of backup(s) to create", "title": "Amount of backup(s) to create",
"description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.", "description": "Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone.",
...@@ -58,6 +56,4 @@ ...@@ -58,6 +56,4 @@
"optional": true "optional": true
} }
} }
}
]
} }
...@@ -2,11 +2,7 @@ ...@@ -2,11 +2,7 @@
"$schema": "http://json-schema.org/draft-06/schema", "$schema": "http://json-schema.org/draft-06/schema",
"type": "object", "type": "object",
"description": "Parameters to instantiate resilient Theia", "description": "Parameters to instantiate resilient Theia",
"allOf": [ "additionalProperties": false,
{
"$ref": "./instance-input-schema.json#"
},
{
"properties": { "properties": {
"resilient-clone-number": { "resilient-clone-number": {
"title": "Amount of backup(s) to create", "title": "Amount of backup(s) to create",
...@@ -59,8 +55,7 @@ ...@@ -59,8 +55,7 @@
"type": "string", "type": "string",
"default": "2W", "default": "2W",
"optional": true "optional": true
},
"$ref": "./instance-input-schema.json#/properties"
} }
}
}
]
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment