-
Notifications
You must be signed in to change notification settings - Fork 126
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
Redirect is adding extra 200 response #610
Comments
@m4tthumphrey what is the correct result? |
Should it not be ignored? Redirects cannot be used in an API, no? |
@m4tthumphrey redirect is simply a response with 301 status code. Perfectly valid http stuff, I'd say :-) Now I'm wondering about this controllers method code and what it does, and what doc you expect. |
Of course it’s valid HTTP but it shouldn’t be documented as a valid return type/response in the API doc, especially under 200. |
@m4tthumphrey Why not? You can find some people submitting prs here to support redirect method properly. Anyways, it would be helpful if you share your controller methods code and expected docs |
The method is just some boilerplate OAuth and the doc generated is exactly as expected other than the random string 200 response for the redirect. I will take a look at other redirect usage. |
Is there anyway to ignore certain responses currently? Ie prevent some responses from being part of docs? Similar to @ignoreParam etc? |
@m4tthumphrey i really cannot help without examples No way currently and I have no ideas what's needed due to no real examples |
Ok I am on my phone at the moment so will post an example when I’m back to my desk. |
So this is a chunk from the login/auth endpoint of my controller and further down are some of the error methods. The error methods document perfectly, as does the
Error methods:
|
v0.11.24
The following line in a controller method is adding an additional "schema" to the
200
object insideresponses
. When I remove the redirect line, the{ "type": "string" }
is removed from the200
schema.return redirect()->to($request->get('redirect_url') . '?access_token=' . $access->access_token);
The text was updated successfully, but these errors were encountered: