szonov / slim-route-export
Display routes and postman import for Slim application
v1.0.0
2019-03-07 09:01 UTC
Requires
- php: >=7.0
- slim/php-view: ^2.0
- slim/slim: ^3.0
This package is auto-updated.
Last update: 2025-02-08 07:19:32 UTC
README
3 additional endpoints for your slim application under defined root (by default /export).
- /export/documentation.html - html list of routes
- /export/documentation.json - json file for html documentation
- /export/postman.json - can be imported to postman
How to use:
<?php // vendor should be included require __DIR__ . '/../vendor/autoload.php'; // Slim app should be created $settings = require __DIR__ . '/../src/settings.php'; $app = new \Slim\App($settings); // then you can attach these 3 routes (new SZonov\SlimRouteExport\ExportBootstrap('/export'))->__invoke($app);