swagger.json 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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/register": {
  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": "name",
  58. "in": "formData"
  59. },
  60. {
  61. "type": "string",
  62. "description": "头像",
  63. "name": "avatar",
  64. "in": "formData"
  65. }
  66. ],
  67. "responses": {
  68. "200": {
  69. "description": "code\",\"data\",\"message\"}",
  70. "schema": {
  71. "type": "string"
  72. }
  73. }
  74. }
  75. }
  76. }
  77. }
  78. }