summaryrefslogtreecommitdiff
path: root/tests/draft6/optional/format/uri-template.json
blob: df355c55aa3f636910785335d62892e3af7e7b5b (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
[
    {
        "description": "format: uri-template",
        "schema": { "format": "uri-template" },
        "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": "a valid uri-template",
                "data": "http://example.com/dictionary/{term:1}/{term}",
                "valid": true
            },
            {
                "description": "an invalid uri-template",
                "data": "http://example.com/dictionary/{term:1}/{term",
                "valid": false
            },
            {
                "description": "a valid uri-template without variables",
                "data": "http://example.com/dictionary",
                "valid": true
            },
            {
                "description": "a valid relative uri-template",
                "data": "dictionary/{term:1}/{term}",
                "valid": true
            }
        ]
    }
]