Make sure swagger tags and operations are sorted alphabetically (#13055)
This commit is contained in:
@@ -52,6 +52,10 @@ public class ManagementApiComposer : IComposer
|
||||
options.Version = ApiAllName;
|
||||
options.DocumentName = ApiAllName;
|
||||
options.Description = "This shows all APIs available in this version of Umbraco - Including all the legacy apis that is available for backward compatibility";
|
||||
options.PostProcess = document =>
|
||||
{
|
||||
document.Tags = document.Tags.OrderBy(tag => tag.Name).ToList();
|
||||
};
|
||||
});
|
||||
|
||||
services.AddVersionedApiExplorer(options =>
|
||||
@@ -113,6 +117,8 @@ public class ManagementApiComposer : IComposer
|
||||
config.SwaggerRoutes.Clear();
|
||||
var swaggerPath = $"{officePath}/swagger/{ApiAllName}/swagger.json";
|
||||
config.SwaggerRoutes.Add(new SwaggerUi3Route(ApiAllName, swaggerPath));
|
||||
config.OperationsSorter = "alpha";
|
||||
config.TagsSorter = "alpha";
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -628,19 +628,19 @@
|
||||
},
|
||||
"tags": [
|
||||
{
|
||||
"name": "Upgrade"
|
||||
},
|
||||
{
|
||||
"name": "Server"
|
||||
},
|
||||
{
|
||||
"name": "PublishedCache"
|
||||
"name": "Install"
|
||||
},
|
||||
{
|
||||
"name": "Profiling"
|
||||
},
|
||||
{
|
||||
"name": "Install"
|
||||
"name": "PublishedCache"
|
||||
},
|
||||
{
|
||||
"name": "Server"
|
||||
},
|
||||
{
|
||||
"name": "Upgrade"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user