{
    "$schema": "http://json-schema.org/draft-04/schema",
    "type": "object",
    "properties": {
        "$schema": {
            "type": "string"
        },
        "hierarchies": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/hierarchy"
            }
        }
    },
    "required": [
        "$schema",
        "hierarchies"
    ],
    "additionalProperties": false,
    "definitions": {
        "hierarchy": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "path": {
                    "type": "string"
                },
                "asPostfix": {
                    "type": "boolean"
                },
                "baseProperties": {
                    "$ref": "#/definitions/property"
                },
                "subTypes": {
                    "$ref": "#/definitions/subType"
                }
            },
            "required": [
                "name",
                "path",
                "asPostfix"
            ],
            "additionalProperties": false
        },
        "subType": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "superType": {
                    "oneOf": [
                        {
                            "type": "null"
                        },
                        {
                            "type": "string"
                        }
                    ]
                },
                "properties": {
                    "$ref": "#/definitions/property"
                }
            },
            "required": [
                "name",
                "superType",
                "properties"
            ],
            "additionalProperties": false
        },
        "property": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                }
            },
            "required": [
                "name"
            ],
            "additionalProperties": false
        }
    }
}