summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_bool.yaml
blob: 1007348682aab5fcbeb4f3e5f3f12a07b07dfb0c (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
47
48
49
50
51
52
---
name: fail-type-bool-1
desc: Test wrong type as value in list
data:
  - "foo"
schema:
  type: seq
  matching: "any"
  seq:
    - type: bool
errors:
  - "Value 'foo' is not of type 'bool'. Path: '/0'"
---
name: fail-type-bool-2
desc: Test bool value inside list
data:
  - 'abc'
  - 123
schema:
  type: seq
  sequence:
    - type: bool
errors:
  - "Value '123' is not of type 'bool'. Path: '/1'"
  - "Value 'abc' is not of type 'bool'. Path: '/0'"
---
name: fail-type-bool-3
desc: Test bool value in mapping
data:
  foo: 'abc'
schema:
  type: map
  mapping:
    foo:
      type: bool
errors:
  - "Value 'abc' is not of type 'bool'. Path: '/foo'"
---
name: fail-type-bool-4
desc: Test bool inside nested map & seq
data:
  foo:
    - 'abc'
schema:
  type: map
  mapping:
    foo:
      type: seq
      sequence:
        - type: bool
errors:
  - "Value 'abc' is not of type 'bool'. Path: '/foo/0'"