| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-terms-term.yaml
- get:
- summary: 查询单条术语
- tags:
- - terms
- operationId: get_api_v2_terms_term_
- description: |
- 已被 `GET /v3/terms/{term}` 取代(正文是新渲染器的「摘要 + 正文」,节点树 `body` 或 `format=html` 的 `html`;
- 可用 `channels` / `mode` 指定渲染版本与模式)。保留仅为 dashboard-v4、旧客户端兼容,待 v4 下线后删除。
- parameters:
- -
- name: term
- in: path
- required: true
- schema:
- type: string
- -
- name: channel
- in: query
- schema:
- type: string
- description: '渲染 note 时使用的 channel 列表,多个用下划线分隔; 不传则按术语自身的 channel 或对应语言的社区 channel 渲染'
- -
- name: mode
- in: query
- schema:
- type: string
- default: read
- description: 渲染模式
- -
- name: format
- in: query
- schema:
- type: string
- enum:
- - react
- - html
- - text
- default: react
- description: 'note 的渲染输出格式'
- -
- name: community_summary
- in: query
- schema:
- type: boolean
- description: '传入该参数时,没有 note 的术语回落到社区解释作为 summary'
- -
- name: exp
- in: query
- schema:
- type: boolean
- 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
- guid:
- type: string
- word:
- type: string
- word_en:
- type: string
- meaning:
- type: string
- other_meaning:
- type: string
- tag:
- type: string
- note:
- type: string
- language:
- type: string
- channel_id:
- type: integer
- channal:
- type: string
- studio:
- type: string
- editor:
- type: string
- created_at:
- type: string
- updated_at:
- type: string
- mode:
- type: string
- format:
- type: string
- studioId:
- type: string
- channel:
- type: string
- html:
- type: string
- summary_is_community:
- type: string
- summary:
- type: string
- role:
- type: string
- exp:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- put:
- summary: 修改术语
- tags:
- - terms
- operationId: put_api_v2_terms_term_
- description: |
- 已被 `PATCH /v3/terms/{term}` 取代(只有 PATCH;必须带 `If-Match`;word / tag 建立后不能改)。
- 保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: term
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: false
- content:
- application/json:
- schema:
- type: object
- properties:
- access_token:
- type: string
- description: 'channel access token,供非 owner 身份验证 channel 编辑权'
- word:
- type: string
- description: '术语词形,提交时同步重算 word_en'
- meaning:
- type: string
- description: 主要义项
- other_meaning:
- type: string
- description: 其他义项,逗号分隔
- note:
- type: string
- description: 术语解释,Markdown
- tag:
- type: string
- description: 标签
- language:
- 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
- guid:
- type: string
- word:
- type: string
- word_en:
- type: string
- meaning:
- type: string
- other_meaning:
- type: string
- tag:
- type: string
- note:
- type: string
- language:
- type: string
- channel_id:
- type: integer
- channal:
- type: string
- studio:
- type: string
- editor:
- type: string
- created_at:
- type: string
- updated_at:
- type: string
- mode:
- type: string
- format:
- type: string
- studioId:
- type: string
- channel:
- type: string
- html:
- type: string
- summary_is_community:
- type: string
- summary:
- type: string
- role:
- type: string
- exp:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- patch:
- summary: 修改术语
- tags:
- - terms
- operationId: patch_api_v2_terms_term_
- description: |
- 已被 `PATCH /v3/terms/{term}` 取代(必须带 `If-Match`;word / tag 建立后不能改)。
- 保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: term
- in: path
- required: true
- schema:
- type: string
- requestBody:
- required: false
- content:
- application/json:
- schema:
- type: object
- properties:
- access_token:
- type: string
- description: 'channel access token,供非 owner 身份验证 channel 编辑权'
- word:
- type: string
- description: '术语词形,提交时同步重算 word_en'
- meaning:
- type: string
- description: 主要义项
- other_meaning:
- type: string
- description: 其他义项,逗号分隔
- note:
- type: string
- description: 术语解释,Markdown
- tag:
- type: string
- description: 标签
- language:
- 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
- guid:
- type: string
- word:
- type: string
- word_en:
- type: string
- meaning:
- type: string
- other_meaning:
- type: string
- tag:
- type: string
- note:
- type: string
- language:
- type: string
- channel_id:
- type: integer
- channal:
- type: string
- studio:
- type: string
- editor:
- type: string
- created_at:
- type: string
- updated_at:
- type: string
- mode:
- type: string
- format:
- type: string
- studioId:
- type: string
- channel:
- type: string
- html:
- type: string
- summary_is_community:
- type: string
- summary:
- type: string
- role:
- type: string
- exp:
- type: string
- 401:
- $ref: '../../main.yaml#/components/responses/Unauthorized'
- 422:
- $ref: '../../main.yaml#/components/responses/ValidationError'
- deprecated: true
- delete:
- summary: 批量删除术语
- tags:
- - terms
- operationId: delete_api_v2_terms_term_
- description: |
- 已被 `DELETE /v3/terms/{term}` 取代(一次一条、软删除,返回被删的术语;v2 的 body 里传一批 id 不再支持)。
- 保留仅为 dashboard-v4 兼容,待 v4 下线后删除。
- parameters:
- -
- name: term
- in: path
- required: true
- schema:
- type: string
- -
- name: uuid
- in: query
- schema:
- type: string
- description: '存在该参数即表示 id 以数组形式提交,并启用 channel 协作者删除权限判定'
- -
- name: id
- in: query
- schema:
- type: array
- description: '要删除的术语 id 列表。带 uuid 时为数组,否则为 JSON 数组字符串'
- required: true
- 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
|