Last active
July 12, 2018 09:35
-
-
Save AhmedHelalAhmed/084e17f887a6e65ca8cfbac93e4e7593 to your computer and use it in GitHub Desktop.
swagger doc for laravel
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
/** | |
* @SWG\Get( | |
* path="/create", | |
* description="Return a user's first and last name", | |
* @SWG\Parameter( | |
* name="firstname", | |
* in="query", | |
* type="string", | |
* description="Your first name", | |
* required=true, | |
* ), | |
* @SWG\Parameter( | |
* name="lastname", | |
* in="query", | |
* type="string", | |
* description="Your last name", | |
* required=true, | |
* ), | |
* @SWG\Response( | |
* response=200, | |
* description="OK", | |
* ), | |
* @SWG\Response( | |
* response=422, | |
* description="Missing Data" | |
* ) | |
* ) | |
*/ |
./vendor/bin/swagger ./app/Http --output public/api/
parameters
in query ===> post request
in path
in header
in body
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://blog.marcoraddatz.com/en/2015/07/21/integrate-swagger-into-laravel/
https://medium.com/@garrettvorce/getting-started-with-laravel-and-swagger-b14c66f35576