Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaytaph/restifony
Rest API framework based on Symfony2
https://github.com/jaytaph/restifony
Last synced: 22 days ago
JSON representation
Rest API framework based on Symfony2
- Host: GitHub
- URL: https://github.com/jaytaph/restifony
- Owner: jaytaph
- License: bsd-3-clause
- Created: 2015-06-20T18:31:09.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-20T18:51:46.000Z (over 9 years ago)
- Last Synced: 2024-04-14T22:18:53.145Z (7 months ago)
- Size: 141 KB
- Stars: 4
- Watchers: 9
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# restifony (working title)
Rest API framework based on Symfony.# Purpose
An API framework that can be placed on top of the Symfony2 (3) framework that allows you to easily create simple and complex RESTful API's.# Features
- Full hateoas supported HTTP and REST apis (hateoasbundle / custom / noxlogic serializer)
- Commandline generators for resources (custom)
- Commandline configurator (custom)
- Auto routing for controllers (fosrest / custom)
- Content negotiation (custom)
- Multiple content output (noxlogic/jms serializerbundle)
- Rate limititing (noxlogic-ratelimit)
- OAuth authentication (fosoauth)
- basic authentication (symfony2)
- autogenerated documentation and sandboxing (custom / nelmioapidocbundle)
- API versioning (based on either url and/or accept-type)
- RAML support (http://raml.org/)This bundle could be added to an existing project by a simple `composer require`, however, it should be possible to bootstrap a system by using `composer create-project` as well.
The system should be "plug and play". For instance, when a user wants to enable oauth for authentication, it should be a simple command to enable this. Underwater, it should do nothing more than include the correct bundle and instantiate this, so more advanced users can easily customize it as well.
# Why a new system
A big drawback of existing bundles is that they all need to be configured manually, and not all of them are working in a proper rest-ful context way. For instance, the jms-serializer bundle works correctly in collaboration with bazingahateoas, but lacks the methodology of creating customized mappings, as it uses the simple expression language that maps entities to resources. However, a (database) entity is NOT a representation of a resource, which is what REST returns. The mapping of any entity (even "virtual entities" that do not have a database-entities, for instance), should be easily be done without resolving to very complex code written in either annotations or yaml configurations.A complete rest-system would also make it much easier to get started in a proper way. Without worrying about what kind of error triggers what http code, a user could easily create a crud-controller for a resource with the correct code through a simple generator.
# Adherence to the REST constraints
This bundle should aim to adhere the rest constraints as much as possible, but still allow to deviate from them for practial purposes. For instance, it might be that end-users would like to use complete API versioning through url (like: `/api/v1/..` instead of resource versioning).# API consuming
An API should be consumed, and the bundle should / could provide a simple way to do this. There could be a simple setup that generate DTO's for the given resources.# Customization
Since all the system should do, is install bundle, setup configuration and generate code, it should be easy for users to customize anything. But even without this customization, the system should be easy en flexible enough for most api's to begin with.