Skip to content

Instantly share code, notes, and snippets.

@erenhatirnaz
Last active March 29, 2022 07:34
Show Gist options
  • Save erenhatirnaz/ab542d5d9dd98170b280ba9cc3508093 to your computer and use it in GitHub Desktop.
Save erenhatirnaz/ab542d5d9dd98170b280ba9cc3508093 to your computer and use it in GitHub Desktop.
AddressController@index
class AddressController extends Controller
{
/**
* Index
*
* @OA\Get(
* path="/api/address",
* tags={"Address"},
* security={{ "token": {} }},
* @OA\Response(response=401, ref="#/components/responses/UnauthorizedError"),
* @OA\Response(
* response=200,
* description="List of addresses that belongs to the logged in user",
* @OA\JsonContent(
* allOf={@OA\Schema(ref="#/components/schemas/Success")},
* @OA\Property(property="data", type="array", @OA\Items(ref="#/components/schemas/Address"))
* )
* )
* )
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
//...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment