swagger.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. basePath: /WeChatTrading/trading-go
  2. host: 127.0.0.1:8084
  3. info:
  4. contact: {}
  5. description: 一个基于微信小程序的校园二手交易平台的api
  6. license:
  7. name: Apache 2.0
  8. url: http://www.apache.org/licenses/LICENSE-2.0.html
  9. termsOfService: http://swagger.io/terms/
  10. title: 二手交易
  11. version: "1.0"
  12. paths:
  13. /user/login:
  14. post:
  15. parameters:
  16. - description: 用户ID
  17. in: formData
  18. name: uid
  19. type: string
  20. responses:
  21. "200":
  22. description: code","data","token"}
  23. schema:
  24. type: string
  25. summary: 登录
  26. tags:
  27. - 用户模块
  28. /user/register:
  29. post:
  30. parameters:
  31. - description: 用户ID
  32. in: formData
  33. name: uid
  34. type: string
  35. - description: 用户名
  36. in: formData
  37. name: name
  38. type: string
  39. - description: 头像
  40. in: formData
  41. name: avatar
  42. type: string
  43. responses:
  44. "200":
  45. description: code","data","message"}
  46. schema:
  47. type: string
  48. summary: 创建用户
  49. tags:
  50. - 用户模块
  51. swagger: "2.0"