1. Go to this page and download the library: Download googoogajoob/openapi-slim4 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
googoogajoob / openapi-slim4 example snippets
/* BEGIN ROUTE AND MIDDLEWARE CONFIGURATION
When using OpenApiSlim4, only the ELSE branch would be needed */
if ($container->get('nativeSlimConfiguration')) {
nfigurator = new OpenApiSlim4($container->get('openApiPath'), $app, $logger, $throwExceptionOnInvalid);
if (!$openApiConfigurator->configureFramework()) {
throw new Exception($openApiConfigurator->getValidationMessagesString());
}
}
/* END ROUTE AND MIDDLEWARE CONFIGURATION */
$openApiConfigurator = new OpenApiSlim4($container->get('openApiPath'), $app, $logger, $throwExceptionOnInvalid);
$openApiConfigurator->configureFramework();