From d7739d3d04a3c504f8d58b90f6f6bdc0e0905fd3 Mon Sep 17 00:00:00 2001 From: handrews Date: Sat, 3 Dec 2016 15:15:16 -0800 Subject: [PATCH] Move hyper-schema definitions to top. This brings it in line with the core/validation meta-schema and with the standardized format proposed for Draft 05. --- hyper-schema.json | 100 +++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/hyper-schema.json b/hyper-schema.json index 1db79161..b633bd50 100644 --- a/hyper-schema.json +++ b/hyper-schema.json @@ -2,6 +2,56 @@ "$schema": "http://json-schema.org/draft/hyper-schema#", "id": "http://json-schema.org/draft/hyper-schema#", "title": "JSON Hyper-Schema", + "definitions": { + "schemaArray": { + "allOf": [ + { "$ref": "http://json-schema.org/drafts/schema" }, + { + "items": { "$ref": "#" } + } + ] + }, + "linkDescription": { + "title": "Link Description Object", + "type": "object", + "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" + }, + "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" + }, + "method": { + "description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.", + "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", + "allOf": [ { "$ref": "#" } ] + } + } + } + }, "allOf": [ { "$ref": "http://json-schema.org/draft/schema#" } ], "properties": { "additionalItems": { @@ -71,56 +121,6 @@ "default": "false" } }, - "definitions": { - "schemaArray": { - "allOf": [ - { "$ref": "http://json-schema.org/drafts/schema" }, - { - "items": { "$ref": "#" } - } - ] - }, - "linkDescription": { - "title": "Link Description Object", - "type": "object", - "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" - }, - "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" - }, - "method": { - "description": "specifies that the client can construct a templated query (\"get\") or non-idempotent request (\"post\") to a resource.", - "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", - "allOf": [ { "$ref": "#" } ] - } - } - } - }, "links": [ { "rel": "self",