| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-studios-studio-terms.yaml
- get:
- summary: 'studio 的术语列表'
- tags:
- - studios
- operationId: get_api_v3_studios_studio_terms
- description: |-
- studio 名下的全部术语(它的 channel 里的与 studio 级的)。本人或团队成员能看。请求头 `Accept` 是
- `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet` 时导出成 xlsx(列与说明同 channel 的术语列表),
- 取代 v2 `terms-export?view=studio`。
- 实现:`V3\StudioTermController@index`
- security:
- -
- bearerAuth: []
- parameters:
- -
- name: studio
- in: path
- required: true
- schema:
- type: string
- description: '用户或团队的 uuid'
- -
- name: general
- in: query
- schema:
- type: boolean
- description: '只要 studio 级术语(不属于任何 channel)'
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 20
- description: '每页条数,最大 200'
- -
- name: search
- in: query
- schema:
- type: string
- description: 按词、释义搜索
- -
- name: quality
- in: query
- schema:
- type: string
- enum:
- - featured
- - standard
- - draft
- - pending
- description: '质量;pending 含未评级的'
- -
- name: category
- in: query
- schema:
- type: string
- description: 百科分类
- -
- name: order
- in: query
- schema:
- type: string
- enum:
- - updated_at
- - created_at
- - word
- default: updated_at
- description: 排序字段
- -
- name: dir
- in: query
- schema:
- type: string
- enum:
- - asc
- - desc
- description: 排序方向
- -
- name: page
- in: query
- schema:
- type: integer
- description: 页码
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- type: object
- properties:
- id:
- type: string
- word:
- type: string
- tag:
- type: string
- nullable: true
- meaning:
- type: string
- other_meaning:
- type: string
- nullable: true
- language:
- type: string
- channel_id:
- type: string
- nullable: true
- channel:
- type: object
- properties: { id: { type: string }, name: { type: string } }
- nullable: true
- owner_id:
- type: string
- quality:
- type: string
- nullable: true
- content_type:
- type: string
- summary:
- type: string
- nullable: true
- note:
- type: string
- nullable: true
- redirect:
- type: string
- nullable: true
- categories:
- type: array
- items: { type: string }
- summary_text:
- type: string
- body:
- type: array
- items: { $ref: '../../main.yaml#/components/schemas/MarkupNode' }
- description: 仅在部分查询口径下返回。
- html:
- type: string
- 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
- etag:
- type: string
- abilities:
- type: object
- properties: { update: { type: boolean }, delete: { type: boolean } }
- created_at:
- type: string
- updated_at:
- type: string
- deleted_at:
- type: string
- nullable: true
- meta:
- $ref: '../../main.yaml#/components/schemas/PaginationMeta'
- 401:
- $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
- 403:
- description: 不是本人,也不是团队成员
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- post:
- summary: '新建 studio 级术语'
- tags:
- - studios
- operationId: post_api_v3_studios_studio_terms
- description: |-
- 不属于任何 channel,owner 名下所有 channel 共用。本人或团队 owner / manager 能建;AI 模型不能建。
- 同一 studio、同一语言里 word@tag 唯一(409)。
- 实现:`V3\StudioTermController@store`
- security:
- -
- bearerAuth: []
- parameters:
- -
- name: studio
- in: path
- required: true
- schema:
- type: string
- description: '用户或团队的 uuid'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- word:
- type: string
- description: 巴利词,建立后不能改
- tag:
- type: string
- nullable: true
- description: '义项(同词多义时区分),不能含 @,建立后不能改'
- meaning:
- type: string
- description: 释义
- language:
- type: string
- description: 语言
- other_meaning:
- type: string
- nullable: true
- description: 其它释义
- note:
- type: string
- nullable: true
- description: 正文
- summary:
- type: string
- nullable: true
- description: '摘要,格式与 note 相同'
- quality:
- type: string
- nullable: true
- description: 质量
- enum:
- - featured
- - standard
- - draft
- - pending
- content_type:
- type: string
- description: 正文方言
- enum:
- - markdown
- - markdown-e2
- default: markdown-e2
- redirect:
- type: string
- nullable: true
- description: '重定向到 word 或 word@tag'
- required:
- - word
- - meaning
- - language
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- word:
- type: string
- tag:
- type: string
- nullable: true
- meaning:
- type: string
- other_meaning:
- type: string
- nullable: true
- language:
- type: string
- channel_id:
- type: string
- nullable: true
- channel:
- type: object
- properties:
- id: { type: string }
- name: { type: string }
- nullable: true
- owner_id:
- type: string
- quality:
- type: string
- nullable: true
- content_type:
- type: string
- summary:
- type: string
- nullable: true
- note:
- type: string
- nullable: true
- redirect:
- type: string
- nullable: true
- categories:
- type: array
- items:
- type: string
- summary_text:
- type: string
- body:
- type: array
- items:
- $ref: '../../main.yaml#/components/schemas/MarkupNode'
- description: 仅在部分查询口径下返回。
- html:
- type: string
- 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
- etag:
- type: string
- abilities:
- type: object
- properties:
- update: { type: boolean }
- delete: { type: boolean }
- created_at:
- type: string
- updated_at:
- type: string
- deleted_at:
- type: string
- nullable: true
- 201:
- description: 已新建
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: object
- properties:
- id:
- type: string
- word:
- type: string
- tag:
- type: string
- nullable: true
- meaning:
- type: string
- other_meaning:
- type: string
- nullable: true
- language:
- type: string
- channel_id:
- type: string
- nullable: true
- channel:
- type: object
- properties:
- id: { type: string }
- name: { type: string }
- nullable: true
- owner_id:
- type: string
- quality:
- type: string
- nullable: true
- content_type:
- type: string
- summary:
- type: string
- nullable: true
- note:
- type: string
- nullable: true
- redirect:
- type: string
- nullable: true
- categories:
- type: array
- items:
- type: string
- summary_text:
- type: string
- body:
- type: array
- items:
- $ref: '../../main.yaml#/components/schemas/MarkupNode'
- description: 仅在部分查询口径下返回。
- html:
- type: string
- 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
- etag:
- type: string
- abilities:
- type: object
- properties:
- update: { type: boolean }
- delete: { type: boolean }
- created_at:
- type: string
- updated_at:
- type: string
- deleted_at:
- type: string
- nullable: true
- 401:
- $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
- 403:
- description: '不能在这个 studio 新建'
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 409:
- description: '已有这个 word@tag'
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|