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.

166 lines
5.1 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
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {},
  5. "license": {}
  6. },
  7. "paths": {
  8. "/user/changePassWord": {
  9. "post": {
  10. "produces": [
  11. "application/json"
  12. ],
  13. "tags": [
  14. "User"
  15. ],
  16. "summary": "用户修改密码",
  17. "parameters": [
  18. {
  19. "description": "用户修改密码",
  20. "name": "data",
  21. "in": "body",
  22. "required": true,
  23. "schema": {
  24. "type": "object",
  25. "$ref": "#/definitions/api.ChangePassWordStutrc"
  26. }
  27. }
  28. ],
  29. "responses": {
  30. "200": {
  31. "description": "{\"success\":true,\"data\":{},\"msg\":\"修改成功\"}",
  32. "schema": {
  33. "type": "string"
  34. }
  35. }
  36. }
  37. }
  38. },
  39. "/user/login": {
  40. "post": {
  41. "produces": [
  42. "application/json"
  43. ],
  44. "tags": [
  45. "User"
  46. ],
  47. "summary": "用户登录",
  48. "parameters": [
  49. {
  50. "description": "用户登录接口",
  51. "name": "data",
  52. "in": "body",
  53. "required": true,
  54. "schema": {
  55. "type": "object",
  56. "$ref": "#/definitions/api.RegistAndLoginStuct"
  57. }
  58. }
  59. ],
  60. "responses": {
  61. "200": {
  62. "description": "{\"success\":true,\"data\":{},\"msg\":\"登陆成功\"}",
  63. "schema": {
  64. "type": "string"
  65. }
  66. }
  67. }
  68. }
  69. },
  70. "/user/regist": {
  71. "post": {
  72. "produces": [
  73. "application/json"
  74. ],
  75. "tags": [
  76. "User"
  77. ],
  78. "summary": "用户注册账号",
  79. "parameters": [
  80. {
  81. "description": "用户注册接口",
  82. "name": "data",
  83. "in": "body",
  84. "required": true,
  85. "schema": {
  86. "type": "object",
  87. "$ref": "#/definitions/api.RegistAndLoginStuct"
  88. }
  89. }
  90. ],
  91. "responses": {
  92. "200": {
  93. "description": "{\"success\":true,\"data\":{},\"msg\":\"注册成功\"}",
  94. "schema": {
  95. "type": "string"
  96. }
  97. }
  98. }
  99. }
  100. },
  101. "/user/uploadHeaderImg": {
  102. "post": {
  103. "consumes": [
  104. "multipart/form-data"
  105. ],
  106. "produces": [
  107. "application/json"
  108. ],
  109. "tags": [
  110. "User"
  111. ],
  112. "summary": "用户上传头像",
  113. "parameters": [
  114. {
  115. "type": "file",
  116. "description": "用户上传头像",
  117. "name": "headerImg",
  118. "in": "formData",
  119. "required": true
  120. },
  121. {
  122. "type": "string",
  123. "description": "用户上传头像",
  124. "name": "userName",
  125. "in": "formData",
  126. "required": true
  127. }
  128. ],
  129. "responses": {
  130. "200": {
  131. "description": "{\"success\":true,\"data\":{},\"msg\":\"上传成功\"}",
  132. "schema": {
  133. "type": "string"
  134. }
  135. }
  136. }
  137. }
  138. }
  139. },
  140. "definitions": {
  141. "api.ChangePassWordStutrc": {
  142. "type": "object",
  143. "properties": {
  144. "newPassWord": {
  145. "type": "string"
  146. },
  147. "passWord": {
  148. "type": "string"
  149. },
  150. "userName": {
  151. "type": "string"
  152. }
  153. }
  154. },
  155. "api.RegistAndLoginStuct": {
  156. "type": "object",
  157. "properties": {
  158. "passWord": {
  159. "type": "string"
  160. },
  161. "userName": {
  162. "type": "string"
  163. }
  164. }
  165. }
  166. }
  167. }