github.com/alecthomas/jsonschema@v0.0.0-20220216202328-9eeeec9d044b/fixtures/fully_qualified.json (about) 1 { 2 "$schema": "http://json-schema.org/draft-04/schema#", 3 "$ref": "#/definitions/github.com/alecthomas/jsonschema.TestUser", 4 "definitions": { 5 "github.com/alecthomas/jsonschema.GrandfatherType": { 6 "required": [ 7 "family_name" 8 ], 9 "properties": { 10 "family_name": { 11 "type": "string" 12 } 13 }, 14 "additionalProperties": false, 15 "type": "object" 16 }, 17 "github.com/alecthomas/jsonschema.TestUser": { 18 "required": [ 19 "some_base_property", 20 "some_base_property_yaml", 21 "grand", 22 "SomeUntaggedBaseProperty", 23 "PublicNonExported", 24 "id", 25 "name", 26 "password", 27 "TestFlag", 28 "age", 29 "email", 30 "Baz", 31 "color", 32 "roles", 33 "raw" 34 ], 35 "properties": { 36 "some_base_property": { 37 "type": "integer" 38 }, 39 "some_base_property_yaml": { 40 "type": "integer" 41 }, 42 "grand": { 43 "$schema": "http://json-schema.org/draft-04/schema#", 44 "$ref": "#/definitions/github.com/alecthomas/jsonschema.GrandfatherType" 45 }, 46 "SomeUntaggedBaseProperty": { 47 "type": "boolean" 48 }, 49 "PublicNonExported": { 50 "type": "integer" 51 }, 52 "id": { 53 "type": "integer" 54 }, 55 "name": { 56 "maxLength": 20, 57 "minLength": 1, 58 "pattern": ".*", 59 "type": "string", 60 "title": "the name", 61 "description": "this is a property", 62 "default": "alex", 63 "examples": [ 64 "joe", 65 "lucy" 66 ], 67 "readOnly": true 68 }, 69 "password": { 70 "type": "string", 71 "writeOnly": true 72 }, 73 "friends": { 74 "items": { 75 "type": "integer" 76 }, 77 "type": "array", 78 "description": "list of IDs, omitted when empty" 79 }, 80 "tags": { 81 "patternProperties": { 82 ".*": { 83 "additionalProperties": true 84 } 85 }, 86 "type": "object" 87 }, 88 "TestFlag": { 89 "type": "boolean" 90 }, 91 "birth_date": { 92 "type": "string", 93 "format": "date-time" 94 }, 95 "website": { 96 "type": "string", 97 "format": "uri" 98 }, 99 "network_address": { 100 "type": "string", 101 "format": "ipv4" 102 }, 103 "photo": { 104 "type": "string", 105 "media": { 106 "binaryEncoding": "base64" 107 } 108 }, 109 "photo2": { 110 "type": "string", 111 "media": { 112 "binaryEncoding": "base64" 113 } 114 }, 115 "feeling": { 116 "oneOf": [ 117 { 118 "type": "string" 119 }, 120 { 121 "type": "integer" 122 } 123 ] 124 }, 125 "age": { 126 "maximum": 120, 127 "exclusiveMaximum": true, 128 "minimum": 18, 129 "exclusiveMinimum": true, 130 "type": "integer" 131 }, 132 "email": { 133 "type": "string", 134 "format": "email" 135 }, 136 "Baz": { 137 "type": "string", 138 "foo": [ 139 "bar", 140 "bar1" 141 ], 142 "hello": "world" 143 }, 144 "color": { 145 "enum": [ 146 "red", 147 "green", 148 "blue" 149 ], 150 "type": "string" 151 }, 152 "rank": { 153 "enum": [ 154 1, 155 2, 156 3 157 ], 158 "type": "integer" 159 }, 160 "mult": { 161 "enum": [ 162 1, 163 1.5, 164 2 165 ], 166 "type": "number" 167 }, 168 "roles": { 169 "items": { 170 "enum": [ 171 "admin", 172 "moderator", 173 "user" 174 ], 175 "type": "string" 176 }, 177 "type": "array" 178 }, 179 "priorities": { 180 "items": { 181 "enum": [ 182 -1, 183 0, 184 1 185 ], 186 "type": "integer" 187 }, 188 "type": "array" 189 }, 190 "offsets": { 191 "items": { 192 "enum": [ 193 1.570796, 194 3.141592, 195 6.283185 196 ], 197 "type": "number" 198 }, 199 "type": "array" 200 }, 201 "raw": { 202 "additionalProperties": true 203 } 204 }, 205 "additionalProperties": false, 206 "type": "object" 207 } 208 } 209 }