{
  "openapi": "3.1.1",
  "info": {
    "title": "imsus.dev",
    "version": "1.0.0",
    "description": "The personal site of Imam Susanto. Every page is published as HTML and as Markdown: send `Accept: text/markdown`. Errors are RFC 9457 problem details with a `code` and a `hint`.",
    "contact": {
      "name": "Imam Susanto",
      "url": "https://imsus.dev/guestbook/"
    }
  },
  "servers": [
    {
      "url": "https://imsus.dev"
    }
  ],
  "externalDocs": {
    "description": "Every page, for crawlers",
    "url": "https://imsus.dev/sitemap-index.xml"
  },
  "paths": {
    "/": {
      "get": {
        "operationId": "getHome",
        "summary": "Home page",
        "responses": {
          "200": {
            "description": "The page, chosen by the Accept header (q-values honoured): HTML by default, Markdown with YAML front matter when Accept prefers text/markdown.",
            "headers": {
              "Vary": {
                "description": "Always includes Accept.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No such page, in the representation the client asked for."
          },
          "406": {
            "description": "Accept allows neither text/html nor text/markdown.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/{page}/": {
      "get": {
        "operationId": "getPage",
        "summary": "Any page, such as /about/, /cv/ or /links/",
        "description": "Nested pages such as /posts/{slug}/ and /prompts/{id}/ answer the same way. Every page address is listed in /search.json and the sitemap, and each ends in a slash.",
        "parameters": [
          {
            "name": "page",
            "in": "path",
            "required": true,
            "description": "The page name, e.g. `about`.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The page, chosen by the Accept header (q-values honoured): HTML by default, Markdown with YAML front matter when Accept prefers text/markdown.",
            "headers": {
              "Vary": {
                "description": "Always includes Accept.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              },
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No such page, in the representation the client asked for."
          },
          "406": {
            "description": "Accept allows neither text/html nor text/markdown.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/search.json": {
      "get": {
        "operationId": "listSearchEntries",
        "summary": "Every findable page, post, series, tag, prompt and skill",
        "responses": {
          "200": {
            "description": "What the site search lists, in order.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SearchEntry"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/resume.json": {
      "get": {
        "operationId": "getResume",
        "summary": "The CV as a JSON Resume",
        "externalDocs": {
          "url": "https://jsonresume.org/schema"
        },
        "responses": {
          "200": {
            "description": "A JSON Resume document, checked against the official schema at build time.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/rss.xml": {
      "get": {
        "operationId": "getFeed",
        "summary": "Posts as an RSS 2.0 feed",
        "responses": {
          "200": {
            "description": "The feed.",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "SearchEntry": {
        "type": "object",
        "required": [
          "title",
          "url",
          "kind"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "description": "A path on this site."
          },
          "kind": {
            "type": "string",
            "examples": [
              "Page",
              "Post",
              "Series",
              "Tag",
              "Prompt",
              "Skill",
              "Feed",
              "Data"
            ]
          },
          "terms": {
            "type": "string",
            "description": "Extra words the search matches."
          }
        }
      },
      "Problem": {
        "type": "object",
        "description": "An RFC 9457 problem detail.",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "hint"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "about:blank"
          },
          "title": {
            "type": "string",
            "examples": [
              "Not Found"
            ]
          },
          "status": {
            "type": "integer",
            "examples": [
              404
            ]
          },
          "code": {
            "type": "string",
            "description": "Stable, for programs.",
            "examples": [
              "not_found"
            ]
          },
          "detail": {
            "type": "string"
          },
          "hint": {
            "type": "string",
            "description": "What to try instead."
          }
        }
      }
    }
  }
}