2
0

v2-sentence-sentence.yaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-sentence-sentence.yaml
  2. get:
  3. summary: '获取单个 sentence/{sentence}'
  4. tags:
  5. - sentence
  6. operationId: get_api_v2_sentence_sentence_
  7. description: 实现:`SentenceController@show`
  8. parameters:
  9. -
  10. name: sentence
  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. properties:
  30. data:
  31. type: string
  32. uid:
  33. type: string
  34. id:
  35. type: integer
  36. content:
  37. type: string
  38. content_type:
  39. type: string
  40. html:
  41. type: string
  42. book:
  43. type: string
  44. paragraph:
  45. type: string
  46. word_start:
  47. type: string
  48. word_end:
  49. type: string
  50. editor:
  51. type: string
  52. fork_at:
  53. type: string
  54. updated_at:
  55. type: string
  56. channel:
  57. type: string
  58. studio:
  59. type: string
  60. suggestionCount:
  61. type: string
  62. acceptor:
  63. type: string
  64. pr_edit_at:
  65. type: string
  66. 401:
  67. $ref: '../../main.yaml#/components/responses/Unauthorized'
  68. 422:
  69. $ref: '../../main.yaml#/components/responses/ValidationError'
  70. put:
  71. summary: 修改单个句子
  72. tags:
  73. - sentence
  74. operationId: put_api_v2_sentence_sentence_
  75. description: 实现:`SentenceController@update`
  76. parameters:
  77. -
  78. name: sentence
  79. in: path
  80. required: true
  81. schema:
  82. type: string
  83. requestBody:
  84. required: false
  85. content:
  86. application/json:
  87. schema:
  88. type: object
  89. properties:
  90. content:
  91. type: string
  92. contentType:
  93. type: string
  94. prEditor:
  95. type: string
  96. prEditAt:
  97. type: string
  98. prId:
  99. type: string
  100. prUuid:
  101. type: string
  102. responses:
  103. 200:
  104. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  105. content:
  106. application/json:
  107. schema:
  108. type: object
  109. properties:
  110. ok:
  111. type: boolean
  112. message:
  113. type: string
  114. data:
  115. type: object
  116. properties:
  117. data:
  118. type: string
  119. uid:
  120. type: string
  121. id:
  122. type: integer
  123. content:
  124. type: string
  125. content_type:
  126. type: string
  127. html:
  128. type: string
  129. book:
  130. type: string
  131. paragraph:
  132. type: string
  133. word_start:
  134. type: string
  135. word_end:
  136. type: string
  137. editor:
  138. type: string
  139. fork_at:
  140. type: string
  141. updated_at:
  142. type: string
  143. channel:
  144. type: string
  145. studio:
  146. type: string
  147. suggestionCount:
  148. type: string
  149. acceptor:
  150. type: string
  151. pr_edit_at:
  152. type: string
  153. 401:
  154. $ref: '../../main.yaml#/components/responses/Unauthorized'
  155. 422:
  156. $ref: '../../main.yaml#/components/responses/ValidationError'
  157. patch:
  158. summary: 修改单个句子
  159. tags:
  160. - sentence
  161. operationId: patch_api_v2_sentence_sentence_
  162. description: 实现:`SentenceController@update`
  163. parameters:
  164. -
  165. name: sentence
  166. in: path
  167. required: true
  168. schema:
  169. type: string
  170. requestBody:
  171. required: false
  172. content:
  173. application/json:
  174. schema:
  175. type: object
  176. properties:
  177. content:
  178. type: string
  179. contentType:
  180. type: string
  181. prEditor:
  182. type: string
  183. prEditAt:
  184. type: string
  185. prId:
  186. type: string
  187. prUuid:
  188. type: string
  189. responses:
  190. 200:
  191. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  192. content:
  193. application/json:
  194. schema:
  195. type: object
  196. properties:
  197. ok:
  198. type: boolean
  199. message:
  200. type: string
  201. data:
  202. type: object
  203. properties:
  204. data:
  205. type: string
  206. uid:
  207. type: string
  208. id:
  209. type: integer
  210. content:
  211. type: string
  212. content_type:
  213. type: string
  214. html:
  215. type: string
  216. book:
  217. type: string
  218. paragraph:
  219. type: string
  220. word_start:
  221. type: string
  222. word_end:
  223. type: string
  224. editor:
  225. type: string
  226. fork_at:
  227. type: string
  228. updated_at:
  229. type: string
  230. channel:
  231. type: string
  232. studio:
  233. type: string
  234. suggestionCount:
  235. type: string
  236. acceptor:
  237. type: string
  238. pr_edit_at:
  239. type: string
  240. 401:
  241. $ref: '../../main.yaml#/components/responses/Unauthorized'
  242. 422:
  243. $ref: '../../main.yaml#/components/responses/ValidationError'
  244. delete:
  245. summary: '删除 sentence/{sentence}'
  246. tags:
  247. - sentence
  248. operationId: delete_api_v2_sentence_sentence_
  249. description: 实现:`SentenceController@destroy`
  250. parameters:
  251. -
  252. name: sentence
  253. in: path
  254. required: true
  255. schema:
  256. type: string
  257. responses:
  258. 200:
  259. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  260. content:
  261. application/json:
  262. schema:
  263. type: object
  264. properties:
  265. ok:
  266. type: boolean
  267. message:
  268. type: string
  269. data:
  270. type: object
  271. 401:
  272. $ref: '../../main.yaml#/components/responses/Unauthorized'
  273. 422:
  274. $ref: '../../main.yaml#/components/responses/ValidationError'