Updated
May 18, 2018, 9:50:57 AM

{
    "$schema": "http://json-schema.org/schema#",
    "additionalProperties": false,
    "defs": {
        "entry": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "colour": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "expanded": {
                        "type": "string"
                    },
                    "numerical_value": {
                        "type": "number"
                    },
                    "required": [
                        "value"
                    ],
                    "value": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "type": "array",
            "uniqueItems": true
        },
        "predicates": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "colour": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "exclusive": {
                        "type": "boolean"
                    },
                    "expanded": {
                        "type": "string"
                    },
                    "numerical_value": {
                        "type": "number"
                    },
                    "required": [
                        "value"
                    ],
                    "value": {
                        "type": "string"
                    }
                },
                "type": "object"
            },
            "type": "array",
            "uniqueItems": true
        },
        "values": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "entry": {
                        "$ref": "#/defs/entry"
                    },
                    "predicate": {
                        "type": "string"
                    }
                },
                "required": [
                    "predicate"
                ],
                "type": "object"
            },
            "type": "array",
            "uniqueItems": true
        }
    },
    "id": "https://www.github.com/MISP/misp-taxonomies/schema.json",
    "properties": {
        "description": {
            "type": "string"
        },
        "exclusive": {
            "type": "boolean"
        },
        "expanded": {
            "type": "string"
        },
        "namespace": {
            "type": "string"
        },
        "predicates": {
            "$ref": "#/defs/predicates"
        },
        "refs": {
            "items": {
                "type": "string"
            },
            "type": "array",
            "uniqueItems": true
        },
        "type": {
            "items": {
                "enum": [
                    "org",
                    "user",
                    "attribute",
                    "event"
                ],
                "type": "string"
            },
            "type": "array",
            "uniqueItems": true
        },
        "values": {
            "$ref": "#/defs/values"
        },
        "version": {
            "type": "integer"
        }
    },
    "required": [
        "namespace",
        "description",
        "version",
        "predicates"
    ],
    "title": "Validator for misp-taxonomies",
    "type": "object"
}