Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.

Commit d3f2e15

Browse files
committed
Add ready-for-review works in progress
These will be the "draft-07" documents. They will be modified in a subsequent commit to clearly indicate that they are for review only, and not for use. The "WIP-" prefix hopefully also clues people in that there is something unusual going on here. Doing everything possible (in this and the next commit) to make it clear that these are not published files, but rather are pre-built review copies for those who are unlikely to build their own from the github repo.
1 parent 61c75e9 commit d3f2e15

8 files changed

+4995
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"$id": "http://json-schema.org/draft-7-wip/hyper-schema-output",
3+
"$schema": "http://json-schema.org/draft-07-wip/schema#",
4+
"type": "array",
5+
"items": {
6+
"allOf": [
7+
{"$ref": "http://json-schema.org/draft-07/links#/definitions/noRequiredFields" }
8+
],
9+
"type": "object",
10+
"required": [
11+
"contextUri",
12+
"contextPointer",
13+
"rel",
14+
"attachmentPointer"
15+
],
16+
"if": { "required": [ "hrefSchema" ] },
17+
"then": { "required": [ "hrefInputTemplates", "hrefPrepopulatedInput" ] },
18+
"else": { "required": [ "targetUri" ] },
19+
"properties": {
20+
"contextUri": {
21+
"$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",
22+
"type": "string",
23+
"format": "uri"
24+
},
25+
"contextPointer": {
26+
"$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",
27+
"type": "string",
28+
"format": "json-pointer"
29+
},
30+
"rel": {
31+
"type": "string"
32+
},
33+
"targetUri": {
34+
"$comment": "The fully resolved target URI",
35+
"type": "string",
36+
"format": "uri"
37+
},
38+
"hrefInputTemplates": {
39+
"$comment": "The list of partially resolved URI Templates, starting with \"href\", followed by applicable \"base\" values from nearest to furthest.",
40+
"type": "array",
41+
"items": {
42+
"type": "string",
43+
"format": "uri-template"
44+
}
45+
},
46+
"hrefPrepopulatedInput": {
47+
"$comment": "The initial data set to be presented with the input form when URI Tempalte input is accepted.",
48+
"type": "object",
49+
"propertyNames": {
50+
"$comment": "These are all URI Template variable names, specifically the 'varname' production from RFC 6570, Section 2.3",
51+
"pattern": "^(?:\\w|(?:%[a-f\\d]{2}))+(?:\\.(?:\\w|(?:%[a-f\\d]{2})))*$"
52+
}
53+
},
54+
"attachmentPointer": {
55+
"$comment": "The absolute JSON Pointer, in string form, of the position to which this resolved link applies",
56+
"type": "string",
57+
"format": "json-pointer"
58+
}
59+
}
60+
}
61+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07-wip/hyper-schema#",
3+
"$id": "http://json-schema.org/draft-07-wip/hyper-schema#",
4+
"title": "JSON Hyper-Schema",
5+
"definitions": {
6+
"schemaArray": {
7+
"allOf": [
8+
{ "$ref": "http://json-schema.org/draft-07-wip/schema#/definitions/schemaArray" },
9+
{
10+
"items": { "$ref": "#" }
11+
}
12+
]
13+
}
14+
},
15+
"allOf": [ { "$ref": "http://json-schema.org/draft-07-wip/schema#" } ],
16+
"properties": {
17+
"additionalItems": { "$ref": "#" },
18+
"additionalProperties": { "$ref": "#"},
19+
"dependencies": {
20+
"additionalProperties": {
21+
"anyOf": [
22+
{ "$ref": "#" },
23+
{ "type": "array" }
24+
]
25+
}
26+
},
27+
"items": {
28+
"anyOf": [
29+
{ "$ref": "#" },
30+
{ "$ref": "#/definitions/schemaArray" }
31+
]
32+
},
33+
"definitions": {
34+
"additionalProperties": { "$ref": "#" }
35+
},
36+
"patternProperties": {
37+
"additionalProperties": { "$ref": "#" }
38+
},
39+
"properties": {
40+
"additionalProperties": { "$ref": "#" }
41+
},
42+
"if": {"$ref": "#"},
43+
"then": {"$ref": "#"},
44+
"else": {"$ref": "#"},
45+
"allOf": { "$ref": "#/definitions/schemaArray" },
46+
"anyOf": { "$ref": "#/definitions/schemaArray" },
47+
"oneOf": { "$ref": "#/definitions/schemaArray" },
48+
"not": { "$ref": "#" },
49+
"contains": { "$ref": "#" },
50+
"propertyNames": { "$ref": "#" },
51+
52+
"base": {
53+
"type": "string",
54+
"format": "uri-template"
55+
},
56+
"links": {
57+
"type": "array",
58+
"items": {
59+
"$ref": "http://json-schema.org/draft-07-wip/links#"
60+
}
61+
}
62+
},
63+
"links": [
64+
{
65+
"rel": "self",
66+
"href": "{+%24id}"
67+
}
68+
]
69+
}

0 commit comments

Comments
 (0)