summaryrefslogtreecommitdiff
path: root/tests/draft2019-09/optional/format/uuid.json
blob: dc6fb7e0d9a08294ce617b2e4e1d41c0f671707e (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
[
    {
        "description": "uuid format",
        "schema": {
            "$schema": "https://json-schema.org/draft/2019-09/schema",
            "format": "uuid"
        },
        "tests": [
            {
                "description": "all string formats ignore integers",
                "data": 12,
                "valid": true
            },
            {
                "description": "all string formats ignore floats",
                "data": 13.7,
                "valid": true
            },
            {
                "description": "all string formats ignore objects",
                "data": {},
                "valid": true
            },
            {
                "description": "all string formats ignore arrays",
                "data": [],
                "valid": true
            },
            {
                "description": "all string formats ignore booleans",
                "data": false,
                "valid": true
            },
            {
                "description": "all string formats ignore nulls",
                "data": null,
                "valid": true
            },
            {
                "description": "all upper-case",
                "data": "2EB8AA08-AA98-11EA-B4AA-73B441D16380",
                "valid": true
            },
            {
                "description": "all lower-case",
                "data": "2eb8aa08-aa98-11ea-b4aa-73b441d16380",
                "valid": true
            },
            {
                "description": "mixed case",
                "data": "2eb8aa08-AA98-11ea-B4Aa-73B441D16380",
                "valid": true
            },
            {
                "description": "all zeroes is valid",
                "data": "00000000-0000-0000-0000-000000000000",
                "valid": true
            },
            {
                "description": "wrong length",
                "data": "2eb8aa08-aa98-11ea-b4aa-73b441d1638",
                "valid": false
            },
            {
                "description": "missing section",
                "data": "2eb8aa08-aa98-11ea-73b441d16380",
                "valid": false
            },
            {
                "description": "bad characters (not hex)",
                "data": "2eb8aa08-aa98-11ea-b4ga-73b441d16380",
                "valid": false
            },
            {
                "description": "no dashes",
                "data": "2eb8aa08aa9811eab4aa73b441d16380",
                "valid": false
            },
            {
                "description": "too few dashes",
                "data": "2eb8aa08aa98-11ea-b4aa73b441d16380",
                "valid": false
            },
            {
                "description": "too many dashes",
                "data": "2eb8-aa08-aa98-11ea-b4aa73b44-1d16380",
                "valid": false
            },
            {
                "description": "dashes in the wrong spot",
                "data": "2eb8aa08aa9811eab4aa73b441d16380----",
                "valid": false
            },
            {
                "description": "valid version 4",
                "data": "98d80576-482e-427f-8434-7f86890ab222",
                "valid": true
            },
            {
                "description": "valid version 5",
                "data": "99c17cbb-656f-564a-940f-1a4568f03487",
                "valid": true
            },
            {
                "description": "hypothetical version 6",
                "data": "99c17cbb-656f-664a-940f-1a4568f03487",
                "valid": true
            },
            {
                "description": "hypothetical version 15",
                "data": "99c17cbb-656f-f64a-940f-1a4568f03487",
                "valid": true
            }
        ]
    }
]