merging YAML mappings fails with "unique" constraint
Brought to you by:
kwatch
Using kwalify 0.7.2 it appears that the validation of the unique constraint is happening before the merging of the yaml mappings.
$ kwalify -lf bug_schema.yaml bug.yaml
bug.yaml#0: INVALID
- (line 4) [/bug/1/name] 'test-1': is already used at '/bug/0/name'.
$ cat bug_schema.yaml
type: map
mapping:
"bug":
type: seq
sequence:
- type: map
mapping:
"name":
type: str
required: yes
unique: yes
pattern: /^\S+$/
$ cat bug.yaml
bug:
- &test
name: test-1
- <<: *test
name: test-2
Thanks for looking into this -- and thank you for creating such a useful utility.
bug_schema.yaml
bug.yaml