swagger.yaml 1.9 KB

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