{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/artifactshare-com/json-schema/artifactshare-com-comments-list-response-schema.json",
  "title": "CommentsListResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/artifactshare-com-openapi.json#/components/schemas/CommentsListResponse",
  "type": "object",
  "properties": {
    "artifact_id": {
      "type": "string",
      "minLength": 1
    },
    "share_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "comments": {
      "type": "array",
      "maxItems": 50,
      "items": {
        "$ref": "#/$defs/CommentThreadWindow"
      }
    },
    "has_more": {
      "type": "boolean"
    }
  },
  "required": [
    "artifact_id",
    "comments"
  ],
  "$defs": {
    "CommentThreadWindow": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "status": {
          "enum": [
            "open",
            "resolved"
          ]
        },
        "created_at": {
          "type": "string",
          "minLength": 1
        },
        "updated_at": {
          "type": "string",
          "minLength": 1
        },
        "resolved_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "message_count": {
          "type": "integer",
          "minimum": 0
        },
        "reply_count": {
          "type": "integer",
          "minimum": 0
        },
        "older_cursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "anchor": {
          "type": "object"
        },
        "messages": {
          "type": "array",
          "maxItems": 51,
          "description": "Current first message plus latest three replies, or at most 50 requested replies.",
          "items": {
            "type": "object",
            "properties": {
              "message_id": {
                "type": "string",
                "minLength": 1
              },
              "body": {
                "type": "string"
              },
              "author_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "author_email": {
                "type": "string",
                "minLength": 1
              },
              "agent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "minLength": 1
              },
              "updated_at": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "message_id",
              "body",
              "author_name",
              "author_email",
              "agent",
              "created_at",
              "updated_at"
            ]
          }
        }
      },
      "required": [
        "id",
        "status",
        "created_at",
        "updated_at",
        "resolved_at",
        "message_count",
        "reply_count",
        "older_cursor",
        "anchor",
        "messages"
      ]
    }
  }
}