mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Cache generated swagger.json by default
This commit is contained in:
@@ -261,7 +261,11 @@ internal static class ArchiKestrel {
|
|||||||
app.MapControllers();
|
app.MapControllers();
|
||||||
|
|
||||||
// Add support for OpenAPI, responsible for automatic API documentation generation, this should be on the end, once we're done with API
|
// Add support for OpenAPI, responsible for automatic API documentation generation, this should be on the end, once we're done with API
|
||||||
app.MapOpenApi("/swagger/{documentName}/swagger.json");
|
IEndpointConventionBuilder openApi = app.MapOpenApi("/swagger/{documentName}/swagger.json");
|
||||||
|
|
||||||
|
if (ASF.GlobalConfig?.OptimizationMode != GlobalConfig.EOptimizationMode.MinMemoryUsage) {
|
||||||
|
openApi.CacheOutput();
|
||||||
|
}
|
||||||
|
|
||||||
// Add support for swagger UI, this should be after swagger, obviously
|
// Add support for swagger UI, this should be after swagger, obviously
|
||||||
app.MapScalarApiReference(
|
app.MapScalarApiReference(
|
||||||
|
|||||||
Reference in New Issue
Block a user