v3-password-resets.yaml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-password-resets.yaml
  2. post:
  3. summary: 申请重置密码(发邮件)
  4. tags:
  5. - password-resets
  6. operationId: post_api_v3_password_resets
  7. description: |-
  8. 无论邮箱是否注册都返回 204,不泄露账号是否存在。邮件是同步发出的,
  9. 返回时已经发完,所以是 204 而不是 202。邮件里的链接指向
  10. dashboard-v6 的 `/anonymous/reset-password/{token}`,60 分钟内有效。
  11. 按 IP 与邮箱限流,超出返回 429。
  12. 实现:`V3\PasswordResetController@store`
  13. security:
  14. - { }
  15. -
  16. bearerAuth: []
  17. requestBody:
  18. required: true
  19. content:
  20. application/json:
  21. schema:
  22. type: object
  23. properties:
  24. email:
  25. type: string
  26. description: 账号邮箱
  27. example: someone@example.com
  28. lang:
  29. type: string
  30. description: '邮件语言,没有对应模板的回落 en'
  31. enum:
  32. - en
  33. - en-US
  34. - zh-Hans
  35. - zh-Hant
  36. required:
  37. - email
  38. responses:
  39. 204:
  40. description: 已发送(或邮箱未注册),无响应体
  41. 422:
  42. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  43. 429:
  44. description: 请求过于频繁
  45. content:
  46. application/problem+json:
  47. schema:
  48. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  49. 503:
  50. description: 邮件发送失败
  51. content:
  52. application/problem+json:
  53. schema:
  54. $ref: '../../main.yaml#/components/schemas/ProblemDetails'