misp-taxonomies/schema.json

114 lines
2.2 KiB
JSON
Raw Normal View History

2017-02-13 12:01:05 +01:00
{
"$schema": "http://json-schema.org/schema#",
"title": "Validator for misp-taxonomies",
"id": "https://www.github.com/MISP/misp-taxonomies/schema.json",
"defs": {
"predicate": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "string"
},
"colour": {
"type": "string"
},
"description": {
"type": "string"
},
"numerical_value": {
"type": "number"
},
"expanded": {
"type": "string"
}
},
"required": [
"value"
]
},
"entry": {
"type": "object",
"additionalProperties": false,
"properties": {
"predicate": {
"type": "string"
},
"entry": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"expanded": {
"type": "string"
},
"numerical_value": {
"type": "number"
}
},
"required": [
"value"
]
}
}
}
},
"required": [
"predicate"
]
},
2017-02-13 12:01:05 +01:00
"type": "object",
"additionalProperties": false,
2017-02-13 12:01:05 +01:00
"properties": {
"namespace": {
"type": "string"
},
"expanded": {
"type": "string"
},
2017-02-13 12:01:05 +01:00
"description": {
"type": "string"
},
"version": {
"type": "integer"
},
"predicates": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"$ref": "#/defs/predicate"
2017-02-13 12:01:05 +01:00
}
},
"values": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "object",
"$ref": "#/defs/entry"
}
},
"refs": {
"type": "array",
"uniqueItems": true,
"items": {
"type": "string"
2017-02-13 12:01:05 +01:00
}
}
},
"required": [
"namespace",
"description",
"version",
"predicates"
2017-02-13 12:01:05 +01:00
]
}