fix(swagger): restore apikey security definition with Bearer usage description

This commit is contained in:
2025-12-25 11:32:55 +08:00
parent c8fced4cf1
commit b566eb8058
4 changed files with 52 additions and 7 deletions

View File

@@ -46,11 +46,15 @@ import (
// @host localhost:8080
// @BasePath /
// @securityDefinitions.bearer AdminAuth
// @description Admin token for management API access
// @securityDefinitions.apikey AdminAuth
// @in header
// @name Authorization
// @description Type "Bearer" followed by a space and the admin token. Example: Bearer admin123
// @securityDefinitions.bearer MasterAuth
// @description Master key for tenant API access
// @securityDefinitions.apikey MasterAuth
// @in header
// @name Authorization
// @description Type "Bearer" followed by a space and the master key. Example: Bearer sk-xxx
func fatal(logger *slog.Logger, msg string, args ...any) {
logger.Error(msg, args...)