{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "Mapping": {
            "additionalProperties": false,
            "anyOf": [
                {
                    "required": [
                        "remediation_advice"
                    ]
                },
                {
                    "required": [
                        "references"
                    ]
                }
            ],
            "properties": {
                "id": {
                    "$ref": "#/definitions/VRTid"
                },
                "references": {
                    "$ref": "#/definitions/References"
                },
                "remediation_advice": {
                    "$ref": "#/definitions/RemediationAdvice"
                }
            },
            "required": [
                "id"
            ],
            "type": "object"
        },
        "MappingMetadata": {
            "properties": {
                "default": {
                    "type": "null"
                },
                "keys": {
                    "items": {
                        "enum": [
                            "remediation_advice",
                            "references"
                        ],
                        "type": "string"
                    },
                    "minItems": 2,
                    "type": "array",
                    "_uniqueItems": true
                }
            },
            "required": [
                "default",
                "keys"
            ],
            "type": "object"
        },
        "MappingParent": {
            "additionalProperties": false,
            "properties": {
                "children": {
                    "items": {
                        "anyOf": [
                            {
                                "$ref": "#/definitions/MappingParent"
                            },
                            {
                                "$ref": "#/definitions/Mapping"
                            }
                        ]
                    },
                    "type": "array"
                },
                "id": {
                    "$ref": "#/definitions/VRTid"
                },
                "references": {
                    "$ref": "#/definitions/References"
                },
                "remediation_advice": {
                    "$ref": "#/definitions/RemediationAdvice"
                }
            },
            "required": [
                "id",
                "children"
            ],
            "type": "object"
        },
        "References": {
            "items": {
                "pattern": "^http[s]?://.*$",
                "type": "string"
            },
            "minItems": 1,
            "type": "array",
            "_uniqueItems": true
        },
        "RemediationAdvice": {
            "type": "string"
        },
        "VRTid": {
            "pattern": "^[a-z_]*$",
            "type": "string"
        }
    },
    "description": "Mapping from the Vulnerability Rating Taxonomy to Remediation Advice",
    "properties": {
        "content": {
            "items": {
                "anyOf": [
                    {
                        "$ref": "#/definitions/MappingParent"
                    },
                    {
                        "$ref": "#/definitions/Mapping"
                    }
                ]
            },
            "type": "array"
        },
        "metadata": {
            "$ref": "#/definitions/MappingMetadata"
        }
    },
    "required": [
        "metadata",
        "content"
    ],
    "title": "VRT to Remediation Advice",
    "type": "object"
}