{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/myarchivist-ai/json-schema/myarchivist-ai-character-read-product-schema.json",
  "title": "CharacterReadProduct",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/myarchivist-ai-openapi.json#/components/schemas/CharacterReadProduct",
  "properties": {
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Updated At"
    },
    "id": {
      "type": "string",
      "title": "Id"
    },
    "character_name": {
      "type": "string",
      "maxLength": 255,
      "minLength": 1,
      "title": "Character Name"
    },
    "character_alias": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Character Alias"
    },
    "character_aliases": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Character Aliases"
    },
    "player_name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Player Name"
    },
    "player_handle": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 255
        },
        {
          "type": "null"
        }
      ],
      "title": "Player Handle"
    },
    "description": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Description"
    },
    "backstory": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Backstory"
    },
    "type": {
      "type": "string",
      "maxLength": 50,
      "title": "Type",
      "default": "PC"
    },
    "image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image"
    },
    "campaign_id": {
      "type": "string",
      "title": "Campaign Id"
    },
    "player": {
      "anyOf": [
        {
          "$ref": "#/$defs/CharacterPlayer"
        },
        {
          "type": "null"
        }
      ]
    },
    "tcg_image": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tcg Image"
    },
    "merge": {
      "type": "boolean",
      "title": "Merge"
    },
    "approved": {
      "type": "boolean",
      "title": "Approved",
      "default": false
    },
    "pending": {
      "type": "boolean",
      "title": "Pending",
      "default": false
    },
    "tag_count": {
      "type": "integer",
      "title": "Tag Count",
      "default": 0
    },
    "properties_updated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Properties Updated At"
    },
    "speaker_user": {
      "anyOf": [
        {
          "$ref": "#/$defs/CharacterUserSummary"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "created_at",
    "id",
    "character_name",
    "campaign_id",
    "merge"
  ],
  "$defs": {
    "CharacterPlayer": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "handle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Handle"
        },
        "roles": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Roles"
        },
        "created_at": {
          "type": "string",
          "format": "date-time",
          "title": "Created At"
        },
        "campaign_id": {
          "type": "string",
          "title": "Campaign Id"
        }
      },
      "type": "object",
      "required": [
        "id",
        "created_at",
        "campaign_id"
      ],
      "title": "CharacterPlayer"
    },
    "CharacterUserSummary": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "given_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Given Name"
        },
        "family_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Family Name"
        },
        "discord_username": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Discord Username"
        },
        "picture": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Picture"
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "CharacterUserSummary"
    }
  }
}