andreaselia/laravel-api-to-postman
Composer 安装命令:
composer require andreaselia/laravel-api-to-postman
包简介
Generate a Postman collection automatically from your Laravel API
README 文档
README
Laravel API to Postman
This package allows you to automatically generate a Postman collection based on your API routes. It also provides basic configuration and support for bearer auth tokens and basic auth for routes behind an auth middleware.
For POST and PUT requests that utilizes a FormRequest, you can optionally scaffold the request, and publish rules in raw or human readable format.
Postman Schema
The generator works for the latest version of the Postman Schema at the time of publication (v2.1.0).
Installation
Install the package:
composer require andreaselia/laravel-api-to-postman
Publish the config file:
php artisan vendor:publish --provider="AndreasElia\PostmanGenerator\PostmanGeneratorServiceProvider"
Configuration
You can modify any of the api-postman.php config values to suit your export requirements.
Click here to view the config attributes.
Usage
The output of the command being ran is your storage/app directory.
To use the command simply run:
php artisan export:postman
The following usage will generate routes with the bearer token specified.
php artisan export:postman --bearer="1|XXNKXXqJjfzG8XXSvXX1Q4pxxnkXmp8tT8TXXKXX"
The following usage will generate routes with the basic auth specified.
php artisan export:postman --basic="username:password123"
If both auths are specified, bearer will be favored.
Examples
This is with the default configuration and a bearer token passed in:
php artisan export:postman --bearer=123456789
Contributing
You're more than welcome to submit a pull request, or if you're not feeling up to it - create an issue so someone else can pick it up.
andreaselia/laravel-api-to-postman 适用场景与选型建议
andreaselia/laravel-api-to-postman 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 635.64k 次下载、GitHub Stars 达 1.05k, 最近一次更新时间为 2020 年 12 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「api」 「laravel」 「collection」 「generate」 「Postman」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 andreaselia/laravel-api-to-postman 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 andreaselia/laravel-api-to-postman 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 andreaselia/laravel-api-to-postman 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package provides type-safe extension of the laravel collection, forcing a single type of object.
Traits to build collections of specific objects
A PSR-7 compatible library for making CRUD API endpoints
ItalyStrap Helpers
Froq! Collection.
Model and Collection classes
统计信息
- 总下载量: 635.64k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1048
- 点击次数: 12
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-24
