{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/red-hat-ansible-automation-platform/json-schema/red-hat-ansible-automation-platform-feedback-request-schema.json",
  "title": "FeedbackRequest",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/red-hat-ansible-automation-platform-ai-api-openapi.yml#/components/schemas/FeedbackRequest",
  "type": "object",
  "properties": {
    "ansibleExtensionVersion": {
      "type": "string",
      "title": "Ansible vscode/vscodium extension version",
      "description": "User's installed Ansible extension version, in format vMAJOR.MINOR.PATCH",
      "pattern": "v?\\d+\\.\\d+\\.\\d+"
    },
    "inlineSuggestion": {
      "$ref": "#/$defs/InlineSuggestionFeedback"
    },
    "issueFeedback": {
      "$ref": "#/$defs/IssueFeedback"
    },
    "metadata": {
      "$ref": "#/$defs/Metadata"
    },
    "model": {
      "type": "string"
    },
    "playbookExplanationFeedback": {
      "$ref": "#/$defs/PlaybookExplanationFeedback"
    },
    "playbookGenerationFeedback": {
      "$ref": "#/$defs/PlaybookGenerationFeedback"
    },
    "playbookGenerationAction": {
      "$ref": "#/$defs/PlaybookGenerationAction"
    },
    "roleGenerationAction": {
      "$ref": "#/$defs/RoleGenerationAction"
    },
    "sentimentFeedback": {
      "$ref": "#/$defs/SentimentFeedback"
    },
    "suggestionQualityFeedback": {
      "$ref": "#/$defs/SuggestionQualityFeedback"
    },
    "chatFeedback": {
      "$ref": "#/$defs/ChatFeedback"
    }
  },
  "$defs": {
    "ChatFeedback": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string",
          "title": "Prompt",
          "description": "Prompt being sent to the LLM."
        },
        "response": {
          "$ref": "#/$defs/ChatResponse"
        },
        "sentiment": {
          "enum": [
            "0",
            "1",
            "NOT_LIKE"
          ],
          "type": "string",
          "description": "* `0` - LIKE\n* `1` - 1\n* `NOT_LIKE` - NOT_LIKE",
          "x-spec-enum-id": "e7383390620e7763"
        }
      },
      "required": [
        "query",
        "response",
        "sentiment"
      ]
    },
    "ChatResponse": {
      "type": "object",
      "properties": {
        "conversation_id": {
          "type": "string",
          "description": "An ID that identifies the particular conversation is being requested for."
        },
        "referenced_documents": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ReferencedDocuments"
          }
        },
        "response": {
          "type": "string"
        },
        "truncated": {
          "type": "boolean"
        }
      },
      "required": [
        "conversation_id",
        "response",
        "truncated"
      ]
    },
    "InlineSuggestionFeedback": {
      "type": "object",
      "properties": {
        "userActionTime": {
          "type": "number",
          "format": "double"
        },
        "documentUri": {
          "type": "string"
        },
        "action": {
          "enum": [
            "0",
            "1",
            "2"
          ],
          "type": "string",
          "description": "* `0` - ACCEPTED\n* `1` - REJECTED\n* `2` - IGNORED",
          "x-spec-enum-id": "4c6feea9f2cd2c84"
        },
        "error": {
          "type": "string"
        },
        "suggestionId": {
          "type": "string",
          "format": "uuid",
          "title": "Suggestion ID",
          "description": "A UUID that identifies a suggestion."
        }
      },
      "required": [
        "action",
        "suggestionId"
      ]
    },
    "IssueFeedback": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "bug-report",
            "feature-request"
          ],
          "type": "string",
          "description": "* `bug-report` - Bug Report\n* `feature-request` - Feature Request",
          "x-spec-enum-id": "230f84d522c678e0"
        },
        "title": {
          "type": "string",
          "title": "Issue title",
          "description": "The title of the issue."
        },
        "description": {
          "type": "string",
          "title": "Issue description",
          "description": "The description of the issue."
        }
      },
      "required": [
        "description",
        "title",
        "type"
      ]
    },
    "Metadata": {
      "type": "object",
      "properties": {
        "ansibleExtensionVersion": {
          "type": "string",
          "title": "Ansible vscode/vscodium extension version",
          "description": "User's installed Ansible extension version, in format vMAJOR.MINOR.PATCH",
          "pattern": "v?\\d+\\.\\d+\\.\\d+"
        }
      }
    },
    "PlaybookExplanationFeedback": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "0",
            "1",
            "2"
          ],
          "type": "string",
          "description": "* `0` - ACCEPTED\n* `1` - REJECTED\n* `2` - IGNORED",
          "x-spec-enum-id": "4c6feea9f2cd2c84"
        },
        "explanationId": {
          "type": "string",
          "format": "uuid",
          "title": "Explanation ID",
          "description": "A UUID that identifies the playbook explanation."
        }
      },
      "required": [
        "action",
        "explanationId"
      ]
    },
    "PlaybookGenerationAction": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "0",
            "1",
            "2",
            "3"
          ],
          "type": "string",
          "description": "* `0` - OPEN\n* `1` - CLOSE_CANCEL\n* `2` - TRANSITION\n* `3` - CLOSE_ACCEPT",
          "x-spec-enum-id": "693e8c4f477a387e"
        },
        "wizardId": {
          "type": "string",
          "format": "uuid",
          "title": "wizard ID",
          "description": "A UUID that identifies the UI session."
        },
        "fromPage": {
          "type": "integer",
          "title": "page of origin",
          "description": "A number that indicate the page of origin"
        },
        "toPage": {
          "type": "integer",
          "title": "destination page",
          "description": "A number that indicate the destination page"
        }
      },
      "required": [
        "action",
        "wizardId"
      ]
    },
    "PlaybookGenerationFeedback": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "0",
            "1",
            "2"
          ],
          "type": "string",
          "description": "* `0` - ACCEPTED\n* `1` - REJECTED\n* `2` - IGNORED",
          "x-spec-enum-id": "4c6feea9f2cd2c84"
        },
        "wizardId": {
          "type": "string",
          "format": "uuid",
          "title": "Outline ID",
          "description": "A UUID that identifies the UI session."
        }
      },
      "required": [
        "action",
        "wizardId"
      ]
    },
    "ReferencedDocuments": {
      "type": "object",
      "properties": {
        "docs_url": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "docs_url",
        "title"
      ]
    },
    "RoleGenerationAction": {
      "type": "object",
      "properties": {
        "action": {
          "enum": [
            "0",
            "1",
            "2",
            "3"
          ],
          "type": "string",
          "description": "* `0` - OPEN\n* `1` - CLOSE_CANCEL\n* `2` - TRANSITION\n* `3` - CLOSE_ACCEPT",
          "x-spec-enum-id": "693e8c4f477a387e"
        },
        "wizardId": {
          "type": "string",
          "format": "uuid",
          "title": "wizard ID",
          "description": "A UUID that identifies the UI session."
        },
        "fromPage": {
          "type": "integer",
          "title": "page of origin",
          "description": "A number that indicate the page of origin"
        },
        "toPage": {
          "type": "integer",
          "title": "destination page",
          "description": "A number that indicate the destination page"
        }
      },
      "required": [
        "action",
        "wizardId"
      ]
    },
    "SentimentFeedback": {
      "type": "object",
      "properties": {
        "value": {
          "type": "integer",
          "maximum": 5,
          "minimum": 1
        },
        "feedback": {
          "type": "string",
          "title": "Free form text feedback",
          "description": "Free form text feedback describing the reason for sentiment value."
        }
      },
      "required": [
        "feedback",
        "value"
      ]
    },
    "SuggestionQualityFeedback": {
      "type": "object",
      "properties": {
        "prompt": {
          "type": "string",
          "title": "File Content used as context",
          "description": "File Content till end of task name description before cursor position."
        },
        "providedSuggestion": {
          "type": "string",
          "title": "Provided Model suggestion",
          "description": "Inline suggestion from model as shared by user for given prompt."
        },
        "expectedSuggestion": {
          "type": "string",
          "title": "Expected Model suggestion",
          "description": "Suggestion expected by the user."
        },
        "additionalComment": {
          "type": "string",
          "title": "Additional Comment",
          "description": "Additional comment describing why the                    change was required in suggestion."
        }
      },
      "required": [
        "expectedSuggestion",
        "prompt",
        "providedSuggestion"
      ]
    }
  }
}