builds
This commit is contained in:
parent
ca079e1c47
commit
6f79be26d8
33 changed files with 554 additions and 369 deletions
|
|
@ -1,4 +1,6 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
|
|
@ -22,9 +24,14 @@ using Microsoft.OpenApi.Models;
|
|||
using System.IO;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using isnd.Data.Catalog;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace isnd
|
||||
{
|
||||
|
||||
public class Startup
|
||||
{
|
||||
|
||||
|
|
@ -97,8 +104,11 @@ namespace isnd
|
|||
ValidateAudience = false
|
||||
};
|
||||
});
|
||||
services.AddControllersWithViews();
|
||||
|
||||
services.AddControllersWithViews()
|
||||
.AddNewtonsoftJson(s => {
|
||||
s.SerializerSettings.ReferenceResolverProvider = () => new NSJWebApiReferenceResolver();
|
||||
} );
|
||||
services.AddSwaggerGen(options =>
|
||||
{
|
||||
options.SwaggerDoc("v1", new OpenApiInfo
|
||||
|
|
@ -135,7 +145,6 @@ namespace isnd
|
|||
app.UseMigrationsEndPoint();
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -145,7 +154,6 @@ namespace isnd
|
|||
}
|
||||
app.UseStatusCodePages().UseStaticFiles().UseAuthentication();
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue