DocumentObject.php
11 months ago
Validation.php
1 year ago
checkout-document-schema.json
11 months ago
json-schema-draft-07.json
1 year ago
json-schema-draft-07.json
173 lines
| 1 | { |
| 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | "$id": "http://json-schema.org/draft-07/schema#", |
| 4 | "title": "Core schema meta-schema", |
| 5 | "definitions": { |
| 6 | "schemaArray": { |
| 7 | "type": "array", |
| 8 | "minItems": 1, |
| 9 | "items": { "$ref": "#" } |
| 10 | }, |
| 11 | "nonNegativeInteger": { |
| 12 | "type": "integer", |
| 13 | "minimum": 0 |
| 14 | }, |
| 15 | "nonNegativeIntegerDefault0": { |
| 16 | "allOf": [ |
| 17 | { "$ref": "#/definitions/nonNegativeInteger" }, |
| 18 | { "default": 0 } |
| 19 | ] |
| 20 | }, |
| 21 | "simpleTypes": { |
| 22 | "enum": [ |
| 23 | "array", |
| 24 | "boolean", |
| 25 | "integer", |
| 26 | "null", |
| 27 | "number", |
| 28 | "object", |
| 29 | "string" |
| 30 | ] |
| 31 | }, |
| 32 | "stringArray": { |
| 33 | "type": "array", |
| 34 | "items": { "type": "string" }, |
| 35 | "uniqueItems": true, |
| 36 | "default": [] |
| 37 | } |
| 38 | }, |
| 39 | "type": ["object", "boolean"], |
| 40 | "properties": { |
| 41 | "$id": { |
| 42 | "type": "string", |
| 43 | "format": "uri-reference" |
| 44 | }, |
| 45 | "$schema": { |
| 46 | "type": "string", |
| 47 | "format": "uri" |
| 48 | }, |
| 49 | "$ref": { |
| 50 | "type": "string", |
| 51 | "format": "uri-reference" |
| 52 | }, |
| 53 | "$comment": { |
| 54 | "type": "string" |
| 55 | }, |
| 56 | "title": { |
| 57 | "type": "string" |
| 58 | }, |
| 59 | "description": { |
| 60 | "type": "string" |
| 61 | }, |
| 62 | "default": true, |
| 63 | "readOnly": { |
| 64 | "type": "boolean", |
| 65 | "default": false |
| 66 | }, |
| 67 | "writeOnly": { |
| 68 | "type": "boolean", |
| 69 | "default": false |
| 70 | }, |
| 71 | "examples": { |
| 72 | "type": "array", |
| 73 | "items": true |
| 74 | }, |
| 75 | "multipleOf": { |
| 76 | "type": "number", |
| 77 | "exclusiveMinimum": 0 |
| 78 | }, |
| 79 | "maximum": { |
| 80 | "type": "number" |
| 81 | }, |
| 82 | "exclusiveMaximum": { |
| 83 | "type": "number" |
| 84 | }, |
| 85 | "minimum": { |
| 86 | "type": "number" |
| 87 | }, |
| 88 | "exclusiveMinimum": { |
| 89 | "type": "number" |
| 90 | }, |
| 91 | "maxLength": { "$ref": "#/definitions/nonNegativeInteger" }, |
| 92 | "minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, |
| 93 | "pattern": { |
| 94 | "type": "string", |
| 95 | "format": "regex" |
| 96 | }, |
| 97 | "additionalItems": { "$ref": "#" }, |
| 98 | "items": { |
| 99 | "anyOf": [ |
| 100 | { "$ref": "#" }, |
| 101 | { "$ref": "#/definitions/schemaArray" } |
| 102 | ], |
| 103 | "default": true |
| 104 | }, |
| 105 | "maxItems": { "$ref": "#/definitions/nonNegativeInteger" }, |
| 106 | "minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, |
| 107 | "uniqueItems": { |
| 108 | "type": "boolean", |
| 109 | "default": false |
| 110 | }, |
| 111 | "contains": { "$ref": "#" }, |
| 112 | "maxProperties": { "$ref": "#/definitions/nonNegativeInteger" }, |
| 113 | "minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" }, |
| 114 | "required": { "$ref": "#/definitions/stringArray" }, |
| 115 | "additionalProperties": { "$ref": "#" }, |
| 116 | "definitions": { |
| 117 | "type": "object", |
| 118 | "additionalProperties": { "$ref": "#" }, |
| 119 | "default": {} |
| 120 | }, |
| 121 | "properties": { |
| 122 | "type": "object", |
| 123 | "additionalProperties": { "$ref": "#" }, |
| 124 | "default": {} |
| 125 | }, |
| 126 | "patternProperties": { |
| 127 | "type": "object", |
| 128 | "additionalProperties": { "$ref": "#" }, |
| 129 | "propertyNames": { "format": "regex" }, |
| 130 | "default": {} |
| 131 | }, |
| 132 | "dependencies": { |
| 133 | "type": "object", |
| 134 | "additionalProperties": { |
| 135 | "anyOf": [ |
| 136 | { "$ref": "#" }, |
| 137 | { "$ref": "#/definitions/stringArray" } |
| 138 | ] |
| 139 | } |
| 140 | }, |
| 141 | "propertyNames": { "$ref": "#" }, |
| 142 | "const": true, |
| 143 | "enum": { |
| 144 | "type": "array", |
| 145 | "items": true, |
| 146 | "minItems": 1, |
| 147 | "uniqueItems": true |
| 148 | }, |
| 149 | "type": { |
| 150 | "anyOf": [ |
| 151 | { "$ref": "#/definitions/simpleTypes" }, |
| 152 | { |
| 153 | "type": "array", |
| 154 | "items": { "$ref": "#/definitions/simpleTypes" }, |
| 155 | "minItems": 1, |
| 156 | "uniqueItems": true |
| 157 | } |
| 158 | ] |
| 159 | }, |
| 160 | "format": { "type": "string" }, |
| 161 | "contentMediaType": { "type": "string" }, |
| 162 | "contentEncoding": { "type": "string" }, |
| 163 | "if": { "$ref": "#" }, |
| 164 | "then": { "$ref": "#" }, |
| 165 | "else": { "$ref": "#" }, |
| 166 | "allOf": { "$ref": "#/definitions/schemaArray" }, |
| 167 | "anyOf": { "$ref": "#/definitions/schemaArray" }, |
| 168 | "oneOf": { "$ref": "#/definitions/schemaArray" }, |
| 169 | "not": { "$ref": "#" } |
| 170 | }, |
| 171 | "default": true |
| 172 | } |
| 173 |