{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/networkConnections.json",
    "type": "array",
    "title": "Network connections",
    "items": {
        "type": "object",
        "title": "Network connection",
        "example": {
            "type": "802-3-ethernet",
            "name": "Wired connection 1",
            "uuid": "c8fb6f29-ec85-4ff5-b1bb-1d1761196d16",
            "interfaceName": "eth0",
            "isActive": true,
            "state": "activated"
        },
        "additionalProperties": false,
        "required": [
            "name",
            "uuid",
            "type",
            "interfaceName"
        ],
        "properties": {
            "name": {
                "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/name"
            },
            "uuid": {
                "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/uuid"
            },
            "type": {
                "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/type"
            },
            "interfaceName": {
                "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/interfaceName"
            },
            "isActive": {
                "type": "boolean",
                "title": "Is the connection active?",
                "example": true
            },
            "state": {
                "type": "string",
                "enum": [
                    "activated",
                    "activating",
                    "deactivating",
                    "deactivated",
                    "unknown"
                ],
                "title": "Connection state",
                "example": "activated"
            },
            "wifi": {
                "type": "object",
                "title": "Wi-Fi connection",
                "example": {
                    "ssid": "WIFI MAGDA",
                    "mode": "infrastructure",
                    "security": "wpa-psk"
                },
                "additionalProperties": false,
                "required": [
                    "ssid",
                    "mode",
                    "security"
                ],
                "properties": {
                    "bssids": {
                        "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/wifi/bssids"
                    },
                    "ssid": {
                        "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/wifi/ssid"
                    },
                    "mode": {
                        "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/wifi/mode"
                    },
                    "security": {
                        "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/networkConnection.json#/definitions/wifi/security/type"
                    }
                }
            }
        }
    }
}
