You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

273 lines
8.4 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This is a sample Server pets",
  5. "title": "Swagger Example API",
  6. "contact": {},
  7. "license": {},
  8. "version": "0.0.1"
  9. },
  10. "basePath": "/",
  11. "paths": {
  12. "/base/login": {
  13. "post": {
  14. "produces": [
  15. "application/json"
  16. ],
  17. "tags": [
  18. "Base"
  19. ],
  20. "summary": "用户登录",
  21. "parameters": [
  22. {
  23. "description": "用户登录接口",
  24. "name": "data",
  25. "in": "body",
  26. "required": true,
  27. "schema": {
  28. "type": "object",
  29. "$ref": "#/definitions/api.RegistAndLoginStuct"
  30. }
  31. }
  32. ],
  33. "responses": {
  34. "200": {
  35. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  36. "schema": {
  37. "type": "string"
  38. }
  39. }
  40. }
  41. }
  42. },
  43. "/base/regist": {
  44. "post": {
  45. "produces": [
  46. "application/json"
  47. ],
  48. "tags": [
  49. "Base"
  50. ],
  51. "summary": "用户注册账号",
  52. "parameters": [
  53. {
  54. "description": "用户注册接口",
  55. "name": "data",
  56. "in": "body",
  57. "required": true,
  58. "schema": {
  59. "type": "object",
  60. "$ref": "#/definitions/api.RegistAndLoginStuct"
  61. }
  62. }
  63. ],
  64. "responses": {
  65. "200": {
  66. "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
  67. "schema": {
  68. "type": "string"
  69. }
  70. }
  71. }
  72. }
  73. },
  74. "/menu/getMenu": {
  75. "post": {
  76. "security": [
  77. {
  78. "ApiKeyAuth": []
  79. }
  80. ],
  81. "produces": [
  82. "application/json"
  83. ],
  84. "tags": [
  85. "Menu"
  86. ],
  87. "summary": "获取用户动态路由",
  88. "parameters": [
  89. {
  90. "description": "可以什么都不填",
  91. "name": "data",
  92. "in": "body",
  93. "required": true,
  94. "schema": {
  95. "type": "object",
  96. "$ref": "#/definitions/api.RegistAndLoginStuct"
  97. }
  98. }
  99. ],
  100. "responses": {
  101. "200": {
  102. "description": "{\"success\":true,\"data\":{},\"msg\":\"返回成功\"}",
  103. "schema": {
  104. "type": "string"
  105. }
  106. }
  107. }
  108. }
  109. },
  110. "/user/changePassWord": {
  111. "post": {
  112. "security": [
  113. {
  114. "ApiKeyAuth": []
  115. }
  116. ],
  117. "produces": [
  118. "application/json"
  119. ],
  120. "tags": [
  121. "User"
  122. ],
  123. "summary": "用户修改密码",
  124. "parameters": [
  125. {
  126. "description": "用户修改密码",
  127. "name": "data",
  128. "in": "body",
  129. "required": true,
  130. "schema": {
  131. "type": "object",
  132. "$ref": "#/definitions/api.ChangePassWordStutrc"
  133. }
  134. }
  135. ],
  136. "responses": {
  137. "200": {
  138. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  139. "schema": {
  140. "type": "string"
  141. }
  142. }
  143. }
  144. }
  145. },
  146. "/user/getInfoList": {
  147. "post": {
  148. "security": [
  149. {
  150. "ApiKeyAuth": []
  151. }
  152. ],
  153. "consumes": [
  154. "application/json"
  155. ],
  156. "produces": [
  157. "application/json"
  158. ],
  159. "tags": [
  160. "User"
  161. ],
  162. "summary": "分页获取用户列表",
  163. "parameters": [
  164. {
  165. "description": "分页获取用户列表",
  166. "name": "data",
  167. "in": "body",
  168. "required": true,
  169. "schema": {
  170. "type": "object",
  171. "$ref": "#/definitions/modelInterface.PageInfo"
  172. }
  173. }
  174. ],
  175. "responses": {
  176. "200": {
  177. "description": "{\"success\":true,\"data\":{},\"msg\":\"获取成功\"}",
  178. "schema": {
  179. "type": "string"
  180. }
  181. }
  182. }
  183. }
  184. },
  185. "/user/uploadHeaderImg": {
  186. "post": {
  187. "security": [
  188. {
  189. "ApiKeyAuth": []
  190. }
  191. ],
  192. "consumes": [
  193. "multipart/form-data"
  194. ],
  195. "produces": [
  196. "application/json"
  197. ],
  198. "tags": [
  199. "User"
  200. ],
  201. "summary": "用户上传头像",
  202. "parameters": [
  203. {
  204. "type": "file",
  205. "description": "用户上传头像",
  206. "name": "headerImg",
  207. "in": "formData",
  208. "required": true
  209. },
  210. {
  211. "type": "string",
  212. "description": "用户上传头像",
  213. "name": "userName",
  214. "in": "formData",
  215. "required": true
  216. }
  217. ],
  218. "responses": {
  219. "200": {
  220. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  221. "schema": {
  222. "type": "string"
  223. }
  224. }
  225. }
  226. }
  227. }
  228. },
  229. "definitions": {
  230. "api.ChangePassWordStutrc": {
  231. "type": "object",
  232. "properties": {
  233. "newPassWord": {
  234. "type": "string"
  235. },
  236. "passWord": {
  237. "type": "string"
  238. },
  239. "userName": {
  240. "type": "string"
  241. }
  242. }
  243. },
  244. "api.RegistAndLoginStuct": {
  245. "type": "object",
  246. "properties": {
  247. "passWord": {
  248. "type": "string"
  249. },
  250. "userName": {
  251. "type": "string"
  252. }
  253. }
  254. },
  255. "modelInterface.PageInfo": {
  256. "type": "object",
  257. "properties": {
  258. "page": {
  259. "type": "integer"
  260. },
  261. "pageSize": {
  262. "type": "integer"
  263. }
  264. }
  265. }
  266. },
  267. "securityDefinitions": {
  268. "ApiKeyAuth": {
  269. "type": "apiKey",
  270. "name": "x-token",
  271. "in": "header"
  272. }
  273. }
  274. }