Jeremy Pritts bc78e2725e
Update to .NET 10 (#2026)
* Update to .NET 10

* Use classic linker

* Attempt

* Again

* Again

* Again

* Again

* Again

* again

* macos 14

* Remove extra csproj changes
2025-11-29 20:37:19 -08:00

20 lines
601 B
C#

using Microsoft.AspNetCore.OpenApi;
using Microsoft.OpenApi;
namespace AssetRipper.GUI.Web.Documentation;
internal class SortDocumentPathsTransformer : IOpenApiDocumentTransformer
{
public Task TransformAsync(OpenApiDocument document, OpenApiDocumentTransformerContext context, CancellationToken cancellationToken)
{
OpenApiPaths newPaths = new();
newPaths.Extensions = document.Paths.Extensions;
foreach ((string key, IOpenApiPathItem value) in document.Paths.OrderBy(pair => pair.Key))
{
newPaths.Add(key, value);
}
document.Paths = newPaths;
return Task.CompletedTask;
}
}