forked from json-schema-org/json-schema-spec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhyper-schema-output.json
62 lines (62 loc) · 2.65 KB
/
hyper-schema-output.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
{
"$schema": "http://json-schema.org/draft-08/schema#",
"$id": "http://json-schema.org/draft-08/hyper-schema-output",
"title": "JSON Hyper-Schema Output",
"type": "array",
"items": {
"allOf": [
{"$ref": "http://json-schema.org/draft-08/links#/$defs/noRequiredFields" }
],
"type": "object",
"required": [
"contextUri",
"contextPointer",
"rel",
"attachmentPointer"
],
"if": { "required": [ "hrefSchema" ] },
"then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] },
"else": { "required": [ "targetUri" ] },
"properties": {
"contextUri": {
"$comment": "The fully resolved URI of the link context, including a fragment if it is possible to construct one for the given media type and instance",
"type": "string",
"format": "uri"
},
"contextPointer": {
"$comment": "The absolute JSON Pointer to the location in the instance that is the context of the link. If the context resource supports JSON Pointer fragments, this will the string form of the identical JSON Pointer",
"type": "string",
"format": "json-pointer"
},
"rel": {
"type": "string"
},
"targetUri": {
"$comment": "The fully resolved target URI",
"type": "string",
"format": "uri"
},
"hrefInputTemplates": {
"$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.",
"type": "array",
"items": {
"type": "string",
"format": "uri-template"
}
},
"hrefPrepopulatedInput": {
"$comment": "The initial data set to be presented with the input form when URI Tempalte input is accepted.",
"type": "object",
"propertyNames": {
"$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3",
"pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$"
}
},
"attachmentPointer": {
"$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies",
"type": "string",
"format": "json-pointer"
}
}
}
}