szonov/slim-route-export

显示 Slim 应用程序的路由和 Postman 导入

v1.0.0 2019-03-07 09:01 UTC

This package is auto-updated.

Last update: 2024-09-08 06:26:38 UTC


README

在定义的根目录下(默认为 /export)为您的 slim 应用程序提供 3 个额外的端点。

  • /export/documentation.html - 路由的 html 列表
  • /export/documentation.json - 用于 html 文档的 json 文件
  • /export/postman.json - 可以导入到 Postman

如何使用

<?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);