Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
64 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
Manual definition of routes | ||
===================================== | ||
|
||
If the automatic route generation does not fit your needs, you can manually define a route using simple annotations. This is very helpful if you want to have more than 1 url parameter without having a static word in between them. | ||
|
||
For a full list of annotations check out FOS/RestBundle/Controller/Annotations | ||
|
||
## Delete Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Delete; | ||
|
||
/** | ||
* DELETE Route annotation. | ||
* @Delete("/likes/{type}/{typeId}") | ||
*/ | ||
|
||
## Head Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Head; | ||
|
||
/** | ||
* HEAD Route annotation. | ||
* @Head("/likes/{type}/{typeId}") | ||
*/ | ||
|
||
## Get Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Get; | ||
|
||
/** | ||
* GET Route annotation. | ||
* @Get("/likes/{type}/{typeId}") | ||
*/ | ||
## Patch Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Patch; | ||
|
||
/** | ||
* PATCH Route annotation. | ||
* @Patch("/likes/{type}/{typeId}") | ||
*/ | ||
## Post Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Post; | ||
|
||
/** | ||
* POST Route annotation. | ||
* @Post("/likes/{type}/{typeId}") | ||
*/ | ||
## Put Route Definition | ||
use FOS\RestBundle\Controller\Annotations\Put; | ||
|
||
/** | ||
* PUT Route annotation. | ||
* @Put("/likes/{type}/{typeId}") | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters