{
  "openapi": "3.1.0",
  "info": {
    "title": "Jest Infinite Bookstore & Quote Archive API",
    "version": "1.0.0",
    "description": "Search 837 curated books, 552 authors, 1,114 saved quotes, and 6 quote-derived shelves with Bookshop.org, Amazon, and AbeBooks purchase links."
  },
  "servers": [
    {
      "url": "https://jestinfinite.com"
    }
  ],
  "paths": {
    "/api/catalog": {
      "get": {
        "operationId": "queryCatalog",
        "summary": "Search books, authors, quotes, or retrieve a specific book/author/shelves list.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Search keywords for book title, author, quote text, or theme."
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "books",
                "authors",
                "quotes",
                "shelves"
              ],
              "default": "all"
            },
            "description": "Result type filter."
          },
          {
            "name": "shelf",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "postmodern",
                "humor",
                "philosophy",
                "love",
                "craft",
                "classics"
              ]
            },
            "description": "Filter books by quote-derived genre shelf."
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter quotes or books by theme/mood tag."
          },
          {
            "name": "book",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact book slug, ID, ISBN-13, or title for detailed lookup."
          },
          {
            "name": "author",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Exact author slug or name for detailed lookup."
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 10
            },
            "description": "Max items per category."
          }
        ],
        "responses": {
          "200": {
            "description": "JSON catalog response with Jest Infinite URLs and Bookshop.org, Amazon, and AbeBooks links.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}