Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acseo/acseorestsensiogeneratorbundle
This bundle provide Twig template to generate CRUD REST applications with SensioGeneratorBundle
https://github.com/acseo/acseorestsensiogeneratorbundle
Last synced: 10 days ago
JSON representation
This bundle provide Twig template to generate CRUD REST applications with SensioGeneratorBundle
- Host: GitHub
- URL: https://github.com/acseo/acseorestsensiogeneratorbundle
- Owner: acseo
- Created: 2014-03-11T15:09:18.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-11T16:27:57.000Z (almost 11 years ago)
- Last Synced: 2024-11-08T18:19:45.319Z (2 months ago)
- Size: 145 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ACSEO REST Generator using SensioGeneratorBundle
This bundle provide Twig template to generate CRUD REST applications with SensioGeneratorBundle in your Symfony2 application
## Requirements
- A Symfony 2 Project with SensioGeneratorBundle (embeded by default in the Symfony Standard Distribution)
- FOSRestBundle (https://github.com/FriendsOfSymfony/FOSRestBundle)
- NelmioApiDocBundle (https://github.com/nelmio/NelmioApiDocBundle)## How to use it
### Step 1 : Get the code
Get the code using ``git submodule`` command :
````
cd /path/to/my/sf2project
git submodule add https://github.com/acseo/RESTGenerator app/Resources/SensioGeneratorBundle
````
Now you should see a directory called 'skeleton' in app/Resources/SensioGeneratorBundle### Step 2 : Generate the CRUD for an Entity
CRUD creation is just the same as the original ``app/console doctrine:generate:crud`` command.````
cd /path/to/my/sf2project
php app/console doctrine:generate:crud
````
And follow the guidelines.
Your REST controller should be generated now ! **But we must configure it**
### Step 3 : Configure POST and PUT actions
You will see that ``TODO`` insctruction have been generated in your Controller.
For now, we are not able to generate some usefull code to describe the attributes that the POST and PUT methods are waiting for.Simply edit your Controller file to make it work as you expect.