Skip to content

Implement a RESTful API with the Symfony HttpKernel

License

Notifications You must be signed in to change notification settings

sral97/php-rest-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Scrutinizer Code Quality Code Coverage Total Downloads Latest Stable Version Latest Unstable Version SensioLabs Insight License

MediaMonks Rest API

This library contains an event subscriber to easily create a Rest API with the Symfony HttpKernel. By default this library will output according to our MediaMonks Rest API spec but since we believe it could be very useful for other companies too it's very easy to extend it or implement your own.

Highlights

  • Scalars, arrays and objects will be converted automatically
  • Thrown exceptions will be converted automatically
  • Supports custom serializers like JMS, uses json serializer by default
  • Supports custom response models
  • Supports application/json, application/x-www-form-urlencoded & multipart/form-data input
  • Supports method overriding
  • Supports forcing a "200 OK" status method
  • Supports paginated responses
  • Supports wrapping json response in a method (jsonp) and post message
  • Should work with any framework that uses HttpKernel

Documentation

Documentation and examples can be found in the /docs folder.

Requirements

  • PHP >= 7.1

To use the library.

Installation

For Symfony Framework users it is recommended to install the Rest API Bundle instead of this library.

Install this package by using Composer.

$ composer require mediamonks/rest-api

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

Implement a RESTful API with the Symfony HttpKernel

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%