{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "additionalProperties": false,
    "definitions": {
        "asset": {
            "properties": {
                "name": {
                    "$ref": "#/definitions/aws_identifier"
                },
                "permissions": {
                    "items": {
                        "type": "string"
                    },
                    "type": "array"
                },
                "region": {
                    "oneOf": [
                        {
                            "items": {
                                "$ref": "#/definitions/aws_identifier"
                            },
                            "type": "array"
                        },
                        {
                            "$ref": "#/definitions/aws_identifier"
                        }
                    ]
                },
                "service": {
                    "$ref": "#/definitions/identifier"
                }
            },
            "required": [
                "service",
                "name",
                "permissions"
            ],
            "type": "object"
        },
        "aws_identifier": {
            "minLength": 1,
            "pattern": "^([\\w\\d].*|\\*)$",
            "type": "string"
        },
        "identifier": {
            "minLength": 1,
            "pattern": "^[\\w\\d][\\w\\d-]*$",
            "type": "string"
        },
        "person": {
            "properties": {
                "email": {
                    "_format": "email",
                    "type": "string"
                },
                "name": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "url": {
                    "_format": "uri",
                    "type": "string"
                }
            },
            "required": [
                "name"
            ],
            "type": [
                "object",
                "string"
            ]
        },
        "version": {
            "maxLength": 10,
            "minLength": 1,
            "pattern": "^(\\*|\\d{4}\\-\\d{2}\\-\\d{2})$",
            "type": "string"
        }
    },
    "properties": {
        "assets": {
            "items": {
                "$ref": "#/definitions/asset"
            },
            "type": "array"
        },
        "author": {
            "$ref": "#/definitions/person"
        },
        "client": {
            "type": "string"
        },
        "configuration": {
            "type": "object"
        },
        "contributors": {
            "items": {
                "$ref": "#/definitions/person"
            },
            "type": "array"
        },
        "description": {
            "type": "string"
        },
        "documentation": {
            "type": "string"
        },
        "health": {
            "type": "string"
        },
        "keywords": {
            "items": {
                "type": "string"
            },
            "type": "array"
        },
        "maintainers": {
            "items": {
                "$ref": "#/definitions/person"
            },
            "type": "array"
        },
        "manage": {
            "type": "string"
        },
        "name": {
            "$ref": "#/definitions/identifier",
            "maxLength": 64
        },
        "policy": {
            "items": {
                "$ref": "#/definitions/asset"
            },
            "type": "array"
        },
        "region": {
            "oneOf": [
                {
                    "items": {
                        "$ref": "#/definitions/identifier"
                    },
                    "type": "array"
                },
                {
                    "$ref": "#/definitions/identifier"
                }
            ]
        },
        "repository": {
            "properties": {
                "type": {
                    "type": "string"
                },
                "url": {
                    "_format": "uri",
                    "type": "string"
                }
            },
            "type": [
                "object",
                "string"
            ]
        },
        "resources": {
            "patternProperties": {
                ".+": {
                    "$ref": "#/definitions/version"
                }
            },
            "type": "object"
        },
        "universe": {
            "$ref": "#/definitions/identifier"
        }
    },
    "required": [
        "name"
    ],
    "type": "object"
}