Coder Social home page Coder Social logo

jmgoncalves97 / laravel-api-to-postman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from andreaselia/laravel-api-to-postman

0.0 0.0 0.0 231 KB

Generate a Postman collection automatically from your Laravel API

License: MIT License

JavaScript 0.09% PHP 99.91%

laravel-api-to-postman's Introduction

Laravel API to Postman Header

Latest Stable Version StyleCI

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.

laravel-api-to-postman's People

Contributors

andreaselia avatar tomirons avatar almightynassar avatar johnnybenson avatar martincic avatar robertmarney avatar ajanes93 avatar abdullahobaid avatar tuandp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.