v2-task-status-task-status.yaml 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-task-status-task-status.yaml
  2. get:
  3. summary: '获取单个 task-status/{task_status}'
  4. tags:
  5. - task-status
  6. operationId: get_api_v2_task_status_task_status_
  7. description: 实现:`TaskStatusController@show`
  8. parameters:
  9. -
  10. name: task_status
  11. in: path
  12. required: true
  13. schema:
  14. type: string
  15. responses:
  16. 200:
  17. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  18. content:
  19. application/json:
  20. schema:
  21. type: object
  22. properties:
  23. ok:
  24. type: boolean
  25. message:
  26. type: string
  27. data:
  28. type: object
  29. 401:
  30. $ref: '../../main.yaml#/components/responses/Unauthorized'
  31. 422:
  32. $ref: '../../main.yaml#/components/responses/ValidationError'
  33. put:
  34. summary: '更新 task-status/{task_status}'
  35. tags:
  36. - task-status
  37. operationId: put_api_v2_task_status_task_status_
  38. description: 实现:`TaskStatusController@update`
  39. parameters:
  40. -
  41. name: task_status
  42. in: path
  43. required: true
  44. schema:
  45. type: string
  46. requestBody:
  47. required: false
  48. content:
  49. application/json:
  50. schema:
  51. type: object
  52. properties:
  53. status:
  54. type: string
  55. enum:
  56. - published
  57. - running
  58. - restarted
  59. - quit
  60. - done
  61. - requested_restart
  62. responses:
  63. 200:
  64. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  65. content:
  66. application/json:
  67. schema:
  68. type: object
  69. properties:
  70. ok:
  71. type: boolean
  72. message:
  73. type: string
  74. data:
  75. type: object
  76. properties:
  77. mode:
  78. type: string
  79. format:
  80. type: string
  81. footnote:
  82. type: string
  83. origin:
  84. type: string
  85. paragraph:
  86. type: string
  87. id:
  88. type: integer
  89. title:
  90. type: string
  91. description:
  92. type: string
  93. type:
  94. type: integer
  95. category:
  96. type: string
  97. progress:
  98. type: integer
  99. parent_id:
  100. type: integer
  101. parent:
  102. type: string
  103. roles:
  104. type: string
  105. executor_id:
  106. type: integer
  107. executor_relation_task_id:
  108. type: integer
  109. executor_relation_task:
  110. type: string
  111. pre_task:
  112. type: string
  113. next_task:
  114. type: string
  115. is_milestone:
  116. type: boolean
  117. project_id:
  118. type: integer
  119. project:
  120. type: string
  121. owner_id:
  122. type: integer
  123. owner:
  124. type: string
  125. editor_id:
  126. type: integer
  127. editor:
  128. type: string
  129. order:
  130. type: string
  131. status:
  132. type: integer
  133. created_at:
  134. type: string
  135. updated_at:
  136. type: string
  137. started_at:
  138. type: string
  139. finished_at:
  140. type: string
  141. assignees_id:
  142. type: integer
  143. assignees:
  144. type: string
  145. html:
  146. type: string
  147. executor:
  148. type: string
  149. 401:
  150. $ref: '../../main.yaml#/components/responses/Unauthorized'
  151. 422:
  152. $ref: '../../main.yaml#/components/responses/ValidationError'
  153. patch:
  154. summary: '更新 task-status/{task_status}'
  155. tags:
  156. - task-status
  157. operationId: patch_api_v2_task_status_task_status_
  158. description: 实现:`TaskStatusController@update`
  159. parameters:
  160. -
  161. name: task_status
  162. in: path
  163. required: true
  164. schema:
  165. type: string
  166. requestBody:
  167. required: false
  168. content:
  169. application/json:
  170. schema:
  171. type: object
  172. properties:
  173. status:
  174. type: string
  175. enum:
  176. - published
  177. - running
  178. - restarted
  179. - quit
  180. - done
  181. - requested_restart
  182. responses:
  183. 200:
  184. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  185. content:
  186. application/json:
  187. schema:
  188. type: object
  189. properties:
  190. ok:
  191. type: boolean
  192. message:
  193. type: string
  194. data:
  195. type: object
  196. properties:
  197. mode:
  198. type: string
  199. format:
  200. type: string
  201. footnote:
  202. type: string
  203. origin:
  204. type: string
  205. paragraph:
  206. type: string
  207. id:
  208. type: integer
  209. title:
  210. type: string
  211. description:
  212. type: string
  213. type:
  214. type: integer
  215. category:
  216. type: string
  217. progress:
  218. type: integer
  219. parent_id:
  220. type: integer
  221. parent:
  222. type: string
  223. roles:
  224. type: string
  225. executor_id:
  226. type: integer
  227. executor_relation_task_id:
  228. type: integer
  229. executor_relation_task:
  230. type: string
  231. pre_task:
  232. type: string
  233. next_task:
  234. type: string
  235. is_milestone:
  236. type: boolean
  237. project_id:
  238. type: integer
  239. project:
  240. type: string
  241. owner_id:
  242. type: integer
  243. owner:
  244. type: string
  245. editor_id:
  246. type: integer
  247. editor:
  248. type: string
  249. order:
  250. type: string
  251. status:
  252. type: integer
  253. created_at:
  254. type: string
  255. updated_at:
  256. type: string
  257. started_at:
  258. type: string
  259. finished_at:
  260. type: string
  261. assignees_id:
  262. type: integer
  263. assignees:
  264. type: string
  265. html:
  266. type: string
  267. executor:
  268. type: string
  269. 401:
  270. $ref: '../../main.yaml#/components/responses/Unauthorized'
  271. 422:
  272. $ref: '../../main.yaml#/components/responses/ValidationError'
  273. delete:
  274. summary: '删除 task-status/{task_status}'
  275. tags:
  276. - task-status
  277. operationId: delete_api_v2_task_status_task_status_
  278. description: 实现:`TaskStatusController@destroy`
  279. parameters:
  280. -
  281. name: task_status
  282. in: path
  283. required: true
  284. schema:
  285. type: string
  286. responses:
  287. 200:
  288. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  289. content:
  290. application/json:
  291. schema:
  292. type: object
  293. properties:
  294. ok:
  295. type: boolean
  296. message:
  297. type: string
  298. data:
  299. type: object
  300. 401:
  301. $ref: '../../main.yaml#/components/responses/Unauthorized'
  302. 422:
  303. $ref: '../../main.yaml#/components/responses/ValidationError'