{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/comp-ai/json-schema/comp-ai-comment-response-dto-schema.json",
  "title": "CommentResponseDto",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/comp-ai-comments-api-openapi.yml#/components/schemas/CommentResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the comment"
    },
    "content": {
      "type": "string",
      "description": "Comment content"
    },
    "author": {
      "description": "Comment author information",
      "allOf": [
        {
          "$ref": "#/$defs/AuthorResponseDto"
        }
      ]
    },
    "attachments": {
      "description": "Attachment metadata (URLs generated on-demand)",
      "type": "array",
      "items": {
        "$ref": "#/$defs/AttachmentMetadataDto"
      }
    },
    "createdAt": {
      "format": "date-time",
      "type": "string",
      "description": "Comment creation timestamp"
    }
  },
  "required": [
    "id",
    "content",
    "author",
    "attachments",
    "createdAt"
  ],
  "$defs": {
    "AttachmentMetadataDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the attachment"
        },
        "name": {
          "type": "string",
          "description": "Original filename"
        },
        "type": {
          "type": "string",
          "description": "File type/MIME type"
        },
        "createdAt": {
          "format": "date-time",
          "type": "string",
          "description": "Upload timestamp"
        }
      },
      "required": [
        "id",
        "name",
        "type",
        "createdAt"
      ]
    },
    "AuthorResponseDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "User ID"
        },
        "name": {
          "type": "string",
          "description": "User name"
        },
        "email": {
          "type": "string",
          "description": "User email"
        },
        "image": {
          "type": [
            "object",
            "null"
          ],
          "description": "User profile image URL"
        },
        "deactivated": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the user is deactivated"
        }
      },
      "required": [
        "id",
        "name",
        "email",
        "image",
        "deactivated"
      ]
    }
  }
}