Wednesday, 23 October 2024

add header to the web api globally

 builder.Services.AddSwaggerGen(c =>

{ c.OperationFilter<AddRegionCodeHeaderParameter>(); c.EnableAnnotations(); c.SwaggerDoc("v1", new OpenApiInfo { Title = "Patient Web API", Version = "v1" }); c.OperationFilter<AddRegionCodeHeaderParameter>(); });

No comments:

Post a Comment

7 Common mistakes in Dot Net — You can avoid

  There are many common mistakes made during .NET (ASP.NET, .NET Core) development, which affect performance, security, and code… Code Crack...