categories.yaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. CategoryTree:
  2. get:
  3. operationId: getCategoryTree
  4. summary: 查询方案分类树
  5. security:
  6. - BearerAuth: []
  7. parameters:
  8. - $ref: '../components/parameters.yaml#/XRequestId'
  9. - name: keyword
  10. in: query
  11. schema:
  12. type: string
  13. - name: status
  14. in: query
  15. schema:
  16. $ref: '../components/schemas.yaml#/EnabledStatus'
  17. responses:
  18. '200':
  19. description: 分类树
  20. content:
  21. application/json:
  22. schema:
  23. $ref: '../components/schemas.yaml#/CategoryTreeResponse'
  24. '400':
  25. $ref: '../components/responses.yaml#/InvalidArgument'
  26. '401':
  27. $ref: '../components/responses.yaml#/AuthenticationError'
  28. '403':
  29. $ref: '../components/responses.yaml#/Forbidden'
  30. '404':
  31. $ref: '../components/responses.yaml#/NotFound'
  32. '409':
  33. $ref: '../components/responses.yaml#/Conflict'
  34. '500':
  35. $ref: '../components/responses.yaml#/InternalError'
  36. Categories:
  37. post:
  38. operationId: createCategory
  39. summary: 新增方案分类
  40. security:
  41. - BearerAuth: []
  42. parameters:
  43. - $ref: '../components/parameters.yaml#/XRequestId'
  44. requestBody:
  45. required: true
  46. content:
  47. application/json:
  48. schema:
  49. $ref: '../components/schemas.yaml#/CreateCategoryRequest'
  50. responses:
  51. '201':
  52. description: 分类创建成功
  53. content:
  54. application/json:
  55. schema:
  56. $ref: '../components/schemas.yaml#/CategoryResponse'
  57. '400':
  58. $ref: '../components/responses.yaml#/InvalidArgument'
  59. '401':
  60. $ref: '../components/responses.yaml#/AuthenticationError'
  61. '403':
  62. $ref: '../components/responses.yaml#/Forbidden'
  63. '404':
  64. $ref: '../components/responses.yaml#/NotFound'
  65. '409':
  66. $ref: '../components/responses.yaml#/Conflict'
  67. '500':
  68. $ref: '../components/responses.yaml#/InternalError'
  69. CategoriesReorder:
  70. put:
  71. operationId: reorderCategories
  72. summary: 管理员拖动重排同级分类
  73. description: parentId为null表示顶级分类排序,否则为该父分类直接子级排序;orderedIds为拖动后的目标顺序。
  74. security:
  75. - BearerAuth: []
  76. parameters:
  77. - $ref: '../components/parameters.yaml#/XRequestId'
  78. requestBody:
  79. required: true
  80. content:
  81. application/json:
  82. schema:
  83. $ref: '../components/schemas.yaml#/ReorderCategoriesRequest'
  84. responses:
  85. '200':
  86. description: 重排结果
  87. content:
  88. application/json:
  89. schema:
  90. $ref: '../components/schemas.yaml#/ReorderCategoriesResponse'
  91. '400':
  92. $ref: '../components/responses.yaml#/InvalidArgument'
  93. '401':
  94. $ref: '../components/responses.yaml#/AuthenticationError'
  95. '403':
  96. $ref: '../components/responses.yaml#/Forbidden'
  97. '404':
  98. $ref: '../components/responses.yaml#/NotFound'
  99. '409':
  100. $ref: '../components/responses.yaml#/Conflict'
  101. '500':
  102. $ref: '../components/responses.yaml#/InternalError'
  103. Category:
  104. parameters:
  105. - name: id
  106. in: path
  107. required: true
  108. schema:
  109. $ref: '../components/schemas.yaml#/StringId'
  110. put:
  111. operationId: updateCategory
  112. summary: 编辑或移动方案分类
  113. security:
  114. - BearerAuth: []
  115. parameters:
  116. - $ref: '../components/parameters.yaml#/XRequestId'
  117. requestBody:
  118. required: true
  119. content:
  120. application/json:
  121. schema:
  122. $ref: '../components/schemas.yaml#/UpdateCategoryRequest'
  123. responses:
  124. '200':
  125. description: 分类更新成功
  126. content:
  127. application/json:
  128. schema:
  129. $ref: '../components/schemas.yaml#/CategoryResponse'
  130. '400':
  131. $ref: '../components/responses.yaml#/InvalidArgument'
  132. '401':
  133. $ref: '../components/responses.yaml#/AuthenticationError'
  134. '403':
  135. $ref: '../components/responses.yaml#/Forbidden'
  136. '404':
  137. $ref: '../components/responses.yaml#/NotFound'
  138. '409':
  139. $ref: '../components/responses.yaml#/Conflict'
  140. '500':
  141. $ref: '../components/responses.yaml#/InternalError'
  142. delete:
  143. operationId: deleteCategory
  144. summary: 逻辑删除方案分类
  145. security:
  146. - BearerAuth: []
  147. parameters:
  148. - $ref: '../components/parameters.yaml#/XRequestId'
  149. - name: rowVersion
  150. in: query
  151. required: true
  152. schema:
  153. type: integer
  154. minimum: 0
  155. responses:
  156. '200':
  157. description: 分类逻辑删除成功
  158. content:
  159. application/json:
  160. schema:
  161. $ref: '../components/schemas.yaml#/DeleteCategoryResponse'
  162. '400':
  163. $ref: '../components/responses.yaml#/InvalidArgument'
  164. '401':
  165. $ref: '../components/responses.yaml#/AuthenticationError'
  166. '403':
  167. $ref: '../components/responses.yaml#/Forbidden'
  168. '404':
  169. $ref: '../components/responses.yaml#/NotFound'
  170. '409':
  171. $ref: '../components/responses.yaml#/Conflict'
  172. '500':
  173. $ref: '../components/responses.yaml#/InternalError'