summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_sequence_multi.yaml
blob: a5007a0c5d5b601e8e8d51c9d50343070d4fa9ed (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
---
name: fail-sequence-multi-1
desc: Test multiple sequence values with wrong sub type and 'all' matching rule
data:
  - "foo"
schema:
  type: seq
  matching: "all"
  seq:
    - type: str
    - type: int
errors:
  - "Value 'foo' is not of type 'int'. Path: '/0'"
---
name: fail-sequence-multi-2
desc: Test multiple nested sequence values with error in level 2 with 'any' matching rule
data:
  - - 123
  - "foobar"
schema:
  type: seq
  matching: "any"
  seq:
    - type: str
    - type: seq
      matching: "any"
      sequence:
        - type: str
errors:
  - "Value '123' is not of type 'str'. Path: '/0/0'"
  - "Value '[123]' is not of type 'str'. Path: '/0'"