swagger.yaml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. definitions:
  2. request.LoginReq:
  3. properties:
  4. clientType:
  5. description: 客户端类型,2-PC交易端 3-手机客户端_安卓 4-网页客户端 5-微信客户端 6-手机客户端_苹果
  6. type: integer
  7. password:
  8. description: 密码
  9. type: string
  10. userName:
  11. description: 用户名,可以是LoginID/LoginCode/手机号码
  12. type: string
  13. required:
  14. - clientType
  15. - password
  16. - userName
  17. type: object
  18. response.LoginRsp:
  19. properties:
  20. expiresAt:
  21. description: 过期时间
  22. type: integer
  23. loginId:
  24. description: 登录ID
  25. type: integer
  26. token:
  27. description: 新服务Token
  28. type: string
  29. userId:
  30. description: 用户ID
  31. type: integer
  32. type: object
  33. response.Response:
  34. properties:
  35. code:
  36. type: integer
  37. data: {}
  38. msg:
  39. type: string
  40. type: object
  41. info:
  42. contact: {}
  43. description: 新接入服务
  44. title: Swagger Example API
  45. version: 0.0.1
  46. paths:
  47. /Account/Login:
  48. post:
  49. consumes:
  50. - application/json
  51. parameters:
  52. - description: 登录入参
  53. in: body
  54. name: data
  55. required: true
  56. schema:
  57. $ref: '#/definitions/request.LoginReq'
  58. produces:
  59. - application/json
  60. responses:
  61. "200":
  62. description: 返回包括用户信息,token,过期时间
  63. schema:
  64. allOf:
  65. - $ref: '#/definitions/response.Response'
  66. - properties:
  67. data:
  68. $ref: '#/definitions/response.LoginRsp'
  69. msg:
  70. type: string
  71. type: object
  72. summary: 账户登录
  73. tags:
  74. - 账户服务
  75. securityDefinitions:
  76. ApiKeyAuth:
  77. in: header
  78. name: x-token
  79. type: apiKey
  80. swagger: "2.0"