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

How to fix not correct when show multiple respones status code. #35

Closed
ittranvantruong opened this issue Mar 15, 2023 · 3 comments
Closed

Comments

@ittranvantruong
Copy link

/**

  • Example API method with multiple responses.
  • @response 200 {
  • "success": true,
    
  • "message": "Operation completed successfully."
    
  • }
  • @response 400 {
  • "success": false,
    
  • "message": "Bad request."
    
  • }
  • @response 401 {
  • "success": false,
    
  • "message": "Unauthorized."
    
  • }
  • @return \Illuminate\Http\Response
    */
    Here, there are four respone status code. But i when render code has only response status 200. Can you help me fix?
@ovac
Copy link
Owner

ovac commented Jun 10, 2023

Remove the 200. When there's no error code, it assumes success and checks for other error codes.

@ovac ovac closed this as completed Jun 10, 2023
@ovac
Copy link
Owner

ovac commented Jun 10, 2023

Feel free to reopen this issue if you still face same issues.

@leon-mrks
Copy link

+1
The docs don't show any stated error responses. No matter if the 200 status code is supplied or not (or any positive response).

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

No branches or pull requests

3 participants