{
  "openapi": "3.1.0",
  "info": {
    "title": "SOL Business Solutions Public API",
    "version": "1.0.0",
    "description": "Minimal public API surface for the sol.com.sa website. Used for health checks and contact / enrollment intake.",
    "contact": {
      "name": "SOL Business Solutions",
      "email": "info@sol.com.sa",
      "url": "https://sol.com.sa"
    }
  },
  "servers": [
    { "url": "https://sol.com.sa/api", "description": "Production" }
  ],
  "paths": {
    "/healthz": {
      "get": {
        "summary": "Health check",
        "operationId": "healthz",
        "responses": {
          "200": {
            "description": "Service is healthy",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": { "status": { "type": "string", "const": "ok" } },
                  "required": ["status"]
                }
              }
            }
          }
        }
      }
    },
    "/contact": {
      "post": {
        "summary": "Submit a contact inquiry or course enrollment",
        "operationId": "contact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["name", "email", "message"],
                "properties": {
                  "name": { "type": "string", "minLength": 1 },
                  "email": { "type": "string", "format": "email" },
                  "company": { "type": "string" },
                  "service": { "type": "string", "description": "Service of interest or course title" },
                  "subject": { "type": "string", "description": "Optional override for the email subject line" },
                  "message": { "type": "string", "minLength": 1 }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Inquiry received and email dispatched" },
          "400": { "description": "Missing required fields" },
          "500": { "description": "Mail transport failure" }
        }
      }
    }
  }
}
