1{ 2 "title": "A JSON Schema for the Google API Discovery Format.", 3 "id": "http://openapis.org/v3/schema.json#", 4 "$schema": "http://json-schema.org/draft-04/schema#", 5 "type": "object", 6 "description": "This is the root document object of the Discovery Format.", 7 "required": [ 8 "kind", 9 "discoveryVersion" 10 ], 11 "additionalProperties": false, 12 "properties": { 13 "kind": { 14 "type": "string" 15 }, 16 "discoveryVersion": { 17 "type": "string" 18 }, 19 "id": { 20 "type": "string" 21 }, 22 "name": { 23 "type": "string" 24 }, 25 "version": { 26 "type": "string" 27 }, 28 "revision": { 29 "type": "string" 30 }, 31 "title": { 32 "type": "string" 33 }, 34 "description": { 35 "type": "string" 36 }, 37 "icons": { 38 "$ref": "#/definitions/icons" 39 }, 40 "documentationLink": { 41 "type": "string" 42 }, 43 "labels": { 44 "type": "array", 45 "items": { 46 "type": "string" 47 } 48 }, 49 "protocol": { 50 "type": "string" 51 }, 52 "baseUrl": { 53 "type": "string" 54 }, 55 "basePath": { 56 "type": "string" 57 }, 58 "rootUrl": { 59 "type": "string" 60 }, 61 "servicePath": { 62 "type": "string" 63 }, 64 "batchPath": { 65 "type": "string" 66 }, 67 "parameters": { 68 "$ref": "#/definitions/parameters" 69 }, 70 "auth": { 71 "$ref": "#/definitions/auth" 72 }, 73 "features": { 74 "type": "array", 75 "items": { 76 "type": "string" 77 } 78 }, 79 "schemas": { 80 "$ref": "#/definitions/schemas" 81 }, 82 "methods": { 83 "$ref": "#/definitions/methods" 84 }, 85 "resources": { 86 "$ref": "#/definitions/resources" 87 }, 88 "etag": { 89 "type": "string" 90 }, 91 "ownerDomain": { 92 "type": "string" 93 }, 94 "ownerName": { 95 "type": "string" 96 }, 97 "version_module": { 98 "type": "boolean" 99 }, 100 "canonicalName": { 101 "type": "string" 102 }, 103 "fullyEncodeReservedExpansion": { 104 "type": "boolean" 105 }, 106 "packagePath": { 107 "type": "string" 108 } 109 }, 110 "definitions": { 111 "icons": { 112 "type": "object", 113 "description": "Icons that represent the API.", 114 "required": [ 115 "x16", 116 "x32" 117 ], 118 "additionalProperties": false, 119 "properties": { 120 "x16": { 121 "type": "string" 122 }, 123 "x32": { 124 "type": "string" 125 } 126 } 127 }, 128 "parameters": { 129 "type": "object", 130 "additionalProperties": { 131 "$ref": "#/definitions/parameter" 132 } 133 }, 134 "parameter": { 135 "type": "object", 136 "properties": { 137 "id": { 138 "type": "string" 139 }, 140 "type": { 141 "type": "string" 142 }, 143 "$ref": { 144 "type": "string" 145 }, 146 "description": { 147 "type": "string" 148 }, 149 "default": { 150 "type": "string" 151 }, 152 "required": { 153 "type": "boolean" 154 }, 155 "format": { 156 "type": "string" 157 }, 158 "pattern": { 159 "type": "string" 160 }, 161 "minimum": { 162 "type": "string" 163 }, 164 "maximum": { 165 "type": "string" 166 }, 167 "enum": { 168 "type": "array", 169 "items": { 170 "type": "string" 171 } 172 }, 173 "enumDescriptions": { 174 "type": "array", 175 "items": { 176 "type": "string" 177 } 178 }, 179 "repeated": { 180 "type": "boolean" 181 }, 182 "location": { 183 "type": "string" 184 }, 185 "properties": { 186 "$ref": "#/definitions/schemas" 187 }, 188 "additionalProperties": { 189 "$ref": "#/definitions/schema" 190 }, 191 "items": { 192 "$ref": "#/definitions/schema" 193 }, 194 "annotations": { 195 "$ref": "#/definitions/annotations" 196 } 197 } 198 }, 199 "auth": { 200 "type": "object", 201 "properties": { 202 "oauth2": { 203 "type": "object", 204 "properties": { 205 "scopes": { 206 "$ref": "#/definitions/scopes" 207 } 208 } 209 } 210 } 211 }, 212 "schemas": { 213 "type": "object", 214 "additionalProperties": { 215 "$ref": "#/definitions/schema" 216 } 217 }, 218 "schema": { 219 "type": "object", 220 "properties": { 221 "id": { 222 "type": "string" 223 }, 224 "type": { 225 "type": "string" 226 }, 227 "description": { 228 "type": "string" 229 }, 230 "default": { 231 "type": "string" 232 }, 233 "required": { 234 "type": "boolean" 235 }, 236 "format": { 237 "type": "string" 238 }, 239 "pattern": { 240 "type": "string" 241 }, 242 "minimum": { 243 "type": "string" 244 }, 245 "maximum": { 246 "type": "string" 247 }, 248 "enum": { 249 "type": "array", 250 "items": { 251 "type": "string" 252 } 253 }, 254 "enumDescriptions": { 255 "type": "array", 256 "items": { 257 "type": "string" 258 } 259 }, 260 "repeated": { 261 "type": "boolean" 262 }, 263 "location": { 264 "type": "string" 265 }, 266 "properties": { 267 "$ref": "#/definitions/schemas" 268 }, 269 "additionalProperties": { 270 "$ref": "#/definitions/schema" 271 }, 272 "items": { 273 "$ref": "#/definitions/schema" 274 }, 275 "$ref": { 276 "type": "string" 277 }, 278 "annotations": { 279 "$ref": "#/definitions/annotations" 280 }, 281 "readOnly": { 282 "type": "boolean" 283 } 284 } 285 }, 286 "methods": { 287 "type": "object", 288 "additionalProperties": { 289 "$ref": "#/definitions/method" 290 } 291 }, 292 "method": { 293 "type": "object", 294 "properties": { 295 "id": { 296 "type": "string" 297 }, 298 "path": { 299 "type": "string" 300 }, 301 "httpMethod": { 302 "type": "string" 303 }, 304 "description": { 305 "type": "string" 306 }, 307 "parameters": { 308 "$ref": "#/definitions/parameters" 309 }, 310 "parameterOrder": { 311 "type": "array", 312 "items": { 313 "type": "string" 314 } 315 }, 316 "request": { 317 "type": "object", 318 "properties": { 319 "$ref": { 320 "type": "string" 321 }, 322 "parameterName": { 323 "type": "string" 324 } 325 } 326 }, 327 "response": { 328 "type": "object", 329 "properties": { 330 "$ref": { 331 "type": "string" 332 } 333 } 334 }, 335 "scopes": { 336 "type": "array", 337 "items": { 338 "type": "string" 339 } 340 }, 341 "supportsMediaDownload": { 342 "type": "boolean" 343 }, 344 "supportsMediaUpload": { 345 "type": "boolean" 346 }, 347 "useMediaDownloadService": { 348 "type": "boolean" 349 }, 350 "mediaUpload": { 351 "$ref": "#/definitions/mediaUpload" 352 }, 353 "supportsSubscription": { 354 "type": "boolean" 355 }, 356 "flatPath": { 357 "type": "string" 358 }, 359 "etagRequired": { 360 "type": "boolean" 361 } 362 } 363 }, 364 "resources": { 365 "type": "object", 366 "additionalProperties": { 367 "$ref": "#/definitions/resource" 368 } 369 }, 370 "resource": { 371 "type": "object", 372 "properties": { 373 "methods": { 374 "$ref": "#/definitions/methods" 375 }, 376 "resources": { 377 "$ref": "#/definitions/resources" 378 } 379 } 380 }, 381 "annotations": { 382 "type": "object", 383 "properties": { 384 "required": { 385 "type": "array", 386 "items": { 387 "type": "string" 388 } 389 } 390 } 391 }, 392 "scopes": { 393 "type": "object", 394 "additionalProperties": { 395 "$ref": "#/definitions/scope" 396 } 397 }, 398 "scope": { 399 "type": "object", 400 "properties": { 401 "description": { 402 "type": "string" 403 } 404 } 405 }, 406 "mediaUpload": { 407 "type": "object", 408 "properties": { 409 "accept": { 410 "type": "array", 411 "items": { 412 "type": "string" 413 } 414 }, 415 "maxSize": { 416 "type": "string" 417 }, 418 "protocols": { 419 "type": "object", 420 "properties": { 421 "simple": { 422 "type": "object", 423 "properties": { 424 "multipart": { 425 "type": "boolean" 426 }, 427 "path": { 428 "type": "string" 429 } 430 } 431 }, 432 "resumable": { 433 "type": "object", 434 "properties": { 435 "multipart": { 436 "type": "boolean" 437 }, 438 "path": { 439 "type": "string" 440 } 441 } 442 } 443 } 444 }, 445 "supportsSubscription": { 446 "type": "boolean" 447 } 448 } 449 } 450 } 451} 452