This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace TestWebApi1; | |
public class ApplicationTimeProvider(ITimeZoneInfoProvider timeZoneInfoProvider) : TimeProvider | |
{ | |
private readonly ITimeZoneInfoProvider _timeZoneInfoProvider = timeZoneInfoProvider; | |
public override TimeZoneInfo LocalTimeZone => _timeZoneInfoProvider.GetTimeZoneInfo(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------- | |
// Learn more about configuring OpenAPI at https://aka.ms/aspnet/openapi | |
builder.Services.AddOpenApi(options => | |
{ | |
options.AddDocumentTransformer((document, context, cancellation) => | |
{ | |
document.Servers = null; | |
document.Components = new OpenApiComponents |