v3-email-certifications.yaml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-email-certifications.yaml
  2. post:
  3. summary: 发送注册验证码
  4. tags:
  5. - email-certifications
  6. operationId: post_api_v3_email_certifications
  7. description: |-
  8. 向邮箱发一个 6 位验证码,30 分钟内有效;重复申请会作废上一个。
  9. 邮箱已注册时返回 422。按 IP 与邮箱限流,超出返回 429。
  10. 实现:`V3\EmailCertificationController@store`
  11. security:
  12. - { }
  13. -
  14. bearerAuth: []
  15. requestBody:
  16. required: true
  17. content:
  18. application/json:
  19. schema:
  20. type: object
  21. properties:
  22. email:
  23. type: string
  24. description: 待注册的邮箱
  25. example: someone@example.com
  26. lang:
  27. type: string
  28. description: '邮件语言,没有对应模板的回落 en'
  29. enum:
  30. - en
  31. - en-US
  32. - zh-Hans
  33. - zh-Hant
  34. required:
  35. - email
  36. responses:
  37. 204:
  38. description: 已发送,无响应体
  39. 422:
  40. $ref: '../../main.yaml#/components/responses/ProblemValidation'
  41. 429:
  42. description: 请求过于频繁
  43. content:
  44. application/problem+json:
  45. schema:
  46. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  47. 503:
  48. description: 邮件发送失败
  49. content:
  50. application/problem+json:
  51. schema:
  52. $ref: '../../main.yaml#/components/schemas/ProblemDetails'