{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/glassflow/json-schema/glassflow-post-api-sources-request-schema.json",
  "title": "PostApiSourcesRequest",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/glassflow-openapi-generated.yml#/components/schemas/PostApiSourcesRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "source name"
    },
    "connector": {
      "type": "string",
      "description": "connector type, e.g., \"reference\""
    },
    "config": {
      "type": "object",
      "description": "configuration object for the source"
    },
    "config.attachments": {
      "type": "array",
      "description": "list the documents, each materialized into one always‑surfaced event"
    },
    "config.attachments[].name": {
      "type": "string",
      "description": "file name / title"
    },
    "config.attachments[].format": {
      "type": "string",
      "description": "document format (json | csv | md | txt)"
    },
    "config.attachments[].content": {
      "type": "string",
      "description": "the document’s text"
    },
    "config.attachments[].labels": {
      "type": "object",
      "description": "entity labels, e.g. { \"service\": \"tares\" }"
    },
    "config.labels": {
      "type": "array",
      "description": "label definitions for reads to correlate on"
    },
    "config.labels[].name": {
      "type": "string",
      "description": "label name"
    },
    "config.labels[].field": {
      "type": "string",
      "description": "field that provides the label value"
    }
  },
  "required": [
    "name",
    "connector",
    "config",
    "config.attachments",
    "config.attachments[].name",
    "config.attachments[].format",
    "config.attachments[].content",
    "config.attachments[].labels",
    "config.labels[].name",
    "config.labels[].field"
  ]
}