{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "description": "ParaDrop chute wireless AP configuration",
    "type": "object",
    "properties": {
        "type": {
            "type": "string",
            "description": "Network type, must be wifi for an AP",
            "pattern": "wifi"
        },
        "intfName": {
            "type": "string",
            "description": "Name of the network interface inside the chute",
            "pattern": "[a-z][a-z0-9]*"
        },
        "mode": {
            "type": "string",
            "description": "WiFi interface mode",
            "pattern": "ap"
        },
        "dhcp": {
            "description": "DHCP server configuration",
            "type": "object",
            "properties": {
                "leasetime": {
                    "type": "string",
                    "description": "Duration of client leases, e.g. 2h"
                },
                "limit": {
                    "type": "integer",
                    "description": "Size of address range beginning at start value.",
                    "minimum": 1
                },
                "start": {
                    "type": "integer",
                    "description": "Starting offset for address assignment.",
                    "minimum": 0
                },
                "relay": {
                    "type": "string",
                    "description": "Address of a DHCP server if this server will be acting as a relay agent (experimental)"
                }
            }
        },
        "ipv4_network": {
            "type": "string",
            "description": "Request specific IP network in slash notation"
        },
        "ssid": {
            "type": "string",
            "description": "ESSID to broadcast",
            "maxLength": 32
        },
        "key": {
            "type": "string",
            "description": "Password required from clients to connect",
            "minLength": 8
        },
        "options": {
            "type": "object",
            "description": "Additional options to pass to the AP",
            "properties": {
                "nasid": {
                    "type": "string",
                    "description": "NAS ID for RADIUS"
                },
                "acct_server": {
                    "type": "string",
                    "description": "RADIUS accounting server"
                },
                "acct_secret": {
                    "type": "string",
                    "description": "RADIUS accounting secret"
                },
                "acct_interval": {
                    "type": "integer",
                    "description": "RADIUS accounting update interval (seconds)",
                    "minimum": 1
                },
                "hidden": {
                    "type": "boolean",
                    "description": "Disable broadcasting the ESSID in beacons"
                },
                "isolate": {
                    "type": "boolean",
                    "description": "Disable forwarding traffic between connected clients"
                },
                "maxassoc": {
                    "type": "integer",
                    "description": "Maximum number of associated clients"
                }
            }
        },
        "dns": {
            "type": "array",
            "description": "List of DNS servers to advertise to connected clients",
            "items": {
                "type": "string"
            }
        },
        "l3bridge": {
            "type": "string",
            "description": "Bridge to another network using ARP proxying (experimental)"
        },
        "requests": {
            "type": "object",
            "description": "Hardware features required by the chute when assigning a physical interface",
            "properties": {
                "hwmode": {
                    "type": "string",
                    "description": "Required operating mode (11b for old hardware, 11g for 2.4 GHz, 11a for 5 GHz)",
                    "enum": [
                        "11b",
                        "11g",
                        "11a"
                    ]
                }
            }
        }
    },
    "required": [
        "type",
        "intfName"
    ]
}