Commit c4d51b79 by shipengwei

Merge branch 'master' of git.aipark.com:eoc-group/dotnet-cicd-demo

parents 30fc80c1 1c7eb718
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "9.0.8",
"commands": [
"dotnet-ef"
],
"rollForward": false
}
}
}
\ No newline at end of file
...@@ -12,15 +12,22 @@ namespace DotNetCicdDemo ...@@ -12,15 +12,22 @@ namespace DotNetCicdDemo
builder.Services.AddControllers(); builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer(); builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(); builder.Services.AddSwaggerGen(option =>
{
option.SwaggerDoc("v1", new() { Title = "DotNetCicdDemo", Version = "v1" });
});
var app = builder.Build(); var app = builder.Build();
// Configure the HTTP request pipeline. // Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment()) //if (app.Environment.IsDevelopment())
{ {
app.UseSwagger(); app.UseSwagger();
app.UseSwaggerUI(); app.UseSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "DotNetCicdDemo v1");
options.RoutePrefix = string.Empty;
});
} }
app.UseAuthorization(); app.UseAuthorization();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment