scramble
scramble copied to clipboard
Response body not showing when using Illuminate\Http\Response constants.
Hey,
When i use Illuminate\Http\Response HTTP status codes for better readability, the doc stops showing the response body.
response()->json(['message' => 'Foo Bar'], Response::HTTP_OK)
vs
response()->json(['message' => 'Foo Bar'], 200)
@vszambon1 true! Thanks for reporting. I also can see that response structure in general is not correctly documented in such case? Because expected structure is array, {message: string}
, not just string.
Will fix!
@vszambon1 true! Thanks for reporting. I also can see that response structure in general is not correctly documented in such case? Because expected structure is array,
{message: string}
, not just string.Will fix!
Actually the code that I used to generate the print didn't have the 'message' key, sorry for that.
Oh, okay. So, I'll fix only constants 👾