v2-relation-relation.yaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-relation-relation.yaml
  2. get:
  3. summary: '获取单个 relation/{relation}'
  4. tags:
  5. - relation
  6. operationId: get_api_v2_relation_relation_
  7. description: 实现:`RelationController@show`
  8. parameters:
  9. -
  10. name: relation
  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. id:
  31. type: integer
  32. name:
  33. type: string
  34. case:
  35. type: string
  36. from:
  37. type: string
  38. to:
  39. type: string
  40. match:
  41. type: string
  42. category:
  43. type: string
  44. created_at:
  45. type: string
  46. updated_at:
  47. type: string
  48. editor:
  49. type: string
  50. category_channel:
  51. type: string
  52. channelId:
  53. type: string
  54. word:
  55. type: string
  56. meaning:
  57. type: string
  58. name_channel:
  59. type: string
  60. 401:
  61. $ref: '../../main.yaml#/components/responses/Unauthorized'
  62. 422:
  63. $ref: '../../main.yaml#/components/responses/ValidationError'
  64. put:
  65. summary: 'Requires authentication. Invalidates the vocabulary cache on success.'
  66. tags:
  67. - relation
  68. operationId: put_api_v2_relation_relation_
  69. description: 实现:`RelationController@update`
  70. parameters:
  71. -
  72. name: relation
  73. in: path
  74. required: true
  75. schema:
  76. type: string
  77. requestBody:
  78. required: false
  79. content:
  80. application/json:
  81. schema:
  82. type: object
  83. properties:
  84. name:
  85. type: string
  86. case:
  87. type: string
  88. category:
  89. type: string
  90. responses:
  91. 200:
  92. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  93. content:
  94. application/json:
  95. schema:
  96. type: object
  97. properties:
  98. ok:
  99. type: boolean
  100. message:
  101. type: string
  102. data:
  103. type: object
  104. properties:
  105. id:
  106. type: integer
  107. name:
  108. type: string
  109. case:
  110. type: string
  111. from:
  112. type: string
  113. to:
  114. type: string
  115. match:
  116. type: string
  117. category:
  118. type: string
  119. created_at:
  120. type: string
  121. updated_at:
  122. type: string
  123. editor:
  124. type: string
  125. category_channel:
  126. type: string
  127. channelId:
  128. type: string
  129. word:
  130. type: string
  131. meaning:
  132. type: string
  133. name_channel:
  134. type: string
  135. 401:
  136. $ref: '../../main.yaml#/components/responses/Unauthorized'
  137. 422:
  138. $ref: '../../main.yaml#/components/responses/ValidationError'
  139. patch:
  140. summary: 'Requires authentication. Invalidates the vocabulary cache on success.'
  141. tags:
  142. - relation
  143. operationId: patch_api_v2_relation_relation_
  144. description: 实现:`RelationController@update`
  145. parameters:
  146. -
  147. name: relation
  148. in: path
  149. required: true
  150. schema:
  151. type: string
  152. requestBody:
  153. required: false
  154. content:
  155. application/json:
  156. schema:
  157. type: object
  158. properties:
  159. name:
  160. type: string
  161. case:
  162. type: string
  163. category:
  164. type: string
  165. responses:
  166. 200:
  167. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  168. content:
  169. application/json:
  170. schema:
  171. type: object
  172. properties:
  173. ok:
  174. type: boolean
  175. message:
  176. type: string
  177. data:
  178. type: object
  179. properties:
  180. id:
  181. type: integer
  182. name:
  183. type: string
  184. case:
  185. type: string
  186. from:
  187. type: string
  188. to:
  189. type: string
  190. match:
  191. type: string
  192. category:
  193. type: string
  194. created_at:
  195. type: string
  196. updated_at:
  197. type: string
  198. editor:
  199. type: string
  200. category_channel:
  201. type: string
  202. channelId:
  203. type: string
  204. word:
  205. type: string
  206. meaning:
  207. type: string
  208. name_channel:
  209. type: string
  210. 401:
  211. $ref: '../../main.yaml#/components/responses/Unauthorized'
  212. 422:
  213. $ref: '../../main.yaml#/components/responses/ValidationError'
  214. delete:
  215. summary: 'Requires authentication. Invalidates the vocabulary cache on success.'
  216. tags:
  217. - relation
  218. operationId: delete_api_v2_relation_relation_
  219. description: 实现:`RelationController@destroy`
  220. parameters:
  221. -
  222. name: relation
  223. in: path
  224. required: true
  225. schema:
  226. type: string
  227. responses:
  228. 200:
  229. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  230. content:
  231. application/json:
  232. schema:
  233. type: object
  234. properties:
  235. ok:
  236. type: boolean
  237. message:
  238. type: string
  239. data:
  240. type: object
  241. 401:
  242. $ref: '../../main.yaml#/components/responses/Unauthorized'
  243. 422:
  244. $ref: '../../main.yaml#/components/responses/ValidationError'