UNPKG

@adobe/jsonschema2md

Version:

Validate and document complex JSON Schemas the easy way.

101 lines 3.15 kB
{ "meta:license": [ "Copyright 2017 Adobe Systems Incorporated. All rights reserved.", "This file is licensed to you under the Apache License, Version 2.0 (the 'License');", "you may not use this file except in compliance with the License. You may obtain a copy", "of the License at http://www.apache.org/licenses/LICENSE-2.0" ], "$schema": "http://json-schema.org/draft-06/schema#", "$id": "https://example.com/schemas/arrays", "title": "Arrays", "type": "object", "description": "This is an example schema with examples for multiple array types and their constraints.", "properties": { "list": { "type": "array", "description": "This is an array", "items": { "type": "string" } }, "listlist": { "type": "array", "description": "This is an array of arrays", "items": { "type": "array" } }, "stringlistlist": { "type": "array", "description": "This is an array of arrays of strings", "items": { "type": "array", "items": { "type": "string" } } }, "intlist": { "type": "array", "description": "This is an array", "items": { "type": "integer" }, "maxItems": 10, "minItems": 1 }, "boollist": { "type": "array", "description": "This is an array", "items": { "type": "boolean" }, "minItems": 1 }, "numlist": { "type": "array", "description": "This is an array", "items": { "type": "number", "minimum": 10 }, "maxItems": 10 }, "coordinatelist": { "type": "array", "description": "This is an array of coordinates in three-dimensional space.", "items": { "type": "array", "minItems": 3, "maxItems": 3, "description": "A coordinate, specified by `x`, `y`, and `z` values", "items": { "type": "number", "minimum": 0, "maximum": 10 } }, "maxItems": 10 }, "objectlist": { "type": "array", "description": "An array of simple objects", "items": { "type": "object", "required": [ "a" ], "properties": { "a": { "type": "string", "description": "The a property" }, "b": { "type": "integer", "description": "The b property" } } } } } }