{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edgechat-ai/json-schema/edgechat-ai-resolve-batch-response-schema.json",
  "title": "ResolveBatchResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edgechat-ai-resolve-api-openapi.yml#/components/schemas/ResolveBatchResponse",
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Resolution"
      }
    },
    "license": {
      "type": "object"
    }
  },
  "$defs": {
    "ArticleRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "url": {
          "type": "string"
        },
        "api_url": {
          "type": "string"
        },
        "importance": {
          "type": "number"
        },
        "rank": {
          "type": "integer"
        }
      }
    },
    "Candidate": {
      "allOf": [
        {
          "$ref": "#/$defs/ArticleRef"
        },
        {
          "type": "object",
          "properties": {
            "match": {
              "type": "string",
              "enum": [
                "exact",
                "alias",
                "anchor",
                "partial"
              ]
            },
            "confidence": {
              "type": "number"
            },
            "excerpt": {
              "type": "string"
            },
            "topic_path": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      ]
    },
    "Resolution": {
      "type": "object",
      "properties": {
        "query": {
          "type": "string"
        },
        "match": {
          "type": "string",
          "enum": [
            "exact",
            "alias",
            "anchor",
            "partial",
            "none"
          ]
        },
        "confidence": {
          "type": "number"
        },
        "ambiguous": {
          "type": "boolean"
        },
        "result": {
          "oneOf": [
            {
              "$ref": "#/$defs/Candidate"
            },
            {
              "type": "null"
            }
          ]
        },
        "alternatives": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Candidate"
          }
        },
        "license": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "url",
            "summary"
          ]
        }
      }
    }
  }
}