summaryrefslogtreecommitdiff
path: root/tests/files/success/test_type_none.yaml
blob: db65652568ab3206c3815271b9b20eb290899d7b (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
#
# NOTE: This case is not allowed becuase Core class do NOT allow
#       there is no data to validate. This happens if None is at top level
#       of the data structure.
#
# ---
# name: type-none-1
# desc: Most basic test for type None
# data: ~
# schema:
#   type: none
---
name: type-none-2
desc: Test that none type works with none type as value in map
data:
  name: ~
schema:
  type: map
  mapping:
    name:
      type: none
---
name: type-none-3
desc: Test that none type works as value in sequence
data:
  - ~
  - ~
schema:
  type: seq
  sequence:
    - type: none
---
name: type-none-4
desc: Test that none type works inside nested map, seq, map
data:
  foo:
    - bar: ~
schema:
  type: map
  mapping:
    foo:
      type: seq
      sequence:
        - type: map
          mapping:
            bar:
              type: none