Closed dimalebid closed 1 month ago
Hi dima, i met this error before, i going deep search and i solve it using response with accept content type to application/json, for now i dont have how to solve that issue with best practice but here my solved docs
@OA\Response(response=200, description="Success",
@OA\JsonContent(type="object",
@OA\Property(property="sid", type="string", example="APxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"),
)
),
@OA\Response(response=401, description="Unauthorized",
@OA\JsonContent(
@OA\Property(property="message", type="string", example="Unauthenticated"),
)
),
@OA\Response(response=404, description="Not Found",
@OA\JsonContent(
@OA\Property(property="message", type="string", example="Resource not found"),
)
)
Make sure you added @OA\JsonContent
, the concept is, when we sent request to server with content type application/json
server will proccess it and return response to client with json response too as you added header accept: application/json
.
Hope you solve that issue
Do you have the same problem with curl or other tools to test your API calls? Which headers are been sent and which Laravel default middleware is active?
Do you have the same problem with curl or other tools to test your API calls? Which headers are been sent and which Laravel default middleware is active?
I think he doesn't reply anymore, anyway talking about the issue, as far as i know, we can solve it with adding web middleware on api section which located on l5-swagger config, and for me, i don't met that error again
Problem:
when executing a POST, PUT, PATCH, DELETE request it gives the error "419 Page Expired", but GET works fine. I use a Sanctum user token for authorization