sort
This commit is contained in:
@@ -161,11 +161,13 @@ builder.Services.AddSwaggerGen(c =>
|
|||||||
{
|
{
|
||||||
var relativePath = apiDesc.RelativePath ?? "";
|
var relativePath = apiDesc.RelativePath ?? "";
|
||||||
|
|
||||||
// Die Reihenfolge der if-Bedingungen HIER ist entscheidend f<>r die Sortierung!
|
// Sortierung
|
||||||
if (relativePath.StartsWith("api/v1/auth")) return "1"; // Auth ganz oben
|
if (relativePath.StartsWith("api/v1/auth")) return "1";
|
||||||
if (relativePath.StartsWith("api/v1/public")) return "2"; // Public als n<>chstes
|
if (relativePath.StartsWith("api/v1/admin")) return "2";
|
||||||
if (relativePath.StartsWith("api/v1/customer")) return "3"; // Customer danach
|
if (relativePath.StartsWith("api/v1/customer")) return "3";
|
||||||
if (relativePath.StartsWith("api/v1/admin")) return "4"; // Admin als letztes
|
if (relativePath.StartsWith("api/v1/public")) return "4";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return "5"; // Fallback
|
return "5"; // Fallback
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user