title: How to hide Api-plaform Docs from Nelmio Docs
body: <p>I hope someone could help me to use Api-platorm with Nelmio.</p>
  
  <p>I use Api-plaform and Nelmio. I need to hide the Api-platform docs from Nelmio.</p>
  
  <p>I need to have 3 routes:</p>
  
  <pre><code>/internal -&gt; API-Platform Docs
  /external -&gt; NELMIO-Docs
  /admin -&gt; NELMIO-Docs
  </code></pre>
  
  <p>My config of Nelmio:</p>
  
  <pre><code># config/packages/nelmio_api_doc.yaml
  nelmio_api_doc:
      documentation:
          info:
              title: ...
              description: ...
              version: 0.2.0
      areas: # to filter documented areas
          default:
              path_patterns: [ ^/external ]
          external:
              path_patterns: [ ^/external ]
          admin:
              path_patterns: [ ^/admin ]
  </code></pre>
  
  <p>My config of Nelmio (routes):</p>
  
  <pre><code># config/routes/nelmio_api_doc.yaml
  app.swagger:
      path: /{area}/json
      methods: GET
      defaults: { _controller: nelmio_api_doc.controller.swagger, area: default }
  
  app.swagger_ui:
      path: /{area}
      methods: GET
      defaults: { _controller: nelmio_api_doc.controller.swagger_ui, area: default }
  </code></pre>
  
  <p>My config of API-Platform:</p>
  
  <pre><code># config/routes/api_platform.yaml
  api_platform:
      resource: .
      type: api_platform
      prefix: /internal/
  </code></pre>
  
  <p>But if I go to <a href="http://localhost/external" rel="nofollow noreferrer">http://localhost/external</a> or <a href="http://localhost/admin" rel="nofollow noreferrer">http://localhost/admin</a> I see always not only needed routes, but also the routes from API-Platform:</p>
  
  <p><a href="https://i.stack.imgur.com/fXG5J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fXG5J.jpg" alt="enter image description here"></a></p>