swagger.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. definitions:
  2. http_model.CommonResponse:
  3. properties:
  4. data: {}
  5. message:
  6. type: string
  7. status:
  8. type: integer
  9. type: object
  10. http_model.CreateProductData:
  11. properties:
  12. product_id:
  13. description: 商品id
  14. type: integer
  15. type: object
  16. http_model.CreateProductPhoto:
  17. properties:
  18. photo_uid:
  19. type: string
  20. photo_url:
  21. description: 图片或视频url
  22. type: string
  23. symbol:
  24. description: 图片为主图或详情图标志位,1为主图,2为详情图,3为视频
  25. type: integer
  26. type: object
  27. http_model.CreateProductRequest:
  28. properties:
  29. brand_name:
  30. type: string
  31. product_detail:
  32. type: string
  33. product_id:
  34. type: integer
  35. product_name:
  36. description: 商品名称
  37. type: string
  38. product_photos:
  39. description: 商品图片列表
  40. items:
  41. $ref: '#/definitions/http_model.CreateProductPhoto'
  42. type: array
  43. product_price:
  44. description: 商品价值
  45. type: integer
  46. product_type:
  47. description: 商品类型
  48. type: integer
  49. product_url:
  50. description: 商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;
  51. type: string
  52. shop_address:
  53. description: 店铺地址,商品类型为线下品牌时需填写
  54. type: string
  55. type: object
  56. http_model.SendCodeData:
  57. type: object
  58. http_model.SendCodeRequest:
  59. properties:
  60. phone:
  61. type: string
  62. type: object
  63. info:
  64. contact: {}
  65. paths:
  66. /product/create:
  67. post:
  68. consumes:
  69. - application/json
  70. description: 企业创建商品,添加到商品库
  71. parameters:
  72. - description: 登录TOKEN信息
  73. in: header
  74. name: Authorization
  75. required: true
  76. type: string
  77. - description: 创建商品请求结构体
  78. in: body
  79. name: req
  80. required: true
  81. schema:
  82. $ref: '#/definitions/http_model.CreateProductRequest'
  83. produces:
  84. - application/json
  85. responses:
  86. "200":
  87. description: 创建商品相应结构体
  88. schema:
  89. allOf:
  90. - $ref: '#/definitions/http_model.CommonResponse'
  91. - properties:
  92. data:
  93. $ref: '#/definitions/http_model.CreateProductData'
  94. type: object
  95. summary: CreateProduct 创建商品
  96. /sendCode:
  97. post:
  98. consumes:
  99. - application/json
  100. description: 发送验证码,每次发送到邮箱
  101. parameters:
  102. - description: 发送验证码请求参数结构体
  103. in: body
  104. name: req
  105. required: true
  106. schema:
  107. $ref: '#/definitions/http_model.SendCodeRequest'
  108. produces:
  109. - application/json
  110. responses:
  111. "200":
  112. description: 发送验证码请求相应结构体
  113. schema:
  114. allOf:
  115. - $ref: '#/definitions/http_model.CommonResponse'
  116. - properties:
  117. data:
  118. $ref: '#/definitions/http_model.SendCodeData'
  119. type: object
  120. summary: sendCode 发送验证码
  121. swagger: "2.0"