Skip to content

Instantly share code, notes, and snippets.

@AhmedHelalAhmed
Last active July 12, 2018 09:35
Show Gist options
  • Save AhmedHelalAhmed/084e17f887a6e65ca8cfbac93e4e7593 to your computer and use it in GitHub Desktop.
Save AhmedHelalAhmed/084e17f887a6e65ca8cfbac93e4e7593 to your computer and use it in GitHub Desktop.
swagger doc for laravel
/**
* @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"
* )
* )
*/
@AhmedHelalAhmed
Copy link
Author

./vendor/bin/swagger ./app/Http --output public/api/

@AhmedHelalAhmed
Copy link
Author

AhmedHelalAhmed commented Jul 11, 2018

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