Skip to content

Instantly share code, notes, and snippets.

View TerenceCLZhang's full-sized avatar

Terence Zhang TerenceCLZhang

View GitHub Profile
builder.Services.AddSwaggerGen(options =>
{
options.AddSecurityDefinition(
"Bearer",
new OpenApiSecurityScheme
{
In = ParameterLocation.Header,
Description = "Please enter a valid token.",
Name = "Authorization",
Type = SecuritySchemeType.Http,