{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ampworth-com/json-schema/ampworth-com-document-detail-schema.json",
  "title": "DocumentDetail",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ampworth-com-openapi.json#/components/schemas/DocumentDetail",
  "properties": {
    "document": {
      "properties": {
        "apiUrl": {
          "description": "The same document as JSON.",
          "type": "string"
        },
        "calculators": {
          "description": "Ids of calculators on this site that do the arithmetic described here.",
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "category": {
          "description": "The subject key: 'basics', 'heat-pumps', 'solar-pv', 'batteries', 'standards' or 'paperwork'.",
          "type": "string"
        },
        "categoryLabel": {
          "type": "string"
        },
        "featured": {
          "type": "boolean"
        },
        "headings": {
          "description": "The in-page sections.",
          "items": {
            "properties": {
              "id": {
                "type": "string"
              },
              "title": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "kind": {
          "description": "'guide', 'article' or 'faq'.",
          "type": "string"
        },
        "level": {
          "description": "Articles only: beginner, intermediate or advanced.",
          "type": "string"
        },
        "levelLabel": {
          "type": "string"
        },
        "perspective": {
          "description": "Guides only: who the guide is written for.",
          "type": "string"
        },
        "perspectiveLabel": {
          "type": "string"
        },
        "questions": {
          "description": "For a set of questions, each question with its answer as Markdown.",
          "items": {
            "properties": {
              "answer": {
                "description": "The answer as Markdown.",
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "question": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "question",
              "answer"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "readingMinutes": {
          "type": "integer"
        },
        "related": {
          "description": "Documents worth reading next.",
          "items": {
            "properties": {
              "apiUrl": {
                "description": "The same document as JSON.",
                "type": "string"
              },
              "calculators": {
                "description": "Ids of calculators on this site that do the arithmetic described here.",
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "category": {
                "description": "The subject key: 'basics', 'heat-pumps', 'solar-pv', 'batteries', 'standards' or 'paperwork'.",
                "type": "string"
              },
              "categoryLabel": {
                "type": "string"
              },
              "featured": {
                "type": "boolean"
              },
              "kind": {
                "description": "'guide', 'article' or 'faq'.",
                "type": "string"
              },
              "level": {
                "description": "Articles only: beginner, intermediate or advanced.",
                "type": "string"
              },
              "levelLabel": {
                "type": "string"
              },
              "perspective": {
                "description": "Guides only: who the guide is written for.",
                "type": "string"
              },
              "perspectiveLabel": {
                "type": "string"
              },
              "readingMinutes": {
                "type": "integer"
              },
              "slug": {
                "type": "string"
              },
              "sources": {
                "description": "The MCS documents this draws on. Cite these, not this site, when the point is a requirement of a standard.",
                "items": {
                  "properties": {
                    "document": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "document",
                    "title",
                    "url"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "summary": {
                "type": "string"
              },
              "tags": {
                "items": {
                  "type": "string"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "title": {
                "type": "string"
              },
              "updated": {
                "description": "The date of the last change, as YYYY-MM-DD.",
                "type": "string"
              },
              "url": {
                "description": "The page, which is the address to cite.",
                "type": "string"
              }
            },
            "required": [
              "slug",
              "kind",
              "title",
              "summary",
              "category",
              "categoryLabel",
              "updated",
              "readingMinutes",
              "url",
              "apiUrl"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "slug": {
          "type": "string"
        },
        "sources": {
          "description": "The MCS documents this draws on. Cite these, not this site, when the point is a requirement of a standard.",
          "items": {
            "properties": {
              "document": {
                "type": "string"
              },
              "title": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "document",
              "title",
              "url"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "summary": {
          "type": "string"
        },
        "tags": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "text": {
          "description": "The document as Markdown: prose, with headings, tables, lists and absolute links. For a set of questions this is every question and answer run together; they also come back separately in questions.",
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "updated": {
          "description": "The date of the last change, as YYYY-MM-DD.",
          "type": "string"
        },
        "url": {
          "description": "The page, which is the address to cite.",
          "type": "string"
        }
      },
      "required": [
        "slug",
        "kind",
        "title",
        "summary",
        "category",
        "categoryLabel",
        "updated",
        "readingMinutes",
        "url",
        "apiUrl"
      ],
      "type": "object"
    },
    "notice": {
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "version",
    "document",
    "notice"
  ],
  "type": "object"
}