Merge pull request #1177 from nelmio/method-annotation-doc-improve

Provide example for action summary and description
This commit is contained in:
Guilhem N 2018-01-09 12:51:51 +01:00 committed by GitHub
commit 4bd1b3ebe6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,6 +123,10 @@ To document your routes, you can use the SwaggerPHP annotations and the
class UserController
{
/*
* List the rewards of the specified user.
*
* This call takes into account all confirmed awards, but not pending or refused awards.
*
* @Route("/api/{user}/rewards", methods={"GET"})
* @SWG\Response(
* response=200,
@ -146,6 +150,8 @@ To document your routes, you can use the SwaggerPHP annotations and the
}
}
The normal PHP docblock for the controller method is used for the summary and description.
Use models
----------