{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://stellaops.example/schemas/chromium-post.schema.json",
  "type": "object",
  "required": [
    "postId",
    "title",
    "detailUrl",
    "published",
    "cves",
    "platforms",
    "versions",
    "references"
  ],
  "properties": {
    "postId": {
      "type": "string",
      "minLength": 1
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "detailUrl": {
      "type": "string",
      "format": "uri"
    },
    "published": {
      "type": "string",
      "format": "date-time"
    },
    "updated": {
      "type": ["string", "null"],
      "format": "date-time"
    },
    "summary": {
      "type": ["string", "null"]
    },
    "cves": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "type": "string",
        "pattern": "^CVE-\\d{4}-\\d{4,}$"
      }
    },
    "platforms": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "versions": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "object",
        "required": ["platform", "channel", "version"],
        "properties": {
          "platform": {
            "type": "string",
            "minLength": 1
          },
          "channel": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 4
          }
        }
      }
    },
    "references": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["url", "kind"],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          },
          "kind": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": ["string", "null"]
          }
        }
      }
    }
  }
}
