Vetting an object that can be a subset of another object #1163
-
When vetting an object the vet fails validating an object that is a subset of another object in an or-list of possible structures. if Is this the correct behavior, or a missing feature? this sprang from the discussion: https://cuelang.slack.com/archives/CLT3ULF6C/p1626443556244700 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
@MikkelHJuul please can you provide an example of what is failing? |
Beta Was this translation helpful? Give feedback.
-
This is expected behavior when the fields of one struct are a strict subset of another struct in a disjunction. There is no way for CUE to decide which is "correct." Each option to a disjunction needs to be uniquely differentiated. When you find that one is a subset of another, there may be a different way to organize things depending am what you are trying to achieve. |
Beta Was this translation helpful? Give feedback.
@MikkelHJuul please can you provide an example of what is failing?