{
  "$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-explanation-role-request-schema.json",
  "title": "ExplanationRoleRequest",
  "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/ExplanationRoleRequest",
  "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+"
    },
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GenerationRoleFileEntry"
      },
      "description": "A list of role files to be explained."
    },
    "roleName": {
      "type": "string",
      "title": "Role name",
      "description": "The name of the role."
    },
    "model": {
      "type": "string",
      "default": ""
    },
    "focusOnFile": {
      "type": "string",
      "default": ""
    },
    "explanationId": {
      "type": "string",
      "format": "uuid",
      "title": "Explanation ID",
      "description": "A UUID that identifies the explanation."
    }
  },
  "required": [
    "files",
    "roleName"
  ],
  "$defs": {
    "GenerationRoleFileEntry": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string"
        },
        "content": {
          "type": "string"
        },
        "file_type": {
          "type": "string"
        }
      },
      "required": [
        "content",
        "file_type",
        "path"
      ]
    }
  }
}