...
Line
Skip to main content
< All Topics
Print

Techniques for hiding APIs on Swagger

  1. When you want to hide an API Controller or some Swagger EndPoint in your project. You can do this using the following command:

[ApiExplorerSettings(IgnoreApi = true)] in the Controller you want to hide.

2. To hide some EndPoints on the Controller :

Place the command [ApiExplorerSettings(IgnoreApi = true)] above the method that you want to hide.

By adding [ApiExplorerSettings(IgnoreApi = true)] in the Controller or Method that you want to hide in Swagger. You can easily hide Swagger and have the flexibility to control the scope you want to hide. Programmers can use this technique to easily customize Swagger data visualizations to meet their project needs. and more efficient

Messenger
Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.