{
  "openapi": "3.1.0",
  "info": {
    "title": "JOY Automart Public API",
    "version": "2026-08-11",
    "description": "Public, unauthenticated machine-readable endpoints intentionally exposed by JOY Automart. This document does not describe Owner/Admin, private agent, customer, financial, deployment, or other privileged APIs."
  },
  "servers": [
    {
      "url": "https://www.joyautomart.com",
      "description": "JOY Automart production origin"
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getPublicHealth",
        "summary": "Read JOY Automart API health",
        "description": "Returns a read-only service-health payload and current build identifier when available.",
        "responses": {
          "200": {
            "description": "Healthy service",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                }
              }
            }
          },
          "502": {
            "description": "The public origin cannot reach the API service"
          },
          "503": {
            "description": "The Azure API proxy is not configured or temporarily unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthResponse": {
        "type": "object",
        "required": ["ok", "service", "status", "timestamp", "build_hash"],
        "properties": {
          "ok": { "type": "boolean" },
          "service": { "type": "string" },
          "app": { "type": "string" },
          "status": { "type": "string" },
          "timestamp": { "type": "string", "format": "date-time" },
          "build_hash": { "type": "string" }
        },
        "additionalProperties": true
      }
    }
  }
}
