From 0001dbe634d326ecc4a14f12abd179652a0c58f9 Mon Sep 17 00:00:00 2001 From: Fanilo-Nantenaina Date: Tue, 20 Jan 2026 13:54:36 +0300 Subject: [PATCH] docs(api): add comments for security schemas and openapi setup --- api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/api.py b/api.py index 0196fa7..851608c 100644 --- a/api.py +++ b/api.py @@ -181,6 +181,7 @@ def custom_openapi(): openapi_schema = app.openapi() + # Définir deux schémas de sécurité openapi_schema["components"]["securitySchemes"] = { "HTTPBearer": {"type": "http", "scheme": "bearer", "bearerFormat": "JWT"}, "ApiKeyAuth": {"type": "apiKey", "in": "header", "name": "X-API-Key"}, @@ -192,6 +193,7 @@ def custom_openapi(): return app.openapi_schema +# Après app = FastAPI(...), ajouter: app.openapi = custom_openapi