swagger.json 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "一个基于微信小程序的校园二手交易平台的api",
  5. "title": "二手交易",
  6. "termsOfService": "http://swagger.io/terms/",
  7. "contact": {},
  8. "license": {
  9. "name": "Apache 2.0",
  10. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  11. },
  12. "version": "1.0"
  13. },
  14. "host": "127.0.0.1:8084",
  15. "basePath": "/WeChatTrading/trading-go",
  16. "paths": {
  17. "/user/login": {
  18. "post": {
  19. "tags": [
  20. "用户模块"
  21. ],
  22. "summary": "登录",
  23. "parameters": [
  24. {
  25. "type": "string",
  26. "description": "用户ID",
  27. "name": "uid",
  28. "in": "formData"
  29. }
  30. ],
  31. "responses": {
  32. "200": {
  33. "description": "code\",\"data\",\"token\"}",
  34. "schema": {
  35. "type": "string"
  36. }
  37. }
  38. }
  39. }
  40. },
  41. "/user/modify": {
  42. "post": {
  43. "tags": [
  44. "用户模块"
  45. ],
  46. "summary": "修改用户信息",
  47. "parameters": [
  48. {
  49. "type": "string",
  50. "description": "用户ID",
  51. "name": "uid",
  52. "in": "formData"
  53. },
  54. {
  55. "type": "string",
  56. "description": "头像",
  57. "name": "avatar",
  58. "in": "formData"
  59. },
  60. {
  61. "type": "string",
  62. "description": "用户名",
  63. "name": "name",
  64. "in": "formData"
  65. },
  66. {
  67. "type": "string",
  68. "description": "电话",
  69. "name": "phone",
  70. "in": "formData"
  71. }
  72. ],
  73. "responses": {
  74. "200": {
  75. "description": "code\",\"data\",\"token\"}",
  76. "schema": {
  77. "type": "string"
  78. }
  79. }
  80. }
  81. }
  82. },
  83. "/user/register": {
  84. "post": {
  85. "tags": [
  86. "用户模块"
  87. ],
  88. "summary": "创建用户",
  89. "parameters": [
  90. {
  91. "type": "string",
  92. "description": "用户ID",
  93. "name": "uid",
  94. "in": "formData"
  95. },
  96. {
  97. "type": "string",
  98. "description": "用户名",
  99. "name": "name",
  100. "in": "formData"
  101. },
  102. {
  103. "type": "string",
  104. "description": "头像",
  105. "name": "avatar",
  106. "in": "formData"
  107. }
  108. ],
  109. "responses": {
  110. "200": {
  111. "description": "code\",\"data\",\"message\"}",
  112. "schema": {
  113. "type": "string"
  114. }
  115. }
  116. }
  117. }
  118. }
  119. }
  120. }