mi/rest-extra-bundle
最新稳定版本:3.0.5
Composer 安装命令:
composer require mi/rest-extra-bundle
包简介
Helper to avoid annotations with FOSRestBundle and SensioFrameworkExtraBundle
README 文档
README
Overview
...
Installation
- Add this bundle to your project as a composer dependency:
composer require mi/rest-extra-bundle
-
Add this bundle in your application kernel:
// app/AppKernel.php public function registerBundles() { // ... $bundles[] = new \Mi\Bundle\RestExtraBundle\MiRestExtraBundle(); return $bundles; }
Usage
ParamConverterListener
```yaml
#routing.yml
mi_rest_extra_create:
...
defaults:
...
_converters:
note:
name: note
converter: fos_rest.request_body
class: Mi\RestExtra\Core\Model\Note
```
ParamFetcherListener
```yaml
#routing.yml
mi_rest_extra_create:
...
defaults:
...
_params:
startDate:
strict: true
nullable: false
```
ViewListener
```yaml
#routing.yml
mi_rest_extra_create:
...
defaults:
...
_view:
serializerGroups: [list]
```
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create new Pull Request
License
This library is under the MIT license.
统计信息
- 总下载量: 14.97k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-08