{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
        "ParentId",
        "RestApiId",
        "ChildResources"
    ],
    "properties": {
        "ParentId": {
            "type": "string",
            "pattern": "^[a-z0-9]+$"
        },
        "RestApiId": {
            "type": "string",
            "pattern": "^[a-z0-9]{10}$"
        },
        "ChildResources": {
            "$ref": "#/definitions/childresources"
        }
    },
    "additionalProperties": false,
    "definitions": {
        "childresources": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/childresource"
            }
        },
        "childresource": {
            "required": [
                "PathPart"
            ],
            "additionalProperties": false,
            "type": "object",
            "properties": {
                "PathPart": {
                    "type": "string",
                    "pattern": "^(\\{[\\w\\-]+\\})|([\\w\\-]+)$"
                },
                "ChildResources": {
                    "$ref": "#/definitions/childresources"
                }
            }
        }
    }
}