{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://cre-acquisition-orchestrator.local/schemas/common/flag.schema.json",
  "title": "Structured Flag",
  "type": "object",
  "required": [
    "id",
    "severity",
    "category",
    "message",
    "impact",
    "owner",
    "status",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "severity": {
      "$ref": "enums.schema.json#/$defs/severity"
    },
    "category": {
      "type": "string",
      "minLength": 1
    },
    "message": {
      "type": "string",
      "minLength": 1
    },
    "impact": {
      "type": "string",
      "minLength": 1
    },
    "owner": {
      "type": "string",
      "minLength": 1
    },
    "status": {
      "$ref": "enums.schema.json#/$defs/flagStatus"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "evidencePath": {
      "type": "string"
    }
  },
  "additionalProperties": false
}
