{
  "openapi": "3.1.0",
  "info": {
    "title": "DrooniMaakari Drone & Spatial Data API",
    "description": "API for drone aerial photogrammetry, 3D point cloud measurements, stockpile volume calculations, and customer portal services.",
    "version": "1.0.0",
    "contact": {
      "name": "DrooniMaakari",
      "email": "sami@droonimaakari.fi",
      "url": "https://www.droonimaakari.fi"
    }
  },
  "servers": [
    {
      "url": "https://www.droonimaakari.fi",
      "description": "Production Edge Frontend"
    },
    {
      "url": "https://api.droonimaakari.fi",
      "description": "Backend Processing API"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "summary": "Health Check Endpoint",
        "description": "Returns operational status of the service.",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": { "type": "string", "example": "ok" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/portal/api/login": {
      "post": {
        "summary": "Customer & Agent Authentication",
        "description": "Authenticate customer or agent credentials.",
        "responses": {
          "200": { "description": "Authentication successful" },
          "401": { "description": "Unauthorized" }
        }
      }
    },
    "/portal/api/save_measurements": {
      "post": {
        "summary": "Save Measurements",
        "description": "Stores point-to-point, area, or volume measurements made in the 3D viewer.",
        "responses": {
          "200": { "description": "Measurement saved" }
        }
      }
    }
  }
}
