{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Network device discovery schema",
    "type": "object",
    "properties": {
        "model": {
            "type": "string"
        },
        "vendor": {
            "type": "string"
        },
        "serial": {
            "type": "string"
        },
        "tags": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "interfaces": {
            "type": "object",
            "patternProperties": {
                "^.*$": {
                    "type": "object",
                    "properties": {
                        "type": {
                            "type": "string"
                        },
                        "ip": {
                            "type": "object",
                            "patternProperties": {
                                "^(?:[0-9]{1,3}\\.){3}[0-9]{1,3}$": {
                                    "type": "string"
                                }
                            },
                            "additionalProperties": false
                        }
                    }
                }
            },
            "additionalProperties": false
        },
        "router_ips": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    }
}