{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/edgechat-ai/json-schema/edgechat-ai-suggest-response-schema.json",
  "title": "SuggestResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/edgechat-ai-suggest-api-openapi.yml#/components/schemas/SuggestResponse",
  "type": "object",
  "properties": {
    "prefix": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "#/$defs/ArticleRef"
          },
          {
            "type": "object",
            "properties": {
              "matched": {
                "type": "string",
                "description": "The name that matched the prefix, when it is not the title."
              }
            }
          }
        ]
      }
    }
  },
  "$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"
        }
      }
    }
  }
}