Description
I have created a custom controller Which inherits from BaseJsonApiController<> and i have overridden methods like GetAsync, GetById, PatchResource, PostResource. So while running the application getting error from swagger that says : An unhandled exception has occurred while executing the request. Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Ambiguous HTTP method for action - Controllers.RaceController.GetSecondaryAsync. Actions require an explicit HttpMethod binding for Swagger/OpenAPI 3.0
Also, even if i use specific service then also it generates all the controller endpoints Example :
public class BaseController<TResource, TIdentifier> : BaseJsonApiController<TResource, TIdentifier> where TResource : class, IIdentifiable where TIdentifier : struct { public BaseController(IJsonApiOptions options, IResourceGraph resourceGraph, ILoggerFactory loggerFactory, IGetAllService<TResource, TIdentifier> getAllService) : base(options, resourceGraph, loggerFactory, getAllService) {
} }
Now in the above example it will create endpoints for PostAsync as well which it should not as per the documentation.
I wanted to get only the routes endpoint generated for those the methods has been overridden from the BaseJsonApiController but currently it is generating all the endpoints. I am using version 5.3.0 of JsonApiDotNetCore