I would like to check a user-maintained YAML in which a "subscription" block can be included. This should contain list entries. If this block exists, but is specified without subitems/list elements, it should be accepted. If a list element is specified, it must exist as a string.
Permitted:
before:
- ok1
- ok2
subscription:
after:
- ok1
- ok2
or
before:
- ok1
- ok2
subscription:
- test1
- test2
after:
- ok1
- ok2
Not allowed:
before:
- ok1
- ok2
subscription:
-
after:
- ok1
- ok2
Can this be implemented with Yamale?