{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/webSocketProxyConfig.json",
    "type": "object",
    "title": "WebSocket Proxy Server configuration",
    "additionalProperties": false,
    "required": [
        "host",
        "port",
        "address",
        "upstream",
        "maxConnections",
        "maxClientConnections",
        "token"
    ],
    "properties": {
        "host": {
            "title": "Proxy server host",
            "type": "string",
            "default": "localhost",
            "example": "localhost",
            "anyOf": [
                {
                    "format": "hostname"
                },
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                }
            ]
        },
        "port": {
            "title": "Proxy server port",
            "type": "number",
            "default": 8801,
            "example": 8801,
            "minimum": 1,
            "maximum": 65535
        },
        "address": {
            "title": "Address of listening interface",
            "type": "string",
            "minLength": 1,
            "default": "127.0.0.1",
            "example": "0.0.0.0",
            "anyOf": [
                {
                    "format": "ipv4"
                },
                {
                    "format": "ipv6"
                }
            ]
        },
        "upstream": {
            "title": "Upstream address",
            "type": "string",
            "minLength": 1
        },
        "maxConnections": {
            "title": "Maximum connections",
            "description": "Maximum number of concurrent connections.",
            "type": "integer",
            "minimum": 0
        },
        "maxClientConnections": {
            "title": "Maximum client connections",
            "description": "Maximum number of concurrent connections for the same client.",
            "type": "integer",
            "minimum": 0
        },
        "token": {
            "title": "Authentication token",
            "type": "string"
        }
    }
}
