v2-sentpr.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-sentpr.yaml
  2. get:
  3. summary: '列出 sentpr'
  4. tags:
  5. - sentpr
  6. operationId: get_api_v2_sentpr
  7. description: 实现:`SentPrController@index`
  8. parameters:
  9. -
  10. name: view
  11. in: query
  12. schema:
  13. type: string
  14. enum:
  15. - sent-info
  16. -
  17. name: book
  18. in: query
  19. schema:
  20. type: string
  21. -
  22. name: para
  23. in: query
  24. schema:
  25. type: string
  26. -
  27. name: start
  28. in: query
  29. schema:
  30. type: string
  31. -
  32. name: end
  33. in: query
  34. schema:
  35. type: string
  36. -
  37. name: channel
  38. in: query
  39. schema:
  40. type: string
  41. -
  42. name: search
  43. in: query
  44. description: 搜索关键字
  45. schema:
  46. type: string
  47. -
  48. name: order
  49. in: query
  50. description: 排序字段
  51. schema:
  52. type: string
  53. -
  54. name: dir
  55. in: query
  56. description: 排序方向
  57. schema:
  58. type: string
  59. enum:
  60. - desc
  61. - asc
  62. -
  63. name: limit
  64. in: query
  65. description: 每页记录数
  66. schema:
  67. type: number
  68. -
  69. name: offset
  70. in: query
  71. description: 从第几条记录开始提取
  72. schema:
  73. type: number
  74. responses:
  75. 200:
  76. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  77. content:
  78. application/json:
  79. schema:
  80. type: object
  81. properties:
  82. ok:
  83. type: boolean
  84. message:
  85. type: string
  86. data:
  87. type: object
  88. properties:
  89. rows:
  90. type: array
  91. items:
  92. type: object
  93. properties: { id: { type: integer }, uid: { type: string }, book: { type: string }, paragraph: { type: string }, word_start: { type: string }, word_end: { type: string }, editor: { type: string }, channel: { type: string }, content: { type: string }, html: { type: string }, role: { type: string }, created_at: { type: string }, updated_at: { type: string } }
  94. count:
  95. type: integer
  96. 401:
  97. $ref: '../../main.yaml#/components/responses/Unauthorized'
  98. 422:
  99. $ref: '../../main.yaml#/components/responses/ValidationError'
  100. post:
  101. summary: '新建 sentpr'
  102. tags:
  103. - sentpr
  104. operationId: post_api_v2_sentpr
  105. description: 实现:`SentPrController@store`
  106. requestBody:
  107. required: false
  108. content:
  109. application/json:
  110. schema:
  111. type: object
  112. properties:
  113. notification:
  114. type: string
  115. webhook:
  116. type: string
  117. responses:
  118. 200:
  119. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  120. content:
  121. application/json:
  122. schema:
  123. type: object
  124. properties:
  125. ok:
  126. type: boolean
  127. message:
  128. type: string
  129. data:
  130. type: object
  131. properties:
  132. id:
  133. type: integer
  134. uid:
  135. type: string
  136. book:
  137. type: string
  138. paragraph:
  139. type: string
  140. word_start:
  141. type: string
  142. word_end:
  143. type: string
  144. editor:
  145. type: string
  146. channel:
  147. type: string
  148. content:
  149. type: string
  150. html:
  151. type: string
  152. role:
  153. type: string
  154. created_at:
  155. type: string
  156. updated_at:
  157. type: string
  158. 401:
  159. $ref: '../../main.yaml#/components/responses/Unauthorized'
  160. 422:
  161. $ref: '../../main.yaml#/components/responses/ValidationError'