{
  "openapi": "3.1.0",
  "info": {
    "title": "Heightvs public API",
    "version": "1.0.0",
    "summary": "Compare heights on a shared scale. Add yourself, a known person or a custom character, then share the lineup or save your height chart.",
    "termsOfService": "https://heightvs.com/data",
    "contact": {
      "name": "Heightvs",
      "url": "https://heightvs.com/contact"
    }
  },
  "servers": [
    {
      "url": "https://heightvs.com/"
    }
  ],
  "paths": {
    "/api/v1/latest.json": {
      "get": {
        "summary": "Published height measurements, original units and sources",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional polite client identifier. Static hosting may record it in edge access logs."
          }
        ],
        "responses": {
          "200": {
            "description": "Published height measurements, original units and sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/api/latest.json": {
      "get": {
        "summary": "Published height measurements, original units and sources",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional polite client identifier. Static hosting may record it in edge access logs."
          }
        ],
        "responses": {
          "200": {
            "description": "Published height measurements, original units and sources",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "x-permanent-alias-for": "/api/v1/latest.json"
    },
    "/api/v1/health.json": {
      "get": {
        "summary": "Dataset freshness and availability",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional polite client identifier. Static hosting may record it in edge access logs."
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset freshness and availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "generated_at",
                    "datasets"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "stale",
                        "unavailable"
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "datasets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/health.json": {
      "get": {
        "summary": "Dataset freshness and availability",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional polite client identifier. Static hosting may record it in edge access logs."
          }
        ],
        "responses": {
          "200": {
            "description": "Dataset freshness and availability",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "generated_at",
                    "datasets"
                  ],
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok",
                        "stale",
                        "unavailable"
                      ]
                    },
                    "generated_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "datasets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "additionalProperties": true
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "x-permanent-alias-for": "/api/v1/health.json"
    },
    "/heights.csv": {
      "get": {
        "summary": "One row per height measurement with source and collection date",
        "parameters": [
          {
            "name": "client",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional polite client identifier. Static hosting may record it in edge access logs."
          }
        ],
        "responses": {
          "200": {
            "description": "One row per height measurement with source and collection date",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}