v3-me.yaml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-me.yaml
  2. get:
  3. summary: 我的资料
  4. tags:
  5. - me
  6. operationId: get_api_v3_me
  7. description: |-
  8. 前端启动时用已存的 token 调它恢复登录态;401 表示 token 无效或过期,应清掉 token。
  9. 不回传 token(v2 的 auth/current 会把请求里的 token 原样回显)。
  10. 实现:`V3\MeController@show`
  11. security:
  12. -
  13. bearerAuth: []
  14. responses:
  15. 200:
  16. description: 成功
  17. content:
  18. application/json:
  19. schema:
  20. type: object
  21. properties:
  22. data:
  23. type: object
  24. properties:
  25. id:
  26. type: string
  27. nickName:
  28. type: string
  29. userName:
  30. type: string
  31. realName:
  32. type: string
  33. sn:
  34. type: integer
  35. avatar:
  36. type: string
  37. nullable: true
  38. roles:
  39. type: array
  40. items:
  41. type: string
  42. email:
  43. type: string
  44. 401:
  45. $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'