| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-tipitaka-discussions-channel.yaml
- get:
- summary: 列出一段经文里的话题
- tags:
- - tipitaka-discussions
- operationId: get_api_v3_tipitaka_discussions_channel_
- description: |-
- 只列挂在该 channel 句子上的话题(不含回复),按经文顺序(书、段、句)排列,同一句里按时间;
- 每条带 `sentence`(所在句子的坐标)。删除了但还有回复的话题以墓碑出现。
- 不传 type 时只列评论线程(discussion / qa / help / issue / glossary),批注与评估要显式
- type=note / commentary / assessment。可见性同 `GET /v3/discussions`:未登录看不到 discussion;
- basic 角色在自己不能编辑的 channel 上只看得到自己发起的 discussion。
- channel 不存在或范围内没有讨论都返回空列表;chapter 不存在 404。
- 实现:`V3\TipitakaDiscussionController@__invoke`
- security:
- - { }
- -
- bearerAuth: []
- parameters:
- -
- name: channel
- in: path
- required: true
- schema:
- type: string
- description: '句子所在 channel 的 uuid'
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 15
- description: '每页数量,最大 200'
- -
- name: book
- in: query
- schema:
- type: integer
- description: '书号;与 chapter / para / to 一起用时必填,不传则是整个 channel'
- example: 169
- -
- name: chapter
- in: query
- schema:
- type: integer
- description: '章节起始段落号,服务端按章节长度展开成段落区间;不能与 para / to 同用'
- example: 893
- -
- name: para
- in: query
- schema:
- type: integer
- description: 起始段落号
- example: 895
- -
- name: to
- in: query
- schema:
- type: integer
- description: '结束段落号(含),缺省同 para'
- example: 896
- -
- name: type
- in: query
- schema:
- type: string
- description: 类型,逗号分隔多选;不传则只列评论线程
- example: 'issue,glossary'
- -
- name: status
- in: query
- schema:
- type: string
- enum:
- - active
- - close
- description: 话题状态,不传则两种都要
- -
- name: severity
- in: query
- schema:
- type: string
- description: '严重程度(assessment 为评估方法),逗号分隔多选'
- example: 'error,warning'
- -
- name: page
- in: query
- schema:
- type: integer
- default: 1
- description: 页码
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- target_type:
- type: string
- target_id:
- type: string
- parent_id:
- type: string
- nullable: true
- type:
- type: string
- severity:
- type: string
- nullable: true
- score:
- type: integer
- nullable: true
- status:
- type: string
- title:
- type: string
- nullable: true
- content:
- type: string
- nullable: true
- content_type:
- type: string
- html:
- type: string
- description: 仅在部分查询口径下返回。
- summary:
- type: string
- description: 仅在部分查询口径下返回。
- tpl_id:
- type: string
- nullable: true
- pos_start:
- type: integer
- nullable: true
- pos_end:
- type: integer
- nullable: true
- quote_exact:
- type: string
- nullable: true
- quote_prefix:
- type: string
- nullable: true
- quote_suffix:
- type: string
- nullable: true
- reply_count:
- type: integer
- description: 仅在部分查询口径下返回。
- sentence:
- type: object
- properties: { book: { type: integer }, paragraph: { type: integer }, word_start: { type: integer }, word_end: { type: integer } }
- description: 仅在部分查询口径下返回。
- editor:
- type: object
- 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 } } }
- nullable: true
- co_editor:
- type: object
- 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 } } }
- nullable: true
- abilities:
- type: object
- properties: { update: { type: boolean }, delete: { type: boolean }, close: { type: boolean }, reply: { type: boolean } }
- created_at:
- type: string
- updated_at:
- type: string
- deleted_at:
- type: string
- nullable: true
- meta:
- $ref: '../../main.yaml#/components/schemas/PaginationMeta'
- 404:
- description: 'chapter 不是本书存在的段落'
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|