Download the PHP package bbrothers/http-transitions without Composer
On this page you can find all versions of the php package bbrothers/http-transitions. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bbrothers/http-transitions
More information about bbrothers/http-transitions
Files in bbrothers/http-transitions
Package http-transitions
Short Description API versioning with transition stages (migrations) based on a request header.
License MIT
Homepage https://github.com/bbrothers/http-transitions
Informations about the package http-transitions
http-transitions
A package for transitioning HTTP requests and responses based on a version header.
Release updates to your API schema without breaking existing clients by creating Transition
classes that transition the request and/or response to match the previously expected result. Each layer of transitions only needs to convert the current version to match the previous version, from there the request and response will be piped through the subsequent layers until they match the version requested in the Api-Version
header.
Largely based on Stripe's API versioning article.
Install
Middleware
In your app/Http/Kernel.php
file, add:
Service Provider
For Laravel 5.4, in your config/app.php
file, in the providers
array, add:
Publish Config
Usage
Add version numbers and an array of Transition
classes to the transitions.php
file.
Create a transition:
Transition Generators
Optionally, the --request-only
or --response-only
flags can be added to create a transform that only generates a transformRequest
or transformResponse
method respectively.
Change log
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.
All versions of http-transitions with dependencies
ext-json Version *
illuminate/config Version 5.5.*|5.6.*|5.7.*|5.8.*
illuminate/contracts Version 5.5.*|5.6.*|5.7.*|5.8.*
illuminate/http Version 5.5.*|5.6.*|5.7.*|5.8.*
illuminate/support Version 5.5.*|5.6.*|5.7.*|5.8.*