title: ASP.NET Core - Swagger - Public and private swagger pages
body: <p>We have an API that contains some endpoints we want to expose publicly, and also some that we don't. However I don't simply want to exclude the private endpoints, I still want them to be visible, but only for certain users or at least under a different url. This seems like it should be fairly common but I am having trouble finding out how to do this. </p>
  
  <p>Currently we have swagger set up and working, showing all endpoints. Some controllers are marked as a "public" group using the <code>ApiExplorerSettings</code> attribute like so (where <code>SwaggerGroups.Public</code> is a string constant "public"):</p>
  
  <pre class="lang-cs prettyprint-override"><code>[ApiExplorerSettings(GroupName = SwaggerGroups.Public)]
  </code></pre>
  
  <p>Ideally we would have one swagger page that shows all controllers/methods marked public, and another, password secured endpoint that shows all endpoints. Is this possible?</p>