title: Flask Restplus disable API Endpoint when condition does not meet
body: <p>Can I know how to disable flask restplus endpoint?</p>
  
  <p>I am trying to do something like when a condition does not meet, the endpoint is disabled and cannot be accessed.</p>
  
  <p>Is there a way we can do this in flask restplus or custom code is required?</p>
  
  <p>I know that we can disable the endpoint in swagger documentation. However, that doesn't disable the endpoint as it stills can be accessed via curl. <a href="http://localhost:8080/api_endpoint/" rel="nofollow noreferrer">http://localhost:8080/api_endpoint/</a></p>