Skip to content

Allow "$ref" in place of any schema. #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
138 changes: 75 additions & 63 deletions hyper-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,77 +50,89 @@
"allOf": [ { "$ref": "#" } ]
}
}
}
},
"allOf": [ { "$ref": "http://json-schema.org/draft/schema#" } ],
"properties": {
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"dependencies": {
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "type": "array" }
]
}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
]
},
"definitions": {
"additionalProperties": { "$ref": "#" }
},
"patternProperties": {
"additionalProperties": { "$ref": "#" }
},
"properties": {
"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" }
},
"media": {
"type": "object",
"hyperSchema": {
"allOf": [ { "$ref": "http://json-schema.org/draft/schema#/definitions/schema" } ],
"properties": {
"type": {
"description": "A media type, as described in RFC 2046",
"type": "string"
"additionalItems": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"additionalProperties": {
"anyOf": [
{ "type": "boolean" },
{ "$ref": "#" }
]
},
"dependencies": {
"additionalProperties": {
"anyOf": [
{ "$ref": "#" },
{ "type": "array" }
]
}
},
"items": {
"anyOf": [
{ "$ref": "#" },
{ "$ref": "#/definitions/schemaArray" }
]
},
"binaryEncoding": {
"description": "A content encoding scheme, as described in RFC 2045",
"definitions": {
"additionalProperties": { "$ref": "#" }
},
"patternProperties": {
"additionalProperties": { "$ref": "#" }
},
"properties": {
"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" }
},
"media": {
"type": "object",
"properties": {
"type": {
"description": "A media type, as described in RFC 2046",
"type": "string"
},
"binaryEncoding": {
"description": "A content encoding scheme, as described in RFC 2045",
"type": "string"
}
}
},
"readOnly": {
"description": "If true, indicates that the value of this property is controlled by the server.",
"type": "boolean",
"default": "false"
}
}
},
"readOnly": {
"description": "If true, indicates that the value of this property is controlled by the server.",
"type": "boolean",
"default": "false"
}
},
"oneOf": [
{
"allOf": [
{ "$ref": "#/definitions/hyperSchema" },
{ "$ref": "http://json-schema.org/drafts/schema#/definitions/notJsonReference" }
]
},
{ "$ref": "http://json-schema.org/drafts/schema#/definitions/jsonReference" }
],
"default": {},
"links": [
{
"rel": "self",
Expand Down
Loading