{
  "openapi": "3.1.0",
  "info": {
    "title": "DoW WHtR (Waist-to-Height Ratio) Calculator",
    "version": "0.2.0",
    "description": "Military waist-to-height ratio calculator with public Army, Navy, Air Force, Marine Corps, Space Force, and Coast Guard instructions, body composition forms, references, with API available."
  },
  "servers": [
    {
      "url": "https://heightwaist.com"
    }
  ],
  "paths": {
    "/api/compliance": {
      "get": {
        "operationId": "getCompliance",
        "summary": "Calculate waist-to-height compliance from query parameters.",
        "parameters": [
          {
            "name": "height",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "waist",
            "in": "query",
            "required": true,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "unit",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "in",
                "cm"
              ],
              "default": "in"
            }
          },
          {
            "name": "branch",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "army",
                "navy",
                "air_force",
                "marine_corps",
                "space_force",
                "coast_guard"
              ],
              "default": "army"
            }
          },
          {
            "name": "sex",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "male",
                "female"
              ],
              "default": "male"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compliance result"
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/ai/calculate": {
      "post": {
        "operationId": "calculateWhtrForAi",
        "summary": "Calculate WHtR with AI-oriented source and interpretation fields.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "height",
                  "waist"
                ],
                "properties": {
                  "height": {
                    "type": "number",
                    "description": "Height in inches or centimeters."
                  },
                  "waist": {
                    "type": "number",
                    "description": "Waist circumference in inches or centimeters."
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "in",
                      "cm"
                    ],
                    "default": "in"
                  },
                  "branch": {
                    "type": "string",
                    "enum": [
                      "army",
                      "navy",
                      "air_force",
                      "marine_corps",
                      "space_force",
                      "coast_guard"
                    ],
                    "default": "army"
                  },
                  "sex": {
                    "type": "string",
                    "enum": [
                      "male",
                      "female"
                    ],
                    "default": "male"
                  }
                }
              },
              "examples": {
                "army": {
                  "value": {
                    "height": 70,
                    "waist": 34,
                    "unit": "in",
                    "branch": "army",
                    "sex": "male"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI-oriented compliance result"
          },
          "400": {
            "description": "Invalid input"
          }
        }
      }
    },
    "/api/standards": {
      "get": {
        "operationId": "getStandards",
        "summary": "Return public standards and source assets used by the calculator.",
        "responses": {
          "200": {
            "description": "Standards payload"
          }
        }
      }
    }
  }
}