Skip to the content.

Draft 06 - User Example

A schema demonstrating some draft 06 features

$iddraft-06-animal.yml
$schemahttp://json-schema.org/draft-06/schema#

Properties

NameType
animalTypeString
canFlyBoolean

Example

{
    "animalType": "Bear",
    "canFly": false
}

Example

{
    "animalType": "Bat",
    "canFly": true
}

animalType

Title Animal Type
TypeString
Required Yes

canFly

Title Can Fly
TypeBoolean
Required Yes

Schema

{
    "$id": "draft-06-animal.yml",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "title": "Draft 06 - User Example",
    "description": "A schema demonstrating some draft 06 features",
    "examples": [
        {
            "animalType": "Bear",
            "canFly": false
        },
        {
            "animalType": "Bat",
            "canFly": true
        }
    ],
    "required": [
        "animalType",
        "canFly"
    ],
    "type": "object",
    "properties": {
        "animalType": {
            "type": "string",
            "title": "Animal Type"
        },
        "canFly": {
            "type": "boolean",
            "title": "Can Fly"
        }
    }
}