summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_map.yaml
blob: a46086b5db2ae32ee7567f890f28e4c17ded0874 (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
38
39
40
41
42
43
44
45
46
---
name: fail-type-map-1
desc: Test the most basic case for map
data:
  - 'foo'
schema:
  type: map
  mapping:
    foo:
      type: str
errors:
  - "Value '['foo']' is not a dict. Value path: ''"
---
name: type-map-2
desc: 
data:
  - - 'foo'
  - - 'foo'
schema:
  type: seq
  sequence:
    - type: map
      mapping:
        foo:
          type: str
errors:
  - "Value '['foo']' is not a dict. Value path: '/0'"
  - "Value '['foo']' is not a dict. Value path: '/1'"
---
name: type-map-3
desc: Test bool inside nested map & seq
data:
  foo:
    - - 'foo'
schema:
  type: map
  mapping:
    foo:
      type: seq
      sequence:
        - type: map
          mapping:
            bar:
              type: str
errors:
  - "Value '['foo']' is not a dict. Value path: '/foo/0'"