(Please bear with me, I've never set up something like this so I'm feeling my way in the dark)
I've watched some videos and read the documentation on installing swagger-php that I found here, and am trying to set up a basic bit of documentation.
I've created api.php in /application/modules/apiv1/documentation:
<?php
require("library/vendor/autoload.php");
$openapi = \OpenApi\Generator::scan($_SERVER['DOCUMENT_ROOT'] . '/modules/apiv1/controllers');
header('Content-Type: application/json');
echo $openapi->toJson();
and have a controller (LocationController) inside /application/modules/apiv1/controllers. One of the controller actions, that I'm using as my test dummy, is
/**
* @OA\Get(
* path="/modules/apiv1/controllers/location/get",
* @OA\Response(response="200", description="An example resource")
* )
*/
public function getAction()
{...}
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: composer global require zircote/swagger-php but am not sure what my next step is, and I can't seem to find any "How to set up swagger for dummies" stuff, etc