Skip to content

jonhermansen/php-slim-swagger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-slim-swagger

Slim needs a simpler way to define an Swagger API. No docblock magic, just code.

This project is at an early stage. Functionality will break.

Usage

Adding the dependencies to the container

You need to override the router and add the swagger liberary to Slim. A clean way of doing this is BEFORE the $app object is initiated.

Minimal example:

use Slim\App;
use SlimSwagger\SlimSwagger;

$container = SlimSwagger::init();
$app = new App($container);

Installing the swagger route:

use SlimSwagger\SwaggerAction;

$app->get('/swagger.json', SwaggerAction::class);

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published