Base solution for your next web application
Open Closed

Hide specific API's only from Swagger UI #4755


User avatar
0
bolenton created

Hi,

I want to hide some API's only on Swagger UI but these hidden should be called from client script(Javascript).

I want to hide all the inbuilt API's of Asp.Net zero and show only the API's written by me. These hidden API's should work whenever we call from the script.

I have tried some options like setting the attribute on the appservices/methods:

  1. [ApiExplorerSettings(IgnoreApi = true)]

  2. [RemoteService(IsMetadataEnabled = false)]

These works well for hiding them on Swagger but, they no more exists while calling such appservices from the javascript.

Thnaks.


2 Answer(s)