cue vet not failing a schema validation #2424
-
Hello 👋 , I'm playing around with CUE, mostly looking into the schema validation. There is one instance where I expected the validation to fail, but it succeeds. I'm probably doing something wrong, can you help me find my mistake please? The schema is this, where I want the target document be a list of #Foo: {
name: string
bars: [...#Bar]
}
#Bar: {
name: string
bla: [...#Baz]
}
#Baz: {
note: string
}
[...#Foo] And the YAML is this: - name: foo
bars:
- name: bar
bla:
- note: xyz Running Then I decrease the indentation of some fields: - name: foo
bars:
- name: bar
bla:
- note: xyz Running If I also tried the other way around to see if my YAML is bad, with The one I expect to be valid:
The one I expect to be invalid:
Previous similar discussions I found but don't seem directly related: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Top-level lists are indeed a little tricky. See here for some more details. |
Beta Was this translation helpful? Give feedback.
Top-level lists are indeed a little tricky. See here for some more details.