{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://www.52north.org/schema/json/ExceptionReport#",
    "type": "object",
    "required": [
        "version",
        "exceptions"
    ],
    "properties": {
        "version": {
            "type": "string"
        },
        "exceptions": {
            "type": "array",
            "minItems": 1,
            "items": {
                "$ref": "#/definitions/exception"
            }
        }
    },
    "definitions": {
        "exception": {
            "type": "object",
            "required": [
                "code"
            ],
            "properties": {
                "code": {
                    "type": "string",
                    "enum": [
                        "InvalidParameterValue",
                        "InvalidUpdateSequence",
                        "MissingParameterValue",
                        "NoApplicableCode",
                        "OperationNotSupported",
                        "OptionNotSupported",
                        "VersionNegotiationFailed",
                        "InvalidRequest",
                        "RequestExtensionNotSupported",
                        "ResponseExceedsSizeLimit",
                        "InvalidPropertyOfferingCombination"
                    ]
                },
                "locator": {
                    "type": "string"
                },
                "text": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "array",
                            "minItems": 1,
                            "items": {
                                "type": "string"
                            }
                        }
                    ]
                }
            }
        }
    }
}