{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "FuzzyFileSearchResponse",
  "type": "object",
  "required": [
    "files"
  ],
  "properties": {
    "files": {
      "type": "array",
      "items": {
        "$ref": "#/definitions/FuzzyFileSearchResult"
      }
    }
  },
  "definitions": {
    "FuzzyFileSearchMatchType": {
      "type": "string",
      "enum": [
        "file",
        "directory"
      ]
    },
    "FuzzyFileSearchResult": {
      "description": "Superset of [`codex_file_search::FileMatch`]",
      "type": "object",
      "required": [
        "file_name",
        "match_type",
        "path",
        "root",
        "score"
      ],
      "properties": {
        "file_name": {
          "type": "string"
        },
        "indices": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "integer",
            "format": "uint32",
            "minimum": 0.0
          }
        },
        "match_type": {
          "$ref": "#/definitions/FuzzyFileSearchMatchType"
        },
        "path": {
          "type": "string"
        },
        "root": {
          "type": "string"
        },
        "score": {
          "type": "integer",
          "format": "uint32",
          "minimum": 0.0
        }
      }
    }
  }
}