{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/docupanda/json-schema/docupanda-schema-schema.json",
  "title": "Schema",
  "description": "Public-facing representation of DocuPipeSchema.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/docupanda-schema-api-openapi.yml#/components/schemas/Schema",
  "properties": {
    "schemaId": {
      "type": "string",
      "title": "Schema ID",
      "description": "Unique identifier of the schema."
    },
    "schemaName": {
      "type": "string",
      "title": "Schema Name",
      "description": "Name of the schema.",
      "default": "unnamed"
    },
    "origin": {
      "type": "string",
      "title": "Origin",
      "description": "Where this schema was created."
    },
    "sourceDocumentId": {
      "type": "string",
      "title": "Source Document ID",
      "description": "Document ID used as the primary sample when this schema was created."
    },
    "sourceDocumentName": {
      "type": "string",
      "title": "Source Document Name",
      "description": "Document name used as the primary sample when this schema was created."
    },
    "sourceChatId": {
      "type": "string",
      "title": "Source Chat ID",
      "description": "Chat session that originally created this schema, if any."
    },
    "fieldPreview": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Field Preview",
      "description": "Short list of schema field names for picker/list rows."
    },
    "jsonSchema": {
      "additionalProperties": true,
      "type": "object",
      "title": "JSON Schema",
      "description": "The JSON schema that defines the structure of the data."
    },
    "guidelines": {
      "type": "string",
      "title": "Guidelines",
      "description": "Guidelines for the schema."
    },
    "jobId": {
      "type": "string",
      "title": "Job ID",
      "description": "Unique identifier of the job that last modified the schema."
    },
    "timestamp": {
      "type": "string",
      "title": "Timestamp",
      "description": "Timestamp of the schema creation."
    }
  },
  "type": "object",
  "required": [
    "schemaId"
  ]
}