You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a validator for a configuration file format that has multiple mutually incompatible versions (similar to docker-compose files for example).
Example of how I had hoped to express this:
# The following line does *not* workany(include('v1_config'), include('v2_config'))
---
v1_config:
version: int(min=1, max=1, required=False)settings:
v1_setting_a: str()v1_setting_b: str(required=False)
---
v2_config:
version: int(min=2, max=2)settings:
v2_setting_c: str()v2_setting_d: int()
Is there any way to express what I'm trying to do here, or is that simply not supported (yet)?
The text was updated successfully, but these errors were encountered:
There's actually a PR out for this: #38
It's just quite large and complicated so I haven't been comfortable merging it. If you try it and it works for you please let me know.
I'm trying to build a validator for a configuration file format that has multiple mutually incompatible versions (similar to docker-compose files for example).
Example of how I had hoped to express this:
Is there any way to express what I'm trying to do here, or is that simply not supported (yet)?
The text was updated successfully, but these errors were encountered: