2
0

v2-attachment-attachment.yaml 6.3 KB

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