order
This commit is contained in:
@@ -165,6 +165,21 @@ builder.Services.AddSwaggerGen(c =>
|
||||
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 ---
|
||||
c.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user