{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/DataStream",
  "title": "DataStream",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Unique data stream name",
      "example": "Example Title"
    },
    "description": {
      "type": "string",
      "description": "Stream description",
      "example": "A sample description."
    },
    "status": {
      "type": "string",
      "description": "Current stream status",
      "enum": [
        "active",
        "inactive",
        "error"
      ],
      "example": "active"
    },
    "source": {
      "type": "object",
      "description": "Source configuration",
      "properties": {
        "trailName": {
          "type": "string",
          "description": "Source trail file name"
        },
        "extractName": {
          "type": "string",
          "description": "Source extract process name"
        },
        "beginPosition": {
          "type": "string",
          "description": "Begin position in the trail"
        }
      },
      "example": "example_value"
    },
    "target": {
      "type": "object",
      "description": "Target distribution configuration",
      "properties": {
        "type": {
          "type": "string",
          "description": "Target type for data distribution",
          "enum": [
            "kafka",
            "rest",
            "ocistreaming",
            "goldengate"
          ]
        },
        "uri": {
          "type": "string",
          "description": "Target connection URI"
        },
        "topicName": {
          "type": "string",
          "description": "Topic or channel name for the target"
        },
        "format": {
          "type": "string",
          "description": "Output message format",
          "enum": [
            "json",
            "avro",
            "protobuf"
          ]
        }
      },
      "example": "example_value"
    },
    "filters": {
      "type": "array",
      "description": "Table and operation filters",
      "items": {
        "type": "object",
        "properties": {
          "schema": {
            "type": "string",
            "description": "Schema filter pattern"
          },
          "table": {
            "type": "string",
            "description": "Table filter pattern"
          },
          "operations": {
            "type": "array",
            "description": "Operations to include",
            "items": {
              "type": "string",
              "enum": [
                "INSERT",
                "UPDATE",
                "DELETE",
                "TRUNCATE"
              ]
            }
          }
        }
      },
      "example": []
    },
    "asyncApiSpec": {
      "type": "string",
      "description": "Path to the AsyncAPI specification",
      "example": "example_value"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "example": "2026-01-15T10:30:00Z"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "example": "2026-01-15T10:30:00Z"
    }
  }
}