login.yaml 928 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. operationId: userLogin
  2. summary: Login
  3. security: []
  4. description: User login
  5. tags: [User]
  6. requestBody:
  7. content:
  8. application/json:
  9. schema:
  10. type: object
  11. required:
  12. - email
  13. - password
  14. properties:
  15. email:
  16. type: string
  17. format: email
  18. description: User email
  19. example: john.smith@mail.com
  20. password:
  21. type: string
  22. format: password
  23. description: User password
  24. example: password123
  25. responses:
  26. "200":
  27. description: Login successful. Returns success object. Sets 'user' cookie.
  28. content:
  29. application/json:
  30. schema:
  31. type: object
  32. properties:
  33. success:
  34. type: boolean
  35. "400":
  36. $ref: "#/components/responses/400"
  37. "401":
  38. $ref: "#/components/responses/401"
  39. "500":
  40. $ref: "#/components/responses/500"