v2-webhook-webhook.yaml 6.6 KB

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