{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ydb-qdrant-tech/json-schema/ydb-qdrant-tech-design-feedback-request-schema.json",
  "title": "DesignFeedbackRequest",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/gravity-ai-openapi.json#/components/schemas/DesignFeedbackRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "conversationId",
    "turnId",
    "rating",
    "publish",
    "payload"
  ],
  "properties": {
    "conversationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "turnId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 160
    },
    "rating": {
      "type": "integer",
      "const": 1
    },
    "publish": {
      "type": "boolean",
      "const": true
    },
    "prompt": {
      "type": "string",
      "maxLength": 6000
    },
    "payload": {
      "$ref": "#/$defs/ComposedInterfacePayload"
    },
    "messages": {
      "type": "array",
      "maxItems": 12,
      "items": {}
    },
    "dataModel": {},
    "conversationContext": {
      "type": "object"
    }
  },
  "$defs": {
    "ComposedInterfacePayload": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "sequence",
        "surfaceId",
        "root",
        "nodes"
      ],
      "properties": {
        "sequence": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000
        },
        "surfaceId": {
          "type": "string",
          "minLength": 1,
          "maxLength": 80
        },
        "dataModel": {},
        "root": {
          "type": "object",
          "required": [
            "component"
          ],
          "properties": {
            "component": {
              "type": "string",
              "enum": [
                "Column",
                "Row"
              ]
            },
            "props": {
              "type": "object"
            }
          }
        },
        "nodes": {
          "type": "array",
          "maxItems": 120,
          "items": {
            "type": "object",
            "required": [
              "id",
              "component"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "parentId": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "order": {
                "type": "integer",
                "minimum": 0
              },
              "component": {
                "type": "string"
              },
              "props": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}