This commit is contained in:
@@ -10,6 +10,8 @@ UPDATE all the things before commencing work
|
||||
|
||||
|
||||
- API explorer should fill in v8 automatically to save typing
|
||||
- doesn't appear to be a changed setting, probably changed how it works.
|
||||
- Look into issues with project and how to specify
|
||||
- Add automated test to retrieve a manual page to ensure it's working
|
||||
- Add automated test to retrieve metrics to know it's working
|
||||
- Add automated test to retrieve apiroot page to know it's working
|
||||
|
||||
@@ -34,20 +34,20 @@ namespace AyaNova
|
||||
{
|
||||
/////////////////////////////////////////////////////////////
|
||||
//
|
||||
public Startup( Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment)
|
||||
public Startup(Microsoft.AspNetCore.Hosting.IWebHostEnvironment hostingEnvironment)
|
||||
{//ILogger<Startup> logger, ILoggerFactory logFactory,
|
||||
|
||||
// Get the factory for ILogger instances.
|
||||
var nlogLoggerProvider = new NLogLoggerProvider();
|
||||
// Get the factory for ILogger instances.
|
||||
var nlogLoggerProvider = new NLogLoggerProvider();
|
||||
|
||||
// Create an ILogger.
|
||||
_newLog = nlogLoggerProvider.CreateLogger(typeof(Startup).FullName);
|
||||
// Create an ILogger.
|
||||
_newLog = nlogLoggerProvider.CreateLogger(typeof(Startup).FullName);
|
||||
|
||||
//x_log = logger;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
//AyaNova.Util.ApplicationLogging.LoggerFactory = logFactory;
|
||||
//AyaNova.Util.ApplicationLogging.theLogger = _newLog;
|
||||
AyaNova.Util.ApplicationLogging.LoggerProvider=nlogLoggerProvider;
|
||||
AyaNova.Util.ApplicationLogging.LoggerProvider = nlogLoggerProvider;
|
||||
|
||||
//this must be set here
|
||||
ServerBootConfig.AYANOVA_CONTENT_ROOT_PATH = hostingEnvironment.ContentRootPath;
|
||||
@@ -56,7 +56,7 @@ namespace AyaNova
|
||||
|
||||
private readonly ILogger _newLog;
|
||||
|
||||
// private readonly ILogger<Startup>x_log;
|
||||
// private readonly ILogger<Startup>x_log;
|
||||
private string _connectionString = "";
|
||||
private readonly Microsoft.AspNetCore.Hosting.IWebHostEnvironment _hostingEnvironment;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace AyaNova
|
||||
_newLog.LogDebug("BOOT: init controllers");
|
||||
var MvcBuilder = services.AddControllers(config =>
|
||||
{
|
||||
// config.Filters.Add(new AyaNova.Api.ControllerHelpers.ApiCustomExceptionFilter(AyaNova.Util.ApplicationLogging.LoggerFactory));
|
||||
// config.Filters.Add(new AyaNova.Api.ControllerHelpers.ApiCustomExceptionFilter(AyaNova.Util.ApplicationLogging.LoggerFactory));
|
||||
config.Filters.Add(new AyaNova.Api.ControllerHelpers.ApiCustomExceptionFilter(_newLog));
|
||||
});
|
||||
|
||||
@@ -181,7 +181,17 @@ namespace AyaNova
|
||||
options.DefaultApiVersion = Microsoft.AspNetCore.Mvc.ApiVersion.Parse("8.0");
|
||||
options.ReportApiVersions = true;
|
||||
});
|
||||
services.AddVersionedApiExplorer(options => options.GroupNameFormat = "'v'VVV");
|
||||
services.AddVersionedApiExplorer(options =>
|
||||
{
|
||||
|
||||
// add the versioned api explorer, which also adds IApiVersionDescriptionProvider service
|
||||
// note: the specified format code will format the version as "'v'major[.minor][-status]"
|
||||
options.GroupNameFormat = "'v'VVV";
|
||||
|
||||
// note: this option is only necessary when versioning by url segment. the SubstitutionFormat
|
||||
// can also be used to control the format of the API version in route templates
|
||||
options.SubstituteApiVersionInUrl = true;
|
||||
});
|
||||
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
|
||||
services.AddSwaggerGen(
|
||||
c =>
|
||||
@@ -396,7 +406,7 @@ namespace AyaNova
|
||||
// ******************** TESTING WIPE DB *****************************
|
||||
//
|
||||
//Set this to true to wipe the db and reinstall a trial license and re-seed the data
|
||||
var TESTING_REFRESH_DB = true;//#######################################################################################
|
||||
var TESTING_REFRESH_DB = false;//#######################################################################################
|
||||
|
||||
#if (DEBUG)
|
||||
//TESTING
|
||||
|
||||
Reference in New Issue
Block a user