{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/greenlitbooks-com/json-schema/greenlitbooks-com-book-schema.json",
  "title": "Book",
  "description": "One book. No publication date, page count, or ISBN: the catalog carries no verified source for them and nothing is invented. Amazon URLs are clean /dp/ links; every listed book is buyable there and free to read with Kindle Unlimited when kindleUnlimited is true.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/greenlitbooks-com-openapi.json#/components/schemas/Book",
  "type": "object",
  "properties": {
    "slug": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "subtitle": {
      "type": [
        "string",
        "null"
      ]
    },
    "author": {
      "type": [
        "string",
        "null"
      ]
    },
    "series": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "position": {
          "type": "integer",
          "description": "1-based reading order within the series."
        }
      }
    },
    "imprint": {
      "type": [
        "string",
        "null"
      ]
    },
    "readerLevel": {
      "type": "string",
      "enum": [
        "beginner",
        "operator",
        "engineer",
        "leader"
      ]
    },
    "flagship": {
      "type": "boolean"
    },
    "descriptions": {
      "type": "object",
      "properties": {
        "hook": {
          "type": [
            "string",
            "null"
          ],
          "description": "A quotable opening line."
        },
        "oneLiner": {
          "type": [
            "string",
            "null"
          ],
          "description": "Short description."
        },
        "targetReader": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who the book is for."
        },
        "namedConcept": {
          "type": [
            "string",
            "null"
          ],
          "description": "The named idea the book teaches."
        }
      }
    },
    "concept": {
      "type": [
        "object",
        "null"
      ],
      "description": "The question-shaped concept page for this book.",
      "properties": {
        "name": {
          "type": "string"
        },
        "slug": {
          "type": "string"
        },
        "question": {
          "type": "string"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    },
    "amazon": {
      "type": "object",
      "properties": {
        "kindleAsin": {
          "type": [
            "string",
            "null"
          ]
        },
        "paperbackAsin": {
          "type": [
            "string",
            "null"
          ]
        },
        "kindleUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "paperbackUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      }
    },
    "prices": {
      "type": "object",
      "properties": {
        "ebook": {
          "$ref": "#/$defs/Price"
        },
        "paperback": {
          "$ref": "#/$defs/Price"
        }
      }
    },
    "kindleUnlimited": {
      "type": "boolean"
    },
    "coverImage": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "Canonical book page."
    },
    "apiUrl": {
      "type": "string",
      "format": "uri"
    },
    "markdownUrl": {
      "type": "string",
      "format": "uri",
      "description": "Plain-markdown twin of the book page."
    },
    "readUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Free chapter one, when available."
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "companionRepo": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Public companion code repository, when the book ships code."
    }
  },
  "$defs": {
    "Price": {
      "type": [
        "object",
        "null"
      ],
      "description": "Price for one format. amount is parsed from the display string.",
      "properties": {
        "display": {
          "type": "string"
        },
        "amount": {
          "type": [
            "number",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}