swagger.json 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {}
  5. },
  6. "basePath": "/htapi",
  7. "paths": {
  8. "/auth/login": {
  9. "post": {
  10. "tags": [
  11. "auth"
  12. ],
  13. "summary": "小程序用户登录",
  14. "description": "用户通过微信小程序登录\n\u003cbr\u003e",
  15. "parameters": [
  16. {
  17. "in": "body",
  18. "name": "mobile",
  19. "description": "登录请求体",
  20. "required": true,
  21. "schema": {
  22. "$ref": "#/definitions/LoginReq"
  23. }
  24. }
  25. ],
  26. "responses": {
  27. "200": {
  28. "description": "",
  29. "schema": {
  30. "$ref": "#/definitions/controllers.BaseResponse"
  31. }
  32. }
  33. }
  34. }
  35. },
  36. "/auth/sendCode": {
  37. "post": {
  38. "tags": [
  39. "auth"
  40. ],
  41. "summary": "获取手机验证码",
  42. "description": "用户发送手机验证码\n\u003cbr\u003e",
  43. "parameters": [
  44. {
  45. "in": "body",
  46. "name": "mobile",
  47. "description": "小程序手机验证码接口",
  48. "required": true,
  49. "schema": {
  50. "$ref": "#/definitions/SmsCodeReq"
  51. }
  52. }
  53. ],
  54. "responses": {
  55. "200": {
  56. "description": "",
  57. "schema": {
  58. "$ref": "#/definitions/controllers.BaseResponse"
  59. }
  60. }
  61. }
  62. }
  63. },
  64. "/report/list": {
  65. "get": {
  66. "tags": [
  67. "report"
  68. ],
  69. "description": "get all Users\n\u003cbr\u003e",
  70. "operationId": "ReportController.GetAll",
  71. "responses": {
  72. "200": {
  73. "description": "",
  74. "schema": {
  75. "$ref": "#/definitions/models.User"
  76. }
  77. }
  78. }
  79. }
  80. },
  81. "/user/": {
  82. "get": {
  83. "tags": [
  84. "user"
  85. ],
  86. "description": "get all Users\n\u003cbr\u003e",
  87. "operationId": "UserController.GetAll",
  88. "responses": {
  89. "200": {
  90. "description": "",
  91. "schema": {
  92. "$ref": "#/definitions/models.User"
  93. }
  94. }
  95. }
  96. }
  97. }
  98. },
  99. "definitions": {
  100. "LoginReq": {
  101. "title": "LoginReq",
  102. "type": "object"
  103. },
  104. "SmsCodeReq": {
  105. "title": "SmsCodeReq",
  106. "type": "object"
  107. },
  108. "controllers.BaseResponse": {
  109. "title": "BaseResponse",
  110. "type": "object",
  111. "properties": {
  112. "Data": {
  113. "$ref": "#/definitions/controllers.interface"
  114. },
  115. "ErrCode": {
  116. "type": "integer",
  117. "format": "int64"
  118. },
  119. "ErrMsg": {
  120. "type": "string"
  121. },
  122. "Msg": {
  123. "type": "string"
  124. },
  125. "Ret": {
  126. "description": "返回状态码",
  127. "type": "integer",
  128. "format": "int64"
  129. },
  130. "Success": {
  131. "description": "true 执行成功,false 执行失败",
  132. "type": "boolean"
  133. }
  134. }
  135. },
  136. "controllers.interface": {
  137. "title": "interface",
  138. "type": "object"
  139. },
  140. "models.User": {
  141. "title": "User",
  142. "type": "object"
  143. }
  144. },
  145. "tags": [
  146. {
  147. "name": "user",
  148. "description": "Operations about Users\n"
  149. }
  150. ]
  151. }