| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-discussion-discussion.yaml
- get:
- summary: 查询单条讨论
- tags:
- - discussion
- operationId: get_api_v2_discussion_discussion_
- description: |
- 已被 `GET /v3/discussions/{discussion}` 取代。保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '讨论 id'
- responses:
- 200:
- description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
- content:
- application/json:
- schema:
- type: object
- properties:
- ok:
- type: boolean
- message:
- type: string
- data:
- type: object
- properties:
- id:
- type: integer
- title:
- type: string
- content:
- type: string
- content_type:
- type: string
- parent:
- type: string
- status:
- type: integer
- editor:
- type: string
- res_id:
- type: integer
- res_type:
- type: string
- type:
- type: integer
- tpl_id:
- type: integer
- children_count:
- type: integer
- created_at:
- type: string
- updated_at:
- type: string
- pos_start:
- type: string
- pos_end:
- type: string
- quote_exact:
- type: string
- quote_prefix:
- type: string
- quote_suffix:
- type: string
- html:
- type: string
- summary:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- put:
- summary: '修改讨论 / 批注'
- tags:
- - discussion
- operationId: put_api_v2_discussion_discussion_
- description: |
- 已被 `PATCH /v3/discussions/{discussion}`(局部更新)取代。保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '讨论 id'
- requestBody:
- required: false
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: 标题,未提交会被清空
- content:
- type: string
- description: 正文内容,未提交会被清空
- status:
- type: string
- description: '状态,未提交会重置为 active'
- enum:
- - active
- - close
- default: active
- type:
- type: string
- description: 讨论类型,仅在提交时更新
- enum:
- - discussion
- - qa
- - help
- - note
- - commentary
- pos_start:
- type: integer
- description: 锚点起始偏移,仅在提交时更新
- pos_end:
- type: integer
- description: 锚点结束偏移,仅在提交时更新
- quote_exact:
- type: string
- description: 锚定的原文片段,仅在提交时更新
- quote_prefix:
- type: string
- description: 锚定片段前的上下文,仅在提交时更新
- quote_suffix:
- type: string
- description: 锚定片段后的上下文,仅在提交时更新
- responses:
- 200:
- description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
- content:
- application/json:
- schema:
- type: object
- properties:
- ok:
- type: boolean
- message:
- type: string
- data:
- type: object
- properties:
- id:
- type: integer
- title:
- type: string
- content:
- type: string
- content_type:
- type: string
- parent:
- type: string
- status:
- type: integer
- editor:
- type: string
- res_id:
- type: integer
- res_type:
- type: string
- type:
- type: integer
- tpl_id:
- type: integer
- children_count:
- type: integer
- created_at:
- type: string
- updated_at:
- type: string
- pos_start:
- type: string
- pos_end:
- type: string
- quote_exact:
- type: string
- quote_prefix:
- type: string
- quote_suffix:
- type: string
- html:
- type: string
- summary:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- patch:
- summary: '修改讨论 / 批注'
- tags:
- - discussion
- operationId: patch_api_v2_discussion_discussion_
- description: |
- 已被 `PATCH /v3/discussions/{discussion}`(局部更新)取代。保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '讨论 id'
- requestBody:
- required: false
- content:
- application/json:
- schema:
- type: object
- properties:
- title:
- type: string
- description: 标题,未提交会被清空
- content:
- type: string
- description: 正文内容,未提交会被清空
- status:
- type: string
- description: '状态,未提交会重置为 active'
- enum:
- - active
- - close
- default: active
- type:
- type: string
- description: 讨论类型,仅在提交时更新
- enum:
- - discussion
- - qa
- - help
- - note
- - commentary
- pos_start:
- type: integer
- description: 锚点起始偏移,仅在提交时更新
- pos_end:
- type: integer
- description: 锚点结束偏移,仅在提交时更新
- quote_exact:
- type: string
- description: 锚定的原文片段,仅在提交时更新
- quote_prefix:
- type: string
- description: 锚定片段前的上下文,仅在提交时更新
- quote_suffix:
- type: string
- description: 锚定片段后的上下文,仅在提交时更新
- responses:
- 200:
- description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
- content:
- application/json:
- schema:
- type: object
- properties:
- ok:
- type: boolean
- message:
- type: string
- data:
- type: object
- properties:
- id:
- type: integer
- title:
- type: string
- content:
- type: string
- content_type:
- type: string
- parent:
- type: string
- status:
- type: integer
- editor:
- type: string
- res_id:
- type: integer
- res_type:
- type: string
- type:
- type: integer
- tpl_id:
- type: integer
- children_count:
- type: integer
- created_at:
- type: string
- updated_at:
- type: string
- pos_start:
- type: string
- pos_end:
- type: string
- quote_exact:
- type: string
- quote_prefix:
- type: string
- quote_suffix:
- type: string
- html:
- type: string
- summary:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- delete:
- summary: '删除讨论 / 批注'
- tags:
- - discussion
- operationId: delete_api_v2_discussion_discussion_
- description: |
- 已被 `DELETE /v3/discussions/{discussion}` 取代。2026-10-15 起两边都是软删除。
- 保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '讨论 id'
- responses:
- 200:
- description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
- content:
- application/json:
- schema:
- type: object
- properties:
- ok:
- type: boolean
- message:
- type: string
- data:
- type: object
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
|