{
  "openapi": "3.0.3",
  "info": {
    "title": "DahuGPT API",
    "version": "1.0.0",
    "description": "API REST du chat dahuGPT (Laravel Sanctum, Bearer token)."
  },
  "servers": [
    {
      "url": "/api",
      "description": "API relative à l’origine du site"
    }
  ],
  "paths": {
    "/register": {
      "post": {
        "summary": "Inscription",
        "tags": ["Auth"]
      }
    },
    "/login": {
      "post": {
        "summary": "Connexion (retourne un token Sanctum)",
        "tags": ["Auth"]
      }
    },
    "/logout": {
      "post": {
        "summary": "Déconnexion",
        "tags": ["Auth"],
        "security": [{ "bearerAuth": [] }]
      }
    },
    "/me": {
      "get": {
        "summary": "Profil utilisateur courant",
        "tags": ["Auth"],
        "security": [{ "bearerAuth": [] }]
      }
    },
    "/chat": {
      "post": {
        "summary": "Envoi d’un message au chat",
        "tags": ["Chat"],
        "security": [{ "bearerAuth": [] }]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Sanctum"
      }
    }
  }
}
