Swagger api documentaion #483
Unanswered
elie-irani
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need help with a few scenarios. I couldn't find any help.
PHP laravel
Scenario 1:
Route::post('/account/devices/disconnect-device, 'UsersController@disconnectDevices')->middleware(['auth:api']);
Do I do anything with the middleware? is there a tag to add to the annotation to show the middleware?
Scenario 2:
`/**
* Disconnect wallet
*
* @param Request $request
* @return JsonResponse
* @throws Exception
*/
public function disconnectDevices(Request $request): JsonResponse
{
.........
........
$request is a parameter, How do I represent it in an annotation?
Scenario 3:
In the example above, what are all the possible responses? how do I find them?
404 of course and 200? because in the function, the response is not specified.
/** * ********************** * Disconnect Wallet * ********************** * * @OA\Post( * path="/user/profile/disconnect-device", * summary="Disconnects device", * @OA\Parameter( * description="Parameter with mutliple examples", * in="path", * name="id", * required=true, * @OA\Schema(type="string"), * @OA\Examples(example="int", value="1", summary="An int value."), * @OA\Examples(example="uuid", value="0006faf6-7a61-426c-9034-579f2cfcfa83", summary="An UUID value."), * ), * @OA\Response( * response=200, * description="Device disconnected", * @OA\JsonContent() * ), * @OA\Response( * response=404, * description="Not Found" * ) * ) */
is this a good one? Except for the parameter, i don't know what to put
Beta Was this translation helpful? Give feedback.
All reactions