controler aufräumen

This commit is contained in:
Tizian.Breuch
2025-08-01 10:22:05 +02:00
parent 0b35597347
commit 38085ef199
11 changed files with 16 additions and 16 deletions

View File

@@ -138,18 +138,18 @@ builder.Services.AddSwaggerGen(c =>
}
var tag = controllerName.Replace("Admin", "").Replace("Controller", ""); // Entfernt Pr<50>fixe/Suffixe
// Erkenne den Hauptbereich anhand des Routen-Pr<50>fixes
if (api.RelativePath.StartsWith("api/v1/admin"))
{
// Erzeugt einen Tag wie "Admin - Products", "Admin - Users" etc.
return new[] { $"Admin - {tag}" };
}
if (api.RelativePath.StartsWith("api/v1/auth"))
{
// Auth hat normalerweise nur einen Controller, daher keine Untergruppe
return new[] { "Auth" };
}
// Erkenne den Hauptbereich anhand des Routen-Pr<50>fixes
if (api.RelativePath.StartsWith("api/v1/admin"))
{
// Erzeugt einen Tag wie "Admin - Products", "Admin - Users" etc.
return new[] { $"Admin - {tag}" };
}
if (api.RelativePath.StartsWith("api/v1/customer"))
{
// Erzeugt einen Tag wie "Customer - Profile", "Customer - Orders"