title: Setting up Swagger in an existing PHP project
body: <p>(Please bear with me, I've never set up something like this so I'm feeling my way in the dark)</p>
  <p>I've watched some videos and read the documentation on installing swagger-php <a href="https://github.com/zircote/swagger-php" rel="nofollow noreferrer">that I found here</a>, and am trying to set up a basic bit of documentation.</p>
  <p>I've created <code>api.php</code> in <code>/application/modules/apiv1/documentation</code>:</p>
  <pre><code>&lt;?php
  require(&quot;library/vendor/autoload.php&quot;);
  $openapi = \OpenApi\Generator::scan($_SERVER['DOCUMENT_ROOT'] . '/modules/apiv1/controllers');
  header('Content-Type: application/json');
  echo $openapi-&gt;toJson();
  </code></pre>
  <p>and have a controller (<code>LocationController</code>) inside <code>/application/modules/apiv1/controllers</code>. One of the controller actions, that I'm using as my test dummy, is</p>
  <pre><code>/**
   * @OA\Get(
   *     path=&quot;/modules/apiv1/controllers/location/get&quot;,
   *     @OA\Response(response=&quot;200&quot;, description=&quot;An example resource&quot;)
   * )
   */
  public function getAction()
  {...}
  </code></pre>
  <p>What I'm trying to do next is to actually view the generated documentation on my local environment, but I have no idea how to view it, so the question is: Is there more setup for me to do to be able to view it? I've done the composer install shown on the zircote github: <code>composer global require zircote/swagger-php</code> but am not sure what my next step is, and I can't seem to find any &quot;How to set up swagger for dummies&quot; stuff, etc</p>