v3-tipitaka-discussions-channel.yaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-tipitaka-discussions-channel.yaml
  2. get:
  3. summary: 列出一段经文里的话题
  4. tags:
  5. - tipitaka-discussions
  6. operationId: get_api_v3_tipitaka_discussions_channel_
  7. description: |-
  8. 只列挂在该 channel 句子上的话题(不含回复),按经文顺序(书、段、句)排列,同一句里按时间;
  9. 每条带 `sentence`(所在句子的坐标)。删除了但还有回复的话题以墓碑出现。
  10. 不传 type 时只列评论线程(discussion / qa / help / issue / glossary),批注与评估要显式
  11. type=note / commentary / assessment。可见性同 `GET /v3/discussions`:未登录看不到 discussion;
  12. basic 角色在自己不能编辑的 channel 上只看得到自己发起的 discussion。
  13. channel 不存在或范围内没有讨论都返回空列表;chapter 不存在 404。
  14. 实现:`V3\TipitakaDiscussionController@__invoke`
  15. security:
  16. - { }
  17. -
  18. bearerAuth: []
  19. parameters:
  20. -
  21. name: channel
  22. in: path
  23. required: true
  24. schema:
  25. type: string
  26. description: '句子所在 channel 的 uuid'
  27. -
  28. name: per_page
  29. in: query
  30. schema:
  31. type: integer
  32. default: 15
  33. description: '每页数量,最大 200'
  34. -
  35. name: book
  36. in: query
  37. schema:
  38. type: integer
  39. description: '书号;与 chapter / para / to 一起用时必填,不传则是整个 channel'
  40. example: 169
  41. -
  42. name: chapter
  43. in: query
  44. schema:
  45. type: integer
  46. description: '章节起始段落号,服务端按章节长度展开成段落区间;不能与 para / to 同用'
  47. example: 893
  48. -
  49. name: para
  50. in: query
  51. schema:
  52. type: integer
  53. description: 起始段落号
  54. example: 895
  55. -
  56. name: to
  57. in: query
  58. schema:
  59. type: integer
  60. description: '结束段落号(含),缺省同 para'
  61. example: 896
  62. -
  63. name: type
  64. in: query
  65. schema:
  66. type: string
  67. description: 类型,逗号分隔多选;不传则只列评论线程
  68. example: 'issue,glossary'
  69. -
  70. name: status
  71. in: query
  72. schema:
  73. type: string
  74. enum:
  75. - active
  76. - close
  77. description: 话题状态,不传则两种都要
  78. -
  79. name: severity
  80. in: query
  81. schema:
  82. type: string
  83. description: '严重程度(assessment 为评估方法),逗号分隔多选'
  84. example: 'error,warning'
  85. -
  86. name: page
  87. in: query
  88. schema:
  89. type: integer
  90. default: 1
  91. description: 页码
  92. responses:
  93. 200:
  94. description: 成功
  95. content:
  96. application/json:
  97. schema:
  98. type: object
  99. properties:
  100. data:
  101. type: array
  102. items:
  103. type: object
  104. properties:
  105. id:
  106. type: string
  107. target_type:
  108. type: string
  109. target_id:
  110. type: string
  111. parent_id:
  112. type: string
  113. nullable: true
  114. type:
  115. type: string
  116. severity:
  117. type: string
  118. nullable: true
  119. score:
  120. type: integer
  121. nullable: true
  122. status:
  123. type: string
  124. title:
  125. type: string
  126. nullable: true
  127. content:
  128. type: string
  129. nullable: true
  130. content_type:
  131. type: string
  132. html:
  133. type: string
  134. description: 仅在部分查询口径下返回。
  135. summary:
  136. type: string
  137. description: 仅在部分查询口径下返回。
  138. tpl_id:
  139. type: string
  140. nullable: true
  141. pos_start:
  142. type: integer
  143. nullable: true
  144. pos_end:
  145. type: integer
  146. nullable: true
  147. quote_exact:
  148. type: string
  149. nullable: true
  150. quote_prefix:
  151. type: string
  152. nullable: true
  153. quote_suffix:
  154. type: string
  155. nullable: true
  156. reply_count:
  157. type: integer
  158. description: 仅在部分查询口径下返回。
  159. sentence:
  160. type: object
  161. properties: { book: { type: integer }, paragraph: { type: integer }, word_start: { type: integer }, word_end: { type: integer } }
  162. description: 仅在部分查询口径下返回。
  163. editor:
  164. type: object
  165. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  166. nullable: true
  167. co_editor:
  168. type: object
  169. properties: { id: { type: string }, nickName: { type: string }, userName: { type: string }, realName: { type: string }, sn: { type: integer }, avatar: { type: string }, roles: { type: array, items: { type: string } } }
  170. nullable: true
  171. abilities:
  172. type: object
  173. properties: { update: { type: boolean }, delete: { type: boolean }, close: { type: boolean }, reply: { type: boolean } }
  174. created_at:
  175. type: string
  176. updated_at:
  177. type: string
  178. deleted_at:
  179. type: string
  180. nullable: true
  181. meta:
  182. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  183. 404:
  184. description: 'chapter 不是本书存在的段落'
  185. content:
  186. application/problem+json:
  187. schema:
  188. $ref: '../../main.yaml#/components/schemas/ProblemDetails'
  189. 422:
  190. $ref: '../../main.yaml#/components/responses/ProblemValidation'