Is there an existing issue for this?
Describe the bug
To reproduce:
builder.Services.AddApiVersioning(
options =>
{
options.ReportApiVersions = true;
options.ApiVersionReader = new UrlSegmentApiVersionReader();
})
.AddApiExplorer(
options =>
{
options.GroupNameFormat = "'v'VV";
options.SubstitutionFormat = "VV";
options.SubstituteApiVersionInUrl = true;
})
.AddOpenApi();
var app = builder.Build();
app.MapOpenApi().WithDocumentPerVersion();
IVersionedEndpointRouteBuilder versionedApi = app.NewVersionedApi();
RouteGroupBuilder v1Group = versionedApi.MapGroup("v{version:apiVersion}").HasApiVersion(1.0);
// This one throws
v1Group.MapGet(
"test",
async Task<ContentHttpResult> (
[FromKeyedServices("service name")] SomeService someService) =>
{
//...
});
// While this one not
app.MapGet("test2",
async Task<ContentHttpResult> (
[FromKeyedServices("service name")] SomeService someService) =>
{
//...
});
See discussion and cause: #1176 (comment)
@commonsensesoftware May I expect a quick fix? Since it totally breaks the usage of KeyedService.
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response
Is there an existing issue for this?
Describe the bug
To reproduce:
See discussion and cause: #1176 (comment)
@commonsensesoftware May I expect a quick fix? Since it totally breaks the usage of
KeyedService.Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response