controler aufräumen
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user