summaryrefslogtreecommitdiff
path: root/tests/files/fail/test_type_float.yaml
blob: bef14b8b1120b13497b65d5e9559ff0ad229b5ae (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
53
54
55
56
---
name: fail-type-float-1
desc: Test simples float value
data: "abc"
schema:
  type: float
errors:
  - "Value 'abc' is not of type 'float'. Path: ''"
---
name: fail-type-float-2
desc: Test wrong type as value in list
data:
  - "foo"
  - True
schema:
  type: seq
  seq:
    - type: float
errors:
  - "Value 'foo' is not of type 'float'. Path: '/0'"
errors:
  - "Value 'True' is not of type 'float'. Path: '/1'"
  - "Value 'foo' is not of type 'float'. Path: '/0'"
---
name: fail-type-float-3
desc: Test float value in mapping
data:
    foo: "abc"
    bar: True
schema:
  type: map
  mapping:
    foo:
      type: float
    bar:
      type: float
errors:
  - "Value 'True' is not of type 'float'. Path: '/bar'"
  - "Value 'abc' is not of type 'float'. Path: '/foo'"
---
name: fail-type-float-4
desc: Test float inside nested map & seq
data:
  foo:
    - True
    - "abc"
schema:
  type: map
  mapping:
    foo:
      type: seq
      sequence:
        - type: float
errors:
  - "Value 'True' is not of type 'float'. Path: '/foo/0'"
  - "Value 'abc' is not of type 'float'. Path: '/foo/1'"