Debian Codegraph @

t/additional-tests-draft4/id.json

raw
1 [
2 {
3 "description": "weird but valid use of non-empty plain name fragment in id",
4 "schema": {
5 "$schema": "http://json-schema.org/draft-04/schema",
6 "id": "https://example.com/draft4-id-and-anchor",
7 "definitions": {
8 "num": {
9 "id": "def1#num",
10 "type": "number"
11 },
12 "str": {
13 "id": "def2#str",
14 "type": "string"
15 }
16 },
17 "anyOf": [
18 { "$ref": "def1#num" },
19 { "$ref": "def2#str" }
20 ]
21 },
22 "tests": [
23 {
24 "description": "valid case, number",
25 "data": 1,
26 "valid": true
27 },
28 {
29 "description": "valid case, string",
30 "data": "hi",
31 "valid": true
32 },
33 {
34 "description": "invalid case",
35 "data": [ "not just a string" ],
36 "valid": false
37 }
38 ]
39 }
40 ]