{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quotewise-io/json-schema/quotewise-io-originator-detail-schema.json",
  "title": "OriginatorDetail",
  "description": "AI-agent optimized detailed originator information.\n\nProvides comprehensive originator data for agent context building\nand detailed entity information workflows with proper language localization.\nIncludes Wikidata metadata and WikiQuote URLs for full transparency.\n\nProjection split (qw-ocfp1): this public read exposes curated projections —\nwikidata_id, social_media, wikiquote_urls, aliases_i18n, descriptions_i18n —\nnot the raw ``metadata`` / ``social_media_i18n`` JSONB. Moderators verifying\nthat a write persisted should read ``curation-originator-retrieve``, which\nreturns the raw fields.",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quotewise-io-openapi.yml#/components/schemas/OriginatorDetail",
  "type": "object",
  "properties": {
    "full_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Complete name as it should be displayed",
      "maxLength": 255
    },
    "sort_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "Name formatted for sorting (Last, First)",
      "maxLength": 255
    },
    "slug": {
      "type": [
        "string",
        "null"
      ],
      "description": "Public originator identifier for API requests",
      "maxLength": 255
    },
    "kind": {
      "enum": [
        "person",
        "character",
        "organization",
        "work",
        "tradition",
        "lore",
        "anonymous",
        "collective",
        "agent"
      ],
      "type": "string",
      "x-spec-enum-id": "d388c2966d62d701",
      "description": "Entity classification: person, character, organization, work, tradition, lore, collective, anonymous, agent. 'anonymous' covers both reserved records - 'Anonymous' (authorship research exhausted) and 'Unknown' (research pending); the two are distinguished by slug, not by kind.\n\n* `person` - Person\n* `character` - Character\n* `organization` - Organization\n* `work` - Work\n* `tradition` - Tradition\n* `lore` - Lore\n* `anonymous` - Anonymous\n* `collective` - Collective\n* `agent` - Agent"
    },
    "nationality": {
      "type": "string",
      "description": "Originator nationality for context",
      "maxLength": 100
    },
    "profession": {
      "type": "string",
      "description": "Primary profession or role",
      "maxLength": 255
    },
    "descriptions_i18n": {
      "description": "Localized descriptions by language (e.g., {'en': 'Theoretical physicist', 'de': 'Physiker'})",
      "readOnly": true
    },
    "biography": {
      "type": "string",
      "description": "Brief biography for agent context"
    },
    "quote_count": {
      "type": "integer",
      "description": "Number of quotes attributed to this originator - for agent resource planning",
      "readOnly": true
    },
    "birth_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date of birth if known"
    },
    "birth_date_edtf": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Birth date in EDTF format (handles BCE, approximation)"
    },
    "death_date": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Date of death if applicable"
    },
    "death_date_edtf": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "Death date in EDTF format (handles BCE, approximation)"
    },
    "living": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "Whether the originator is living"
    },
    "language_display": {
      "type": "string",
      "description": "Human-readable language name for agent context",
      "readOnly": true
    },
    "language_metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Language metadata for AI agent workflows",
      "readOnly": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Originator record creation timestamp"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Last modification timestamp for agent state management"
    },
    "originator_url": {
      "type": "string",
      "description": "Direct URL to originator detail view - for agent navigation workflows",
      "readOnly": true
    },
    "web_url": {
      "type": "string",
      "description": "Direct link to originator page on quotewise.io",
      "readOnly": true
    },
    "related_originators": {
      "type": "array",
      "items": {},
      "description": "Similar or related originators for agent discovery workflows",
      "readOnly": true
    },
    "members": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "readOnly": true,
      "description": "Originators linked member_of this one (a collective's members): [{slug, full_name}]. Retrieve only."
    },
    "member_of": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        }
      },
      "readOnly": true,
      "description": "Collectives this originator is linked member_of: [{slug, full_name}]. Retrieve only."
    },
    "agent_metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Additional metadata for agent workflow optimization",
      "readOnly": true
    },
    "wikidata_id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Wikidata Q-ID for cross-referencing (e.g., 'Q937')",
      "readOnly": true
    },
    "wikiquote_urls": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "WikiQuote page URLs by language (e.g., {'en': 'https://en.wikiquote.org/wiki/...'}",
      "readOnly": true
    },
    "social_media": {
      "type": "object",
      "additionalProperties": {},
      "description": "Social media profiles (Wikipedia, Twitter, etc.) from social_media_i18n",
      "readOnly": true
    },
    "aliases_i18n": {
      "description": "Aliases by language, each with name/type/wikidata_prop (e.g., {'grc': [{'name': 'Παναίτιος', 'wikidata_prop': 'P1559'}]})",
      "readOnly": true
    }
  },
  "required": [
    "agent_metadata",
    "aliases_i18n",
    "birth_date_edtf",
    "created_at",
    "death_date_edtf",
    "descriptions_i18n",
    "language_display",
    "language_metadata",
    "member_of",
    "members",
    "originator_url",
    "quote_count",
    "related_originators",
    "social_media",
    "updated_at",
    "web_url",
    "wikidata_id",
    "wikiquote_urls"
  ]
}