{
  "$id": "https://appscamdb.com/data/schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "apps": {
      "items": {
        "properties": {
          "app_id": {
            "pattern": "^[0-9]{9,11}$",
            "type": "string"
          }
        },
        "required": [
          "app_id",
          "cases",
          "availability"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "assets": {
      "items": {
        "properties": {
          "bytes": {
            "minimum": 1,
            "type": "integer"
          },
          "sha256": {
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          },
          "type": {
            "enum": [
              "icon",
              "screenshot",
              "dossier"
            ]
          },
          "url": {
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "asset_id",
          "type",
          "url",
          "sha256",
          "bytes"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "case_id": {
      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
      "type": "string"
    },
    "findings": {
      "type": "array"
    },
    "published_at": {
      "format": "date",
      "type": "string"
    },
    "relationships": {
      "type": "array"
    },
    "schema_version": {
      "const": "1.0"
    },
    "sources": {
      "type": "array"
    },
    "updated_at": {
      "format": "date",
      "type": "string"
    }
  },
  "required": [
    "schema_version",
    "case_id",
    "title",
    "report_url",
    "published_at",
    "updated_at",
    "apps",
    "findings",
    "assets",
    "sources",
    "relationships"
  ],
  "title": "App Scam DB case v1.0",
  "type": "object"
}
