How to disable dynamic WebAPI for certain application services

437 views Asked by At

I want to turn off the automatic WebAPI generation service for a specific application service in my ABP project.

1

There are 1 answers

1
Alper Ebicoglu On

RemoteService attribute can be used to mark a class as a remote service or disable for a particular class that inherently implements the IRemoteService interface

[RemoteService(false)]
public class PersonAppService : ApplicationService
{

}

if you just want to hide from Swagger

[RemoteService(IsMetadataEnabled = false)]
public class PersonAppService : ApplicationService
{

}