{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://securitystackcompare.com/data/ratings.schema.json",
  "title": "Security Stack Compare public open-rating dataset",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "$schema",
    "dataset",
    "version",
    "lastModified",
    "publisher",
    "methodologyUrl",
    "disclaimer",
    "scoreScale",
    "scoreDimensions",
    "ratings"
  ],
  "properties": {
    "$schema": {
      "const": "https://securitystackcompare.com/data/ratings.schema.json"
    },
    "dataset": {
      "const": "security-stack-compare-open-ratings"
    },
    "version": {
      "type": "string"
    },
    "lastModified": {
      "type": "string",
      "format": "date"
    },
    "publisher": {
      "const": "Security Stack Compare"
    },
    "methodologyUrl": {
      "type": "string",
      "format": "uri"
    },
    "disclaimer": {
      "type": "string",
      "minLength": 40
    },
    "scoreScale": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "minimum",
        "maximum",
        "meaning"
      ],
      "properties": {
        "minimum": {
          "const": 0
        },
        "maximum": {
          "const": 100
        },
        "meaning": {
          "type": "string"
        }
      }
    },
    "scoreDimensions": {
      "type": "array",
      "minItems": 8,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "key",
          "label"
        ],
        "properties": {
          "key": {
            "enum": [
              "compliance",
              "evidence",
              "ops",
              "remediation",
              "smb",
              "price",
              "byok",
              "region"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 3
          }
        }
      }
    },
    "ratings": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "vendorId",
          "vendorName",
          "vendorUrl",
          "overallScore",
          "confidence",
          "lastReviewed",
          "vendorResponseStatus",
          "evidenceSourceTypes",
          "scoreBasis",
          "scoreClaims",
          "knownGaps",
          "bestFitUseCases",
          "notEnoughFor",
          "sourceLinks",
          "challengeUrl"
        ],
        "properties": {
          "vendorId": {
            "type": "string"
          },
          "vendorName": {
            "type": "string"
          },
          "vendorUrl": {
            "type": "string",
            "format": "uri"
          },
          "overallScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "confidence": {
            "enum": [
              "high",
              "medium",
              "directional"
            ]
          },
          "lastReviewed": {
            "type": "string",
            "format": "date"
          },
          "vendorResponseStatus": {
            "enum": [
              "transparencyNoteOnFile",
              "notOnFile"
            ]
          },
          "evidenceSourceTypes": {
            "type": "array",
            "minItems": 1,
            "items": {
              "enum": [
                "publicDocs",
                "pricingPage",
                "vendorStatement",
                "practitionerSignal",
                "editorialInference"
              ]
            }
          },
          "scoreBasis": {
            "type": "string",
            "minLength": 40
          },
          "scoreClaims": {
            "type": "array",
            "minItems": 8,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "scoreKey",
                "label",
                "value",
                "receipts"
              ],
              "properties": {
                "scoreKey": {
                  "enum": [
                    "compliance",
                    "evidence",
                    "ops",
                    "remediation",
                    "smb",
                    "price",
                    "byok",
                    "region"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 3
                },
                "value": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 100
                },
                "receipts": {
                  "type": "array",
                  "minItems": 1,
                  "items": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "type",
                      "confidence"
                    ],
                    "properties": {
                      "type": {
                        "enum": [
                          "publicDocs",
                          "pricingPage",
                          "vendorStatement",
                          "practitionerSignal",
                          "editorialInference"
                        ]
                      },
                      "confidence": {
                        "enum": [
                          "high",
                          "medium",
                          "directional"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "knownGaps": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "bestFitUseCases": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "notEnoughFor": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string"
            }
          },
          "sourceLinks": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "label",
                "url"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "challengeUrl": {
            "type": "string"
          }
        }
      }
    }
  }
}
