v2-auth-forgot-password.yaml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-auth-forgot-password.yaml
  2. get:
  3. summary: '列出 auth/forgot-password'
  4. tags:
  5. - auth
  6. operationId: get_api_v2_auth_forgot_password
  7. description: 实现:`ForgotPasswordController@index`
  8. parameters:
  9. -
  10. name: search
  11. in: query
  12. description: 搜索关键字
  13. schema:
  14. type: string
  15. -
  16. name: order
  17. in: query
  18. description: 排序字段
  19. schema:
  20. type: string
  21. -
  22. name: dir
  23. in: query
  24. description: 排序方向
  25. schema:
  26. type: string
  27. enum:
  28. - desc
  29. - asc
  30. -
  31. name: limit
  32. in: query
  33. description: 每页记录数
  34. schema:
  35. type: number
  36. -
  37. name: offset
  38. in: query
  39. description: 从第几条记录开始提取
  40. schema:
  41. type: number
  42. responses:
  43. 200:
  44. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  45. content:
  46. application/json:
  47. schema:
  48. type: object
  49. properties:
  50. ok:
  51. type: boolean
  52. message:
  53. type: string
  54. data:
  55. type: object
  56. properties:
  57. rows:
  58. type: array
  59. items:
  60. type: object
  61. count:
  62. type: integer
  63. 401:
  64. $ref: '../../main.yaml#/components/responses/Unauthorized'
  65. 422:
  66. $ref: '../../main.yaml#/components/responses/ValidationError'
  67. post:
  68. summary: '新建 auth/forgot-password'
  69. tags:
  70. - auth
  71. operationId: post_api_v2_auth_forgot_password
  72. description: |
  73. 已被 `POST /v3/password-resets` 取代,保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
  74. 已知问题(v2 冻结不修):`dashboard` 参数原样拼进邮件链接;token 不过期;邮箱未注册时回 404。
  75. requestBody:
  76. required: false
  77. content:
  78. application/json:
  79. schema:
  80. type: object
  81. properties:
  82. email:
  83. type: string
  84. lang:
  85. type: string
  86. dashboard:
  87. type: string
  88. responses:
  89. 200:
  90. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  91. content:
  92. application/json:
  93. schema:
  94. type: object
  95. properties:
  96. ok:
  97. type: boolean
  98. message:
  99. type: string
  100. data:
  101. type: object
  102. 401:
  103. $ref: '../../main.yaml#/components/responses/Unauthorized'
  104. 422:
  105. $ref: '../../main.yaml#/components/responses/ValidationError'
  106. deprecated: true