andreaselia/laravel-api-to-postman
Fork: 99 Star: 958 (更新于 2024-11-08 15:41:58)
license: MIT
Language: PHP .
Generate a Postman collection automatically from your Laravel API
最后发布版本: v2.0.6 ( 2024-07-23 23:34:19)
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" --tag="postman-config"
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.
最近版本更新:(数据更新于 2024-09-23 06:44:57)
2024-07-23 23:34:19 v2.0.6
2024-05-10 00:12:03 v2.0.5
2024-05-07 19:30:35 v2.0.4
2024-05-07 00:24:18 v2.0.3
2024-04-03 00:26:55 v2.0.2
2024-03-29 03:58:28 v2.0.1
2024-03-26 21:01:07 v2.0.0
2024-03-06 20:08:06 v1.16.0
2023-02-16 07:11:54 v1.15.0
2023-01-26 01:18:42 v1.14.0
主题(topics):
api, collection, generator, insomnia, laravel-package, postman, route
andreaselia/laravel-api-to-postman同语言 PHP最近更新仓库
2024-11-22 20:08:52 coollabsio/coolify
2024-11-20 23:58:25 laravel/framework
2024-11-20 18:39:23 danielmiessler/SecLists
2024-11-16 21:54:23 w7corp/easywechat
2024-11-13 23:19:14 symfony/symfony
2024-11-13 22:53:21 symfony/var-dumper