swagger.json 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. },
  102. "definitions": {
  103. "api.ChangePassWordStutrc": {
  104. "type": "object",
  105. "properties": {
  106. "newPassWord": {
  107. "type": "string"
  108. },
  109. "passWord": {
  110. "type": "string"
  111. },
  112. "userName": {
  113. "type": "string"
  114. }
  115. }
  116. },
  117. "api.RegistAndLoginStuct": {
  118. "type": "object",
  119. "properties": {
  120. "passWord": {
  121. "type": "string"
  122. },
  123. "userName": {
  124. "type": "string"
  125. }
  126. }
  127. }
  128. }
  129. }