Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response body not showing when using Illuminate\Http\Response constants. #169

Closed
vzambon opened this issue Aug 11, 2023 · 3 comments · Fixed by #467 · May be fixed by #237
Closed

Response body not showing when using Illuminate\Http\Response constants. #169

vzambon opened this issue Aug 11, 2023 · 3 comments · Fixed by #467 · May be fixed by #237
Milestone

Comments

@vzambon
Copy link

vzambon commented Aug 11, 2023

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)
image

vs

response()->json(['message' => 'Foo Bar'], 200)
image

@romalytvynenko
Copy link
Member

@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!

@vzambon
Copy link
Author

vzambon commented Aug 11, 2023

@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.

@romalytvynenko
Copy link
Member

Oh, okay. So, I'll fix only constants 👾

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants