Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/profclems/postman-collection-generator
A package that automatically generates postman collection from laravel api/web routes
https://github.com/profclems/postman-collection-generator
composer-package laravel-package library php
Last synced: 8 days ago
JSON representation
A package that automatically generates postman collection from laravel api/web routes
- Host: GitHub
- URL: https://github.com/profclems/postman-collection-generator
- Owner: profclems
- License: mit
- Created: 2020-06-18T02:42:13.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-27T09:42:04.000Z (over 3 years ago)
- Last Synced: 2024-10-16T14:58:05.169Z (23 days ago)
- Topics: composer-package, laravel-package, library, php
- Language: PHP
- Homepage: https://csam.dev/postman-collection-generator/
- Size: 79.1 KB
- Stars: 67
- Watchers: 6
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/profclems/postman-collection-generator.svg?branch=master)](https://travis-ci.com/profclems/postman-collection-generator)
[![Latest Stable Version](https://poser.pugx.org/profclems/postman-collection-generator/v)](//packagist.org/packages/profclems/postman-collection-generator)
[![Total Downloads](https://poser.pugx.org/profclems/postman-collection-generator/downloads)](//packagist.org/packages/profclems/postman-collection-generator)
[![Latest Unstable Version](https://poser.pugx.org/profclems/postman-collection-generator/v/unstable)](//packagist.org/packages/profclems/postman-collection-generator)
[![License](https://poser.pugx.org/profclems/postman-collection-generator/license)](https://github.com/profclems/postman-collection-generator/blob/master/LICENSE)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/profclems/postman-collection-generator/issues)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fprofclems%2Fpostman-collection-generator.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fprofclems%2Fpostman-collection-generator?ref=badge_shield)## About
This package automatically generates postman collection from laravel api/web routes with just a single command## Postman Schema
Supports postman collection [Schema v2.1.0](https://schema.getpostman.com/json/collection/v2.1.0/collection.json)## Installation
Install this bundle through [Composer](https://getcomposer.org/):
```bash
composer require profclems/postman-collection-generator
```
Supports Auto-discovery for Laravel 5.5+For older versions add the PostmanCollectionServiceProvider to providers in the config/app.php
```php
'providers' => [
...
\Profclems\PostmanCollectionGenerator\PostmanCollectionServiceProvider::class,
];
```
## UsageTo generate collection for api routes, run
```sh
php artisan postman:collection:export NameForCollection --api
```
This will generate a ```yyyy_mm_dd_his_NameForCollection_api.json``` in your Laravel ```storage/app``` folder.To generate collection for web routes, run
```sh
php artisan postman:collection:export NameForCollection --web
```
This will generate a ```yyyy_mm_dd_his_NameForCollection_web.json``` in your Laravel ```storage/app``` folder.Change `NameForCollection` to the name you want the collection file saved as.
## Options
By default, the url is set to ```{{base_url}}``` which is a postman variable that can be set in your postman environment.
```bash
--api or --web to specify the type of route to export
--url to specify the url for the collection. Eg. --url=localhost
--port to specify the port. Eg --port=8000
```
## ToDo
- Add support for other popular PHP frameworks
- Convert postman collection to api/web routes## Contributing
Thank you for considering contributing to the this package! Feel free to submit a PR## Awards / Nominations
[![PHP Classes Innovative Award Nominee](https://www.phpclasses.org/award/innovation/nominee.gif "PHP Classes Innovative Award June 2020 Nominee")](https://www.phpclasses.org/package/11687-PHP-Generate-routes-for-an-API-or-Web-applications.html)## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fprofclems%2Fpostman-collection-generator.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fprofclems%2Fpostman-collection-generator?ref=badge_large)