dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page:https://asp.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AddRoleValidator incorrect generic argument name

Narsun opened this issue · comments

According to the documentation, method Microsoft.AspNetCore.Identity.IdentityBuilder.AddRoleValidator adds an IRoleValidator.
But! Name of generic parameter of method AddRoleValidator is TRole, instead of TValidator or TValidator.
image
on this screenshot we can see, <typeparam name="TRole">The role validator type.</typeparam>, but TRole is incorrect name for this. I think, it called like in AddUserValidator, - TValidator. because TRole or TUser - is a concrete implementation of TEntity, not an TValidator.
doc: https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.identitybuilder.addrolevalidator?view=aspnetcore-6.0
https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.identity.identitybuilder.adduservalidator?view=aspnetcore-6.0

Triage: Yea, this name isn't great... unfortunately however, we don't think this meets the bar for making an API breaking change.