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

Update "latest" meta-schemas to draft-06 #103

Merged
merged 1 commit into from
May 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 78 additions & 115 deletions hyper-schema
Original file line number Diff line number Diff line change
@@ -1,91 +1,107 @@
{
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
"id": "http://json-schema.org/draft-04/hyper-schema#",
"$schema": "http://json-schema.org/draft-06/hyper-schema#",
"$id": "http://json-schema.org/draft-06/hyper-schema#",
"title": "JSON Hyper-Schema",
"allOf": [
{
"$ref": "http://json-schema.org/draft-04/schema#"
"definitions": {
"schemaArray": {
"allOf": [
{ "$ref": "http://json-schema.org/draft-06/schema#/definitions/schemaArray" },
{
"items": { "$ref": "#" }
}
]
},
"linkDescription": {
"title": "Link Description Object",
"type": "object",
"required": [ "href" ],
"properties": {
"href": {
"description": "a URI template, as defined by RFC 6570",
"type": "string",
"format": "uri-template"
},
"hrefSchema": {
"description": "a schema for validating user input to the URI template, where the input is in the form of a JSON object with property names matching variable names in \"href\"",
"allOf": [ {"$ref": "#"} ]
},
"rel": {
"description": "relation to the target resource of the link",
"type": "string"
},
"title": {
"description": "a title for the link",
"type": "string"
},
"targetSchema": {
"description": "JSON Schema describing the link target",
"allOf": [ { "$ref": "#" } ]
},
"mediaType": {
"description": "media type (as defined by RFC 2046) describing the link target",
"type": "string"
},
"submissionEncType": {
"description": "The media type in which to submit data along with the request",
"type": "string",
"default": "application/json"
},
"submissionSchema": {
"description": "Schema describing the data to submit along with the request",
"allOf": [ { "$ref": "#" } ]
}
}
}
],
},
"allOf": [ { "$ref": "http://json-schema.org/draft-06/schema#" } ],
"properties": {
"additionalItems": {
"anyOf": [
{
"type": "boolean"
},
{
"$ref": "#"
}
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"additionalProperties": {
"anyOf": [
{
"type": "boolean"
},
{
"$ref": "#"
}
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"dependencies": {
"additionalProperties": {
"anyOf": [
{
"$ref": "#"
},
{
"type": "array"
}
{ "$ref": "#" },
{ "type": "array" }
]
}
},
"items": {
"anyOf": [
{
"$ref": "#"
},
{
"$ref": "#/definitions/schemaArray"
}
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
]
},
"definitions": {
"additionalProperties": {
"$ref": "#"
}
"additionalProperties": { "$ref": "#" }
},
"patternProperties": {
"additionalProperties": {
"$ref": "#"
}
"additionalProperties": { "$ref": "#" }
},
"properties": {
"additionalProperties": {
"$ref": "#"
}
},
"allOf": {
"$ref": "#/definitions/schemaArray"
},
"anyOf": {
"$ref": "#/definitions/schemaArray"
},
"oneOf": {
"$ref": "#/definitions/schemaArray"
},
"not": {
"$ref": "#"
"additionalProperties": { "$ref": "#" }
},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" },

"base": {
"description": "URI Template resolved as for the 'href' keyword in the Link Description Object. The resulting URI Reference is resolved against the current URI base and sets the new URI base for URI references within the instance.",
"type": "string"
},
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/linkDescription"
}
},
"fragmentResolution": {
"type": "string"
"items": { "$ref": "#/definitions/linkDescription" }
},
"media": {
"type": "object",
Expand All @@ -100,69 +116,16 @@
}
}
},
"pathStart": {
"description": "Instances' URIs must start with this value for this schema to apply to them",
"type": "string",
"format": "uri"
}
},
"definitions": {
"schemaArray": {
"type": "array",
"items": {
"$ref": "#"
}
},
"linkDescription": {
"title": "Link Description Object",
"type": "object",
"required": [ "href", "rel" ],
"properties": {
"href": {
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
"type": "string"
},
"rel": {
"description": "relation to the target resource of the link",
"type": "string"
},
"title": {
"description": "a title for the link",
"type": "string"
},
"targetSchema": {
"description": "JSON Schema describing the link target",
"$ref": "#"
},
"mediaType": {
"description": "media type (as defined by RFC 2046) describing the link target",
"type": "string"
},
"method": {
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
"type": "string"
},
"encType": {
"description": "The media type in which to submit data along with the request",
"type": "string",
"default": "application/json"
},
"schema": {
"description": "Schema describing the data to submit along with the request",
"$ref": "#"
}
}
"readOnly": {
"description": "If true, indicates that the value of this property is controlled by the server.",
"type": "boolean",
"default": "false"
}
},
"links": [
{
"rel": "self",
"href": "{+id}"
},
{
"rel": "full",
"href": "{+($ref)}"
"href": "{+%24id}"
}
]
}

27 changes: 14 additions & 13 deletions links
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
"id": "http://json-schema.org/draft-04/links#",
"$schema": "http://json-schema.org/draft-06/hyper-schema#",
"$id": "http://json-schema.org/draft-06/links#",
"title": "Link Description Object",
"type": "object",
"required": [ "href", "rel" ],
"required": [ "href" ],
"properties": {
"href": {
"description": "a URI template, as defined by RFC 6570, with the addition of the $, ( and ) characters for pre-processing",
"type": "string"
"description": "a URI template, as defined by RFC 6570",
"type": "string",
"format": "uri-template"
},
"hrefSchema": {
"description": "a schema for validating user input to the URI template, where the input is in the form of a JSON object with property names matching variable names in \"href\"",
"allOf": [ {"$ref": "#"} ]
},
"rel": {
"description": "relation to the target resource of the link",
Expand All @@ -19,24 +24,20 @@
},
"targetSchema": {
"description": "JSON Schema describing the link target",
"$ref": "hyper-schema#"
"allOf": [ { "$ref": "hyper-schema#" } ]
},
"mediaType": {
"description": "media type (as defined by RFC 2046) describing the link target",
"type": "string"
},
"method": {
"description": "method for requesting the target of the link (e.g. for HTTP this might be \"GET\" or \"DELETE\")",
"type": "string"
},
"encType": {
"submissionEncType": {
"description": "The media type in which to submit data along with the request",
"type": "string",
"default": "application/json"
},
"schema": {
"submissionSchema": {
"description": "Schema describing the data to submit along with the request",
"$ref": "hyper-schema#"
"allOf": [ { "$ref": "hyper-schema#" } ]
}
}
}
Loading