|
|
@@ -8,7 +8,8 @@ get:
|
|
|
只列话题(不含回复),删除了但还有回复的话题以墓碑出现(deleted_at 有值、内容为空)。
|
|
|
未登录看不到不公开的话题(discussion);basic 角色在自己无权管理的对象上只看得到
|
|
|
自己发起的不公开话题。各状态的数量与「能发起哪些类型」见 `GET /v3/discussions/summary`。
|
|
|
- 不传 type 时只列评论线程(discussion / qa / help / issue / glossary),批注要显式 type=note / commentary。
|
|
|
+ 不传 type 时只列评论线程(discussion / qa / help / issue / glossary),批注与评估要显式
|
|
|
+ type=note / commentary / assessment。
|
|
|
要一段经文(一章、一段段落区间)里的全部话题,用 `GET /v3/tipitaka-discussions/{channel}`。
|
|
|
|
|
|
实现:`V3\DiscussionController@index`
|
|
|
@@ -57,6 +58,7 @@ get:
|
|
|
- glossary
|
|
|
- note
|
|
|
- commentary
|
|
|
+ - assessment
|
|
|
description: 类型,不传则只列评论线程
|
|
|
-
|
|
|
name: status
|
|
|
@@ -72,7 +74,7 @@ get:
|
|
|
in: query
|
|
|
schema:
|
|
|
type: string
|
|
|
- description: 严重程度,逗号分隔多选
|
|
|
+ description: '严重程度(assessment 为评估方法),逗号分隔多选'
|
|
|
example: 'error,warning'
|
|
|
-
|
|
|
name: sort
|
|
|
@@ -120,6 +122,9 @@ get:
|
|
|
severity:
|
|
|
type: string
|
|
|
nullable: true
|
|
|
+ score:
|
|
|
+ type: number
|
|
|
+ nullable: true
|
|
|
status:
|
|
|
type: string
|
|
|
title:
|
|
|
@@ -184,7 +189,7 @@ get:
|
|
|
422:
|
|
|
$ref: '../../main.yaml#/components/responses/ProblemValidation'
|
|
|
post:
|
|
|
- summary: 发起话题或新建批注
|
|
|
+ summary: 发起话题、新建批注或评估
|
|
|
tags:
|
|
|
- discussions
|
|
|
operationId: post_api_v3_discussions
|
|
|
@@ -195,6 +200,10 @@ post:
|
|
|
批注(note / commentary)只能加在句子上,且只有该句所在 channel 的编辑者能加;
|
|
|
标题可省、正文必填,commentary 的正文必须是义注句子模板 `{{book-para-start-end}}`
|
|
|
(可多句并列);可带锚点 pos_* / quote_*;不发通知。
|
|
|
+ assessment(译文评估:用某种方法给这句译文打分)只能加在句子上,且只有该句所在 channel 的编辑者能加
|
|
|
+ (AI 凭授权代写);score(0–100)必填,severity 必填、填评估方法(1–16 位字母数字 . _ -),
|
|
|
+ 标题可省,理由写 content;不收锚点、不发通知。**一句只留一条**:已有评估时就地覆盖
|
|
|
+ (分数、方法、理由、署名都换成这次的,回复保留),返回 200;没有才新建,返回 201。
|
|
|
glossary(外挂术语:不改译文,给锚点处的译文挂上术语)是评论线程,title 必填、填术语词头;
|
|
|
与批注一样只能挂在句子上、只有该句所在 channel 的编辑者能发,对所有人公开可见。
|
|
|
锚点只有 note / commentary / issue / glossary 收,其它类型传了 422。
|
|
|
@@ -233,22 +242,22 @@ post:
|
|
|
- glossary
|
|
|
- note
|
|
|
- commentary
|
|
|
+ - assessment
|
|
|
default: discussion
|
|
|
title:
|
|
|
type: string
|
|
|
- description: '标题,最长 256 字符;评论线程必填(glossary 填术语词头),批注可省'
|
|
|
+ description: '标题,最长 256 字符;评论线程必填(glossary 填术语词头),批注与评估可省'
|
|
|
content:
|
|
|
type: string
|
|
|
- description: 正文(markdown);批注必填
|
|
|
+ description: 正文(markdown);批注必填,评估写打分理由
|
|
|
severity:
|
|
|
type: string
|
|
|
- description: 严重程度
|
|
|
- enum:
|
|
|
- - error
|
|
|
- - warning
|
|
|
- - suggestion
|
|
|
- - urgent
|
|
|
- - normal
|
|
|
+ description: '严重程度:issue 为 error / warning / suggestion,help 为 urgent / normal;assessment 必填,填评估方法(1–16 位字母数字 . _ -)'
|
|
|
+ example: error
|
|
|
+ score:
|
|
|
+ type: number
|
|
|
+ description: '评估分数 0–100(只限且必填于 assessment)'
|
|
|
+ example: 85.0
|
|
|
pos_start:
|
|
|
type: integer
|
|
|
description: '锚点在句子文本中的起始偏移(只限 note / commentary / issue / glossary)'
|
|
|
@@ -276,7 +285,7 @@ post:
|
|
|
- target_id
|
|
|
responses:
|
|
|
200:
|
|
|
- description: 成功
|
|
|
+ description: '覆盖了该句已有的评估(只限 assessment)'
|
|
|
content:
|
|
|
application/json:
|
|
|
schema:
|
|
|
@@ -299,6 +308,9 @@ post:
|
|
|
severity:
|
|
|
type: string
|
|
|
nullable: true
|
|
|
+ score:
|
|
|
+ type: number
|
|
|
+ nullable: true
|
|
|
status:
|
|
|
type: string
|
|
|
title:
|
|
|
@@ -404,6 +416,9 @@ post:
|
|
|
severity:
|
|
|
type: string
|
|
|
nullable: true
|
|
|
+ score:
|
|
|
+ type: number
|
|
|
+ nullable: true
|
|
|
status:
|
|
|
type: string
|
|
|
title:
|