Using ABP service as controller, a default route as such will be generated for a TaskService get method: /api/services/app/taskservice/gettask
is it by default that the "service" word will also appear for task service like /taskservice in the route instead of just /task? If it's not, what could be wrong in my setup?
If it is, how can I remove it? Like in controller level, I can have api route as such /api/v1/task/gettask by having data annotation below. Is there something similar in service level (which has module name as well)
[Route("api/v{version:apiVersion}/[controller]")]
By default, only the following postfixes are removed:
public static string[] CommonPostfixes = { "AppService", "ApplicationService" };
You can do either of these:
TaskAppService
.ApplicationService.CommonPostfixes
in your module's PreInitialize
method.ApplicationService.CommonPostfixes = new string[] { "Service", "AppService", "ApplicationService" };
References: