{
  "openapi": "3.1.0",
  "info": {
    "title": "Kazuma Ohashi Portfolio API",
    "version": "1.0.0",
    "description": "Read the public software engineering CV and its canonical section links. Breaking changes receive a new major URL, such as /api/v2. When a version is deprecated, its responses will carry a Deprecation date and a Link with rel=deprecation to migration instructions. If a retirement date is set, a Sunset header will give the HTTP date. The original JSON endpoints remain supported.",
    "contact": {
      "name": "Kazuma Ohashi",
      "url": "https://kazuma0129.work/contact"
    }
  },
  "servers": [
    {
      "url": "https://kazuma0129.work"
    }
  ],
  "externalDocs": {
    "url": "https://kazuma0129.work/docs"
  },
  "security": [],
  "paths": {
    "/api/v1": {
      "get": {
        "operationId": "getApiDirectory",
        "summary": "Read the API directory",
        "description": "Discover documentation and canonical endpoints.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read the API directory",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    },
                    "documentation": {
                      "type": "string",
                      "format": "uri"
                    },
                    "openapi": {
                      "type": "string",
                      "format": "uri"
                    },
                    "endpoints": {
                      "type": "object",
                      "properties": {
                        "portfolio": {
                          "type": "string",
                          "format": "uri"
                        },
                        "status": {
                          "type": "string",
                          "format": "uri"
                        }
                      },
                      "required": [
                        "portfolio",
                        "status"
                      ]
                    }
                  },
                  "required": [
                    "name",
                    "version",
                    "documentation",
                    "openapi",
                    "endpoints"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Quota exhausted.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporary service interruption.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/portfolio": {
      "get": {
        "operationId": "listPortfolioSections",
        "summary": "List CV sections",
        "description": "Return canonical links to the CV, optionally selecting one section by its HTML fragment.",
        "security": [],
        "parameters": [
          {
            "name": "section",
            "in": "query",
            "required": false,
            "description": "The HTML fragment ID of a CV section. Omit it to list every section.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]{0,79}$"
            },
            "example": "experience-heading"
          }
        ],
        "responses": {
          "200": {
            "description": "List CV sections",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "title",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "url",
                    "sections"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid section ID.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "Unknown section ID.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Quota exhausted.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporary service interruption.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/status": {
      "get": {
        "operationId": "getPublicationStatus",
        "summary": "Read publication status",
        "description": "Check that this API can serve the published status document.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read publication status",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    },
                    "service": {
                      "type": "string",
                      "const": "portfolio-index"
                    }
                  },
                  "required": [
                    "status",
                    "service"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Quota exhausted.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporary service interruption.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/portfolio.json": {
      "get": {
        "operationId": "listPortfolioSectionsLegacy",
        "summary": "List all sections at the original URL",
        "description": "Read the original, unfiltered section index.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "List all sections at the original URL",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "sections": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "title",
                          "url"
                        ]
                      }
                    }
                  },
                  "required": [
                    "url",
                    "sections"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Quota exhausted.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporary service interruption.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/status.json": {
      "get": {
        "operationId": "getPublicationStatusLegacy",
        "summary": "Read the original status document",
        "description": "Get the publication status at its original URL.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Read the original status document",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok"
                    },
                    "service": {
                      "type": "string",
                      "const": "portfolio-index"
                    }
                  },
                  "required": [
                    "status",
                    "service"
                  ]
                }
              }
            }
          },
          "405": {
            "description": "Unsupported method.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Allow": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Quota exhausted.",
            "headers": {
              "RateLimit-Policy": {
                "description": "Named request quota and window in seconds.",
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit": {
                "description": "Remaining requests and seconds until reset.",
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "Temporary service interruption.",
            "headers": {
              "Retry-After": {
                "description": "Seconds before another request.",
                "schema": {
                  "type": "integer",
                  "minimum": 1
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": 400,
            "maximum": 599
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "format": "uri-reference"
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "hint": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "detail",
          "instance",
          "code",
          "message",
          "hint"
        ]
      }
    }
  }
}
