{
  "openapi": "3.1.0",
  "info": {
    "title": "ArtificialGuyBR Public API",
    "version": "1.0.0",
    "description": "Small, public, read-only endpoints for discovering ArtificialGuyBR services. The health endpoint requires no authentication and is safe to use as an integration smoke test.",
    "contact": {
      "name": "ArtificialGuyBR",
      "url": "https://artificialguy.com/contact/",
      "email": "contact@artificialguy.com"
    }
  },
  "servers": [
    {
      "url": "https://artificialguy.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "system",
      "description": "Service discovery and availability operations."
    }
  ],
  "paths": {
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "summary": "Check API availability",
        "description": "Returns a machine-readable status document. No API key is required.",
        "tags": ["system"],
        "responses": {
          "200": {
            "description": "The service is available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthResponse"
                },
                "examples": {
                  "healthy": {
                    "summary": "Healthy service",
                    "value": {
                      "status": "ok",
                      "service": "artificialguy.com",
                      "version": "1.0.0"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthResponse": {
        "type": "object",
        "required": ["status", "service", "version"],
        "properties": {
          "status": {
            "type": "string",
            "const": "ok",
            "description": "Current service status."
          },
          "service": {
            "type": "string",
            "description": "Canonical service name.",
            "examples": ["artificialguy.com"]
          },
          "version": {
            "type": "string",
            "description": "Public API contract version.",
            "examples": ["1.0.0"]
          }
        },
        "additionalProperties": false
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message", "hint"],
            "properties": {
              "code": {
                "type": "string",
                "description": "Stable, machine-readable error code.",
                "examples": ["not_found"]
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation."
              },
              "hint": {
                "type": "string",
                "description": "Suggested next action for a client."
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      }
    },
    "responses": {
      "NotFound": {
        "description": "The requested API resource does not exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "example": {
              "error": {
                "code": "not_found",
                "message": "The requested API resource does not exist.",
                "hint": "Read https://artificialguy.com/openapi.json for available operations."
              }
            }
          }
        }
      }
    }
  }
}
