misp-taxonomies/schema.json

146 lines
3.0 KiB
JSON
Executable File

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