Skip to content
This repository was archived by the owner on Nov 2, 2023. It is now read-only.
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
2 changes: 2 additions & 0 deletions documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ layout: page
title: Specification
---

<span style="color:red">***The next draft is [ready for pre-publication feedback](/work-in-progress/)!***</span>

The latest Internet-Drafts at the IETF are the draft-wright-json-schema\*-01 documents, which correspond to the draft-06 meta-schemas. These were published on 2017-04-15. (Due to a change in authorship the I-D numbering was reset with the previous draft).

Please see the **[migration notes](draft-06/README.md)** for more information on this release and on migrating from draft-04.
Expand Down
2 changes: 2 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ permalink: /

**JSON Schema** is a vocabulary that allows you to **annotate** and **validate** JSON documents.

<span style="color:red">***The next draft is [ready for pre-publication feedback](/work-in-progress/)!***</span>

Advantages
----------

Expand Down
4 changes: 3 additions & 1 deletion specification-links.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ layout: page

You can find the latest released draft on the [Specification](/documentation.md) page. Older drafts are expired, but may be of historical interest.

<span style="color:red">***The next draft is [ready for pre-publication feedback](/work-in-progress/)!***</span>

**A note on draft naming and numbering:**
IETF Internet-Drafts (I-Ds) are named with the editor's name and a sequential number which resets with each new editor. Meta-schemas are numbered sequentially. Additionally, drafts 00-03 used one document for all three current specs. Most people find it easier to remember the sequential meta-schema numbers, so those are used throughout the site.

Expand Down Expand Up @@ -55,4 +57,4 @@ The next unreleased draft is a work in progress. You can [give feedback and get
* [JSON Hyper-Schema meta-schema](http://json-schema.org/draft-03/hyper-schema)

## Drafts 0/1/2
Meta-schemas for these older drafts can be found on GitHub: [Draft 0](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-00), [Draft 1](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-01), [Draft 2](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-02)
Meta-schemas for these older drafts can be found on GitHub: [Draft 0](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-00), [Draft 1](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-01), [Draft 2](https://github.com/json-schema-org/json-schema-org.github.io/tree/master/draft-02)
61 changes: 61 additions & 0 deletions work-in-progress/WIP-hyper-schema-output.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$id": "http://json-schema.org/WORK-IN-PROGRESS/hyper-schema-output",
"$schema": "http://json-schema.org/WORK-IN-PROGRESS/schema#",
"type": "array",
"items": {
"allOf": [
{"$ref": "http://json-schema.org/draft-07/links#/definitions/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"
}
}
}
}
69 changes: 69 additions & 0 deletions work-in-progress/WIP-hyper-schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"$schema": "http://json-schema.org/WORK-IN-PROGRESS/hyper-schema#",
"$id": "http://json-schema.org/WORK-IN-PROGRESS/hyper-schema#",
"title": "JSON Hyper-Schema",
"definitions": {
"schemaArray": {
"allOf": [
{ "$ref": "http://json-schema.org/WORK-IN-PROGRESS/schema#/definitions/schemaArray" },
{
"items": { "$ref": "#" }
}
]
}
},
"allOf": [ { "$ref": "http://json-schema.org/WORK-IN-PROGRESS/schema#" } ],
"properties": {
"additionalItems": { "$ref": "#" },
"additionalProperties": { "$ref": "#"},
"dependencies": {
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "type": "array" }
]
}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
]
},
"definitions": {
"additionalProperties": { "$ref": "#" }
},
"patternProperties": {
"additionalProperties": { "$ref": "#" }
},
"properties": {
"additionalProperties": { "$ref": "#" }
},
"if": {"$ref": "#"},
"then": {"$ref": "#"},
"else": {"$ref": "#"},
"allOf": { "$ref": "#/definitions/schemaArray" },
"anyOf": { "$ref": "#/definitions/schemaArray" },
"oneOf": { "$ref": "#/definitions/schemaArray" },
"not": { "$ref": "#" },
"contains": { "$ref": "#" },
"propertyNames": { "$ref": "#" },

"base": {
"type": "string",
"format": "uri-template"
},
"links": {
"type": "array",
"items": {
"$ref": "http://json-schema.org/WORK-IN-PROGRESS/links#"
}
}
},
"links": [
{
"rel": "self",
"href": "{+%24id}"
}
]
}
Loading