case 4670 net10.0 + Asp.Versioning + BouncyCastle.Cryptography 2.7.0 + MailKit 4.x (forced: MimeKit 3.x pulled Portable.BouncyCastle)

sockeye.tests retargeted to net10.0, packages current. Re-sign harness: 1399/1399.
AV0014 suppressed: licence controllers were never versioned under 5.x defaults.
This commit is contained in:
2026-09-23 14:01:40 -07:00
parent a0c06e4d82
commit 12f095939c
62 changed files with 112 additions and 28 deletions

View File

@@ -4,7 +4,6 @@ using System.Linq;
using System;
using System.Collections.Generic;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.EntityFrameworkCore;
@@ -22,6 +21,8 @@ using Sockeye.Generator;
using Sockeye.Biz;
using NLog.Extensions.Logging;
using StackExchange.Profiling;
using Asp.Versioning.ApiExplorer;
using Asp.Versioning;
namespace Sockeye
@@ -195,28 +196,46 @@ namespace Sockeye
// #region Swagger
// services
// .AddApiVersioning(options =>
// {
// options.AssumeDefaultVersionWhenUnspecified = true;
// options.DefaultApiVersion = new ApiVersion(8,0);// Microsoft.AspNetCore.Mvc.ApiVersion.Parse("8.0");
// options.ReportApiVersions = true;
// });
// 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
// //THIS IS WHAT ADDS THE API version PARAMETER AUTOMATICALLY so you don't need to type an 8 in every swagger-ui route test
// options.SubstituteApiVersionInUrl = true;
// });
#region Swagger
services
.AddApiVersioning(options =>
{
options.AssumeDefaultVersionWhenUnspecified = true;
options.DefaultApiVersion = Microsoft.AspNetCore.Mvc.ApiVersion.Parse("8.0");
options.ReportApiVersions = true;
});
services.AddVersionedApiExplorer(options =>
{
.AddApiVersioning(options =>
{
options.AssumeDefaultVersionWhenUnspecified = true;
options.DefaultApiVersion = new ApiVersion(8, 0);
options.ReportApiVersions = true;
})
.AddMvc()
.AddApiExplorer(options =>
{
// format the version as "'v'major[.minor][-status]"
options.GroupNameFormat = "'v'VVV";
// 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
//THIS IS WHAT ADDS THE API version PARAMETER AUTOMATICALLY so you don't need to type an 8 in every swagger-ui route test
options.SubstituteApiVersionInUrl = true;
});
// THIS IS WHAT ADDS THE API version PARAMETER AUTOMATICALLY so you don't need to type an 8 in every swagger-ui route test
options.SubstituteApiVersionInUrl = true;
});
services.AddTransient<IConfigureOptions<SwaggerGenOptions>, ConfigureSwaggerOptions>();
services.AddSwaggerGen(
c =>