This commit is contained in:
Tizian.Breuch
2025-08-01 10:43:06 +02:00
parent 38085ef199
commit 4f0cf6acd4

View File

@@ -165,6 +165,21 @@ builder.Services.AddSwaggerGen(c =>
return new[] { tag }; return new[] { tag };
}); });
c.OrderActionsBy(apiDesc =>
{
var relativePath = apiDesc.RelativePath ?? "";
if (relativePath.StartsWith("api/v1/auth")) return "1"; // Auth ganz oben
if (relativePath.StartsWith("api/v1/admin")) return "2"; // Admin als letztes
if (relativePath.StartsWith("api/v1/customer")) return "3"; // Customer danach
if (relativePath.StartsWith("api/v1/public")) return "4"; // Public als n<>chstes
return "5"; // Fallback
});
// --- 2. JWT Security Konfiguration --- // --- 2. JWT Security Konfiguration ---
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
{ {