{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
        "description": {
            "type": "string",
            "maxLength": 32767
        },
        "route": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1024
        },
        "enabled": {
            "type": "boolean"
        },
        "method": {
            "type": "string",
            "enum": [
                "delete",
                "get",
                "options",
                "patch",
                "post",
                "put"
            ]
        },
        "access": {
            "type": "string",
            "enum": [
                "public",
                "authenticated",
                "group"
            ]
        },
        "endpointTags": {
            "type": "object",
            "patternProperties": {
                "^[0-9a-zA-Z_-]{1,255}$": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                }
            },
            "additionalProperties": false
        },
        "experienceGroupIds": {
            "type": "array",
            "items": {
                "type": "string",
                "pattern": "^[A-Fa-f\\d]{24}$"
            },
            "maxItems": 1000
        },
        "staticReply": {
            "oneOf": [
                {
                    "type": "object",
                    "properties": {
                        "value": {
                            "type": "string"
                        },
                        "statusCode": {
                            "type": "number",
                            "min": 100,
                            "max": 599,
                            "integer": true
                        },
                        "type": {
                            "type": "string",
                            "enum": [
                                "page",
                                "redirect"
                            ]
                        }
                    },
                    "required": [
                        "value",
                        "type"
                    ],
                    "additionalProperties": false
                },
                {
                    "type": "null"
                }
            ]
        },
        "unauthorizedReply": {
            "oneOf": [
                {
                    "type": "object",
                    "properties": {
                        "value": {
                            "type": "string"
                        },
                        "statusCode": {
                            "type": "number",
                            "min": 100,
                            "max": 599,
                            "integer": true
                        },
                        "type": {
                            "type": "string",
                            "enum": [
                                "page",
                                "redirect"
                            ]
                        }
                    },
                    "required": [
                        "value",
                        "type"
                    ],
                    "additionalProperties": false
                },
                {
                    "type": "null"
                }
            ]
        }
    },
    "additionalProperties": false,
    "required": [
        "route",
        "method"
    ]
}