{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "description": {
      "type": "string",
      "maxLength": 2000
    },
    "content": {
      "type": "string",
      "minLength": 1
    },
    "authoringMode": {
      "default": "manual",
      "type": "string",
      "enum": ["manual","ai"]
    },
    "aiPrompt": {
      "default": null,
      "anyOf": [{"type":"string","maxLength":4000},{"type":"null"}]
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 200
    },
    "projectId": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    }
  },
  "required": [
    "name",
    "content",
    "idempotencyKey",
    "projectId"
  ],
  "additionalProperties": false
}
