andreaselia/laravel-api-to-postman
Fork: 99 Star: 956 (更新于 2024-10-18 02:06:44)
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-01 18:37:36 schmittjoh/JMSSerializerBundle
2024-10-31 21:37:53 filamentphp/filament
2024-10-28 00:16:41 symfony/var-dumper
2024-10-28 00:11:41 symfony/symfony
2024-10-11 23:44:26 coollabsio/coolify
2024-10-11 03:27:29 odan/slim4-skeleton