{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "required": ["vulnerabilities"],
  "properties": {
    "resultsPerPage": { "type": "integer", "minimum": 0 },
    "startIndex": { "type": "integer", "minimum": 0 },
    "totalResults": { "type": "integer", "minimum": 0 },
    "vulnerabilities": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["cve"],
        "properties": {
          "cve": {
            "type": "object",
            "required": ["id", "published", "lastModified", "descriptions"],
            "properties": {
              "id": { "type": "string" },
              "published": { "type": "string", "format": "date-time" },
              "lastModified": { "type": "string", "format": "date-time" },
              "vulnStatus": { "type": "string" },
              "sourceIdentifier": { "type": "string" },
              "descriptions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": ["lang", "value"],
                  "properties": {
                    "lang": { "type": "string" },
                    "value": { "type": "string" }
                  }
                }
              },
              "references": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": ["url"],
                  "properties": {
                    "url": { "type": "string", "format": "uri" },
                    "source": { "type": "string" },
                    "tags": {
                      "type": "array",
                      "items": { "type": "string" }
                    }
                  }
                }
              },
              "metrics": {
                "type": "object",
                "properties": {
                  "cvssMetricV2": { "$ref": "#/definitions/cvssMetricArray" },
                  "cvssMetricV30": { "$ref": "#/definitions/cvssMetricArray" },
                  "cvssMetricV31": { "$ref": "#/definitions/cvssMetricArray" }
                }
              },
              "configurations": {
                "type": "object",
                "properties": {
                  "nodes": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "cpeMatch": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "vulnerable": { "type": "boolean" },
                              "criteria": { "type": "string" }
                            },
                            "required": ["criteria"],
                            "additionalProperties": true
                          }
                        }
                      },
                      "additionalProperties": true
                    }
                  }
                },
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true,
  "definitions": {
    "cvssMetricArray": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "cvssData": {
            "type": "object",
            "required": ["vectorString", "baseScore", "baseSeverity"],
            "properties": {
              "vectorString": { "type": "string" },
              "baseScore": { "type": "number" },
              "baseSeverity": { "type": "string" }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      }
    }
  }
}
