swagger-api / swagger-node

Swagger module for node.js
http://swagger.io
Apache License 2.0
3.97k stars 584 forks source link

Hide endpoints based on yaml/spec #320

Open GiladShoham opened 8 years ago

GiladShoham commented 8 years ago

Hi,

I want to add some attribute to my yaml spec for example x-hide : true/false so that the swagger-ui will know to not show those endpoints. i can't remove them completely from the yaml because im using swagger-node / swagger-express-mw so it's define the express mw based on this yaml, so if i remove them i can't use them at all. i want them to be reachable but just not presented on the ui (because documentaion isn't ready yet / because they are mostly internally APIs that doesn't interest for the API users). is there any way to do it? maybe someone can help me to the best way to do it if there isn't out of the box?

I posted this issue in swagger-ui here - https://github.com/swagger-api/swagger-ui/issues/1743 but @fehguy told me to post it here for implementing something similar to x-inflector-hidden from swagger-inflector

Thanks.

fractalawareness commented 8 years ago

+1

soohoowoohoo commented 7 years ago

+1

abeikverdi commented 6 years ago

what happened to this?

ksaubhri123 commented 6 years ago

I also want this feature but I am not using any swagger-library like inflector or any other thing. I am creating my document by writing all the specification manually. So if anyone finds a solution please do tell. I am writing my document in OAS 3.0