{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "description": "freifunk node schema",
    "type": "object",
    "properties": {
        "meta": {
            "type": "object"
        },
        "nodes": {
            "type": "array",
            "minItems": 1,
            "_uniqueItems": false,
            "items": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "macs": {
                        "type": "string"
                    },
                    "uptime": {
                        "type": "number"
                    },
                    "model": {
                        "type": "string"
                    },
                    "firmware": {
                        "type": "string"
                    },
                    "geo": {
                        "type": "array",
                        "minItems": 2,
                        "maxItems": 2
                    },
                    "clientcount": {
                        "type": "integer"
                    },
                    "flags": {
                        "type": "object",
                        "properties": {
                            "online": {
                                "type": "boolean"
                            },
                            "client": {
                                "type": "boolean"
                            },
                            "gateway": {
                                "type": "boolean"
                            },
                            "legacy": {
                                "type": "boolean"
                            }
                        }
                    }
                }
            }
        },
        "links": {
            "type": "object",
            "properties": {
                "people": {
                    "type": "array",
                    "minItems": 1,
                    "_uniqueItems": false,
                    "items": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "integer"
                            },
                            "source": {
                                "type": "integer"
                            },
                            "quality": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string"
                            },
                            "target": {
                                "type": "integer"
                            }
                        }
                    }
                }
            }
        }
    }
}