categories.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. Category:
  70. parameters:
  71. - name: id
  72. in: path
  73. required: true
  74. schema:
  75. $ref: '../components/schemas.yaml#/StringId'
  76. put:
  77. operationId: updateCategory
  78. summary: 编辑或移动方案分类
  79. security:
  80. - BearerAuth: []
  81. parameters:
  82. - $ref: '../components/parameters.yaml#/XRequestId'
  83. requestBody:
  84. required: true
  85. content:
  86. application/json:
  87. schema:
  88. $ref: '../components/schemas.yaml#/UpdateCategoryRequest'
  89. responses:
  90. '200':
  91. description: 分类更新成功
  92. content:
  93. application/json:
  94. schema:
  95. $ref: '../components/schemas.yaml#/CategoryResponse'
  96. '400':
  97. $ref: '../components/responses.yaml#/InvalidArgument'
  98. '401':
  99. $ref: '../components/responses.yaml#/AuthenticationError'
  100. '403':
  101. $ref: '../components/responses.yaml#/Forbidden'
  102. '404':
  103. $ref: '../components/responses.yaml#/NotFound'
  104. '409':
  105. $ref: '../components/responses.yaml#/Conflict'
  106. '500':
  107. $ref: '../components/responses.yaml#/InternalError'
  108. delete:
  109. operationId: deleteCategory
  110. summary: 逻辑删除方案分类
  111. security:
  112. - BearerAuth: []
  113. parameters:
  114. - $ref: '../components/parameters.yaml#/XRequestId'
  115. - name: rowVersion
  116. in: query
  117. required: true
  118. schema:
  119. type: integer
  120. minimum: 0
  121. responses:
  122. '200':
  123. description: 分类逻辑删除成功
  124. content:
  125. application/json:
  126. schema:
  127. $ref: '../components/schemas.yaml#/DeleteCategoryResponse'
  128. '400':
  129. $ref: '../components/responses.yaml#/InvalidArgument'
  130. '401':
  131. $ref: '../components/responses.yaml#/AuthenticationError'
  132. '403':
  133. $ref: '../components/responses.yaml#/Forbidden'
  134. '404':
  135. $ref: '../components/responses.yaml#/NotFound'
  136. '409':
  137. $ref: '../components/responses.yaml#/Conflict'
  138. '500':
  139. $ref: '../components/responses.yaml#/InternalError'