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:
-
[ApiExplorerSettings(IgnoreApi = true)]
-
[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)
-
0
Hi,
You can take a look at Document Filters and Operation Filters
<a class="postlink" href="https://github.com/domaindrivendev/Swashbuckle#documentfilter">https://github.com/domaindrivendev/Swas ... mentfilter</a>
<a class="postlink" href="https://github.com/domaindrivendev/Swashbuckle#operationfilter">https://github.com/domaindrivendev/Swas ... tionfilter</a> -
0
if you hide the endpoint from Swagger then proxy generation will break.
but there must be some options to run JS code when the swagger UI splashes.
basically you can run a JS method and hide those you don't want.