forked from stevan/Jackalope-REST
/
resource_ref.json
69 lines (69 loc) · 2.14 KB
/
resource_ref.json
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
[
{
"schema" : { "$ref" : "jackalope/rest/resource/ref" },
"pass" : [
{ "$id" : "1", "type_of" : "some/simple/schema" },
{ "$id" : "1", "type_of" : "some/simple/schema", "version" : "2i29219jkjklewioewjklewk" },
{
"$id" : "1",
"type_of" : "some/simple/schema",
"version" : "2i29219jkjklewioewjklewk",
"link" : { "rel" : "read", "method" : "GET", "href" : "some/simple/1" }
},
{
"$id" : "1",
"type_of" : "some/simple/schema",
"link" : { "rel" : "read", "method" : "GET", "href" : "some/simple/1" }
}
],
"fail" : [
{ "$id" : "1" },
{ "type_of" : "some/simple/schema" },
{
"$id" : "1",
"type_of" : "some/simple/schema",
"link" : { "rel" : "read", "method" : "POST", "href" : "some/simple/1" }
},
{
"$id" : "1",
"type_of" : "some/simple/schema",
"link" : { "rel" : "create", "method" : "GET", "href" : "some/simple/1" }
},
null,
true,
false,
1,
1.5,
"Hello",
[],
[ 1, 5, 6 ],
{ "foo" : "bar" }
]
},
{
"schema" : {
"extends" : { "$ref" : "jackalope/rest/resource/ref" },
"properties" : {
"type_of" : { "type" : "string", "literal" : "some/simple/schema" }
}
},
"pass" : [
{ "$id" : "1", "type_of" : "some/simple/schema" },
{ "$id" : "1", "type_of" : "some/simple/schema", "version" : "2i29219jkjklewioewjklewk" }
],
"fail" : [
{ "$id" : "1", "type_of" : "some/other/simple/schema" },
{ "$id" : "1" },
{ "type_of" : "some/simple/schema" },
null,
true,
false,
1,
1.5,
"Hello",
[],
[ 1, 5, 6 ],
{ "foo" : "bar" }
]
}
]