blob: 3b7eac8d55ff6624d9884535e5b0c9ad5b9efa35 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
---
name: fail-merge-1
desc: merge maps
schema:
type: map
mapping:
"group":
type: map
mapping:
"name": &name
type: str
required: true
"email": &email
type: str
pattern: .+@.+
required: False
"user":
type: map
mapping:
"name":
<<: *name # merge
length: {max: 16} # add
"email":
<<: *email # merge
required: true # override
data:
group:
name: foo
email: foo@mail.com
user:
name: toooooo-looooong-naaaame
errors:
- "Cannot find required key 'email'. Path: '/user'"
- "Value: 'toooooo-looooong-naaaame' has length of '24', greater than max limit '16'. Path: '/user/name'"
## Kwalify errors
# :required_nokey : 5:3:[/user] key 'email:' is required.
# :length_toolong : 5:3:[/user/name] 'toooooo-looooong-naaaame': too long (length 24 > max 16).
|