I know there is the ApiExplorerSettings attribute
[ApiExplorerSettings(IgnoreApi = true)]
public async Task<IActionResult> MyMethod(int id)
But that does not stop a client of the api to call the endpoint method.
I need to know if there is an attribute that disables the endpoint and does not allow requests. I want to avoid doing it by modifying the routing mechanism.