swagger.yml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. swagger: "2.0"
  2. info: {}
  3. basePath: /htapi
  4. paths:
  5. /auth/login:
  6. post:
  7. tags:
  8. - auth
  9. summary: 小程序用户登录
  10. description: |-
  11. 用户通过微信小程序登录
  12. <br>
  13. parameters:
  14. - in: body
  15. name: mobile
  16. description: 登录请求体
  17. required: true
  18. schema:
  19. $ref: '#/definitions/LoginReq'
  20. responses:
  21. "200":
  22. description: ""
  23. schema:
  24. $ref: '#/definitions/controllers.BaseResponse'
  25. /auth/sendCode:
  26. post:
  27. tags:
  28. - auth
  29. summary: 获取手机验证码
  30. description: |-
  31. 用户发送手机验证码
  32. <br>
  33. parameters:
  34. - in: body
  35. name: mobile
  36. description: 小程序手机验证码接口
  37. required: true
  38. schema:
  39. $ref: '#/definitions/SmsCodeReq'
  40. responses:
  41. "200":
  42. description: ""
  43. schema:
  44. $ref: '#/definitions/controllers.BaseResponse'
  45. /report/list:
  46. get:
  47. tags:
  48. - report
  49. description: |-
  50. get all Users
  51. <br>
  52. operationId: ReportController.GetAll
  53. responses:
  54. "200":
  55. description: ""
  56. schema:
  57. $ref: '#/definitions/models.User'
  58. /user/:
  59. get:
  60. tags:
  61. - user
  62. description: |-
  63. get all Users
  64. <br>
  65. operationId: UserController.GetAll
  66. responses:
  67. "200":
  68. description: ""
  69. schema:
  70. $ref: '#/definitions/models.User'
  71. definitions:
  72. LoginReq:
  73. title: LoginReq
  74. type: object
  75. SmsCodeReq:
  76. title: SmsCodeReq
  77. type: object
  78. controllers.BaseResponse:
  79. title: BaseResponse
  80. type: object
  81. properties:
  82. Data:
  83. $ref: '#/definitions/controllers.interface'
  84. ErrCode:
  85. type: integer
  86. format: int64
  87. ErrMsg:
  88. type: string
  89. Msg:
  90. type: string
  91. Ret:
  92. description: 返回状态码
  93. type: integer
  94. format: int64
  95. Success:
  96. description: true 执行成功,false 执行失败
  97. type: boolean
  98. controllers.interface:
  99. title: interface
  100. type: object
  101. models.User:
  102. title: User
  103. type: object
  104. tags:
  105. - name: user
  106. description: |
  107. Operations about Users