Is there a way to disable/hide an endpoint in swagger file (json/doc/yamlConfig)?
See original GitHub issueHi,
I have generated a Swagger for an API consisting of both internal and external methods. The internal methods should not be consumed by external clients, and thus not exposed in my API Gateway afterwards.
I want to expose to my gateway just a white list of controllers/actions, I thought to update the swagger json/yaml config like this for example:
"paths": {
"/api/BankAccountApi/GetBankAccount": {
"post": {
"tags": [
"internal"
],
"hidden": true // this what I'm looking for
Is there a way to remove/hide/disable certain methods from swagger specification? Any annotations we could use, to flag methods as private or public or any alternative?
Thank you!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:7
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Being able to hide a path from the Swagger UI would be useful. Still accessible via the API just not shown in the UI. We have some “admin” paths we don’t need to show our API users.
+1 it would be awesome to be able to use the spec for request/response validation without including specific paths in the UI