{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/greenlitbooks-com/json-schema/greenlitbooks-com-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/greenlitbooks-com-openapi.json#/components/schemas/SearchResult",
  "type": "object",
  "properties": {
    "score": {
      "type": "number",
      "description": "Relevance score. Higher is better."
    },
    "matchedFields": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Which fields the query matched."
    },
    "book": {
      "type": "object",
      "properties": {
        "slug": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "subtitle": {
          "type": [
            "string",
            "null"
          ]
        },
        "author": {
          "type": [
            "string",
            "null"
          ]
        },
        "readerLevel": {
          "type": "string",
          "enum": [
            "beginner",
            "operator",
            "engineer",
            "leader"
          ]
        },
        "series": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "name": {
              "type": "string"
            },
            "slug": {
              "type": "string"
            }
          }
        },
        "oneLiner": {
          "type": [
            "string",
            "null"
          ]
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "apiUrl": {
          "type": "string",
          "format": "uri"
        },
        "coverImage": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      }
    }
  }
}