diff --git a/ftf_cli/schema.py b/ftf_cli/schema.py index c18ae9c..5d5dfef 100644 --- a/ftf_cli/schema.py +++ b/ftf_cli/schema.py @@ -130,15 +130,34 @@ "x-ui-yaml-editor": {"type": "boolean"}, "x-ui-error-message": {"type": "string"}, "x-ui-visible-if": { - "type": "object", - "properties": { - "field": {"type": "string", "pattern": r"^spec\..+"}, - "values": { + "oneOf": [ + { + "type": "object", + "properties": { + "field": {"type": "string", "pattern": r"^spec\..+"}, + "values": { + "type": "array", + "minItems": 1, + }, + }, + "required": ["field", "values"], + }, + { "type": "array", + "items": { + "type": "object", + "properties": { + "field": {"type": "string", "pattern": r"^spec\..+"}, + "values": { + "type": "array", + "minItems": 1, + }, + }, + "required": ["field", "values"], + }, "minItems": 1, - }, - }, - "required": ["field", "values"], + } + ] }, }, "additionalProperties": {