{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/frasma-org/json-schema/frasma-org-conversation-response-schema.json",
  "title": "ConversationResponse",
  "x-generated": "2026-11-09",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/frasma-org-openapi.json#/components/schemas/ConversationResponse",
  "type": "object",
  "required": [
    "conversationId",
    "messages"
  ],
  "properties": {
    "conversationId": {
      "type": "string",
      "format": "uuid"
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ChatMessage"
      }
    }
  },
  "$defs": {
    "ChatMessage": {
      "type": "object",
      "required": [
        "role",
        "content"
      ],
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "user",
            "assistant"
          ]
        },
        "content": {
          "type": "string",
          "maxLength": 30000,
          "description": "User messages are limited to 2000 characters; assistant messages may include a reviewed structured form up to 30000 characters."
        }
      }
    }
  }
}