v2-notification-notification.yaml 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-notification-notification.yaml
  2. get:
  3. summary: '获取单个 notification/{notification}'
  4. tags:
  5. - notification
  6. operationId: get_api_v2_notification_notification_
  7. description: 实现:`NotificationController@show`
  8. parameters:
  9. -
  10. name: notification
  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. from:
  33. type: string
  34. to:
  35. type: string
  36. url:
  37. type: string
  38. content:
  39. type: string
  40. content_type:
  41. type: string
  42. res_type:
  43. type: string
  44. res_id:
  45. type: integer
  46. status:
  47. type: integer
  48. created_at:
  49. type: string
  50. updated_at:
  51. type: string
  52. 'pr data':
  53. type: string
  54. channel:
  55. type: string
  56. title:
  57. type: string
  58. book_title:
  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: '更新 notification/{notification}'
  66. tags:
  67. - notification
  68. operationId: put_api_v2_notification_notification_
  69. description: 实现:`NotificationController@update`
  70. parameters:
  71. -
  72. name: notification
  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. status:
  85. type: string
  86. default: read
  87. responses:
  88. 200:
  89. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  90. content:
  91. application/json:
  92. schema:
  93. type: object
  94. properties:
  95. ok:
  96. type: boolean
  97. message:
  98. type: string
  99. data:
  100. type: object
  101. 401:
  102. $ref: '../../main.yaml#/components/responses/Unauthorized'
  103. 422:
  104. $ref: '../../main.yaml#/components/responses/ValidationError'
  105. patch:
  106. summary: '更新 notification/{notification}'
  107. tags:
  108. - notification
  109. operationId: patch_api_v2_notification_notification_
  110. description: 实现:`NotificationController@update`
  111. parameters:
  112. -
  113. name: notification
  114. in: path
  115. required: true
  116. schema:
  117. type: string
  118. requestBody:
  119. required: false
  120. content:
  121. application/json:
  122. schema:
  123. type: object
  124. properties:
  125. status:
  126. type: string
  127. default: read
  128. responses:
  129. 200:
  130. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  131. content:
  132. application/json:
  133. schema:
  134. type: object
  135. properties:
  136. ok:
  137. type: boolean
  138. message:
  139. type: string
  140. data:
  141. type: object
  142. 401:
  143. $ref: '../../main.yaml#/components/responses/Unauthorized'
  144. 422:
  145. $ref: '../../main.yaml#/components/responses/ValidationError'
  146. delete:
  147. summary: '删除 notification/{notification}'
  148. tags:
  149. - notification
  150. operationId: delete_api_v2_notification_notification_
  151. description: 实现:`NotificationController@destroy`
  152. parameters:
  153. -
  154. name: notification
  155. in: path
  156. required: true
  157. schema:
  158. type: string
  159. responses:
  160. 200:
  161. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  162. content:
  163. application/json:
  164. schema:
  165. type: object
  166. properties:
  167. ok:
  168. type: boolean
  169. message:
  170. type: string
  171. data:
  172. type: object
  173. 401:
  174. $ref: '../../main.yaml#/components/responses/Unauthorized'
  175. 422:
  176. $ref: '../../main.yaml#/components/responses/ValidationError'