Updated
Oct 11, 2021, 12:29:08 PM

{
    "$schema": "https://json-schema.org/draft/2020-12/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"
}