| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371 |
- # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-discussions-discussion-replies.yaml
- get:
- summary: 列出话题的回复
- tags:
- - discussions
- operationId: get_api_v3_discussions_discussion_replies
- description: |-
- 按时间正序。删除了的话题(墓碑)下的回复照样可读。
- 实现:`V3\DiscussionReplyController@index`
- security:
- - { }
- -
- bearerAuth: []
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '话题的 uuid'
- -
- name: per_page
- in: query
- schema:
- type: integer
- default: 50
- description: '每页数量,最大 200'
- -
- 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
- 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: 仅在部分查询口径下返回。
- 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'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
- post:
- summary: 回复话题
- tags:
- - discussions
- operationId: post_api_v3_discussions_discussion_replies
- description: |-
- 类型与挂靠对象继承话题。已关闭的话题不能回复(409),对一条回复再回复 422。
- AI 代写同 `POST /v3/discussions`(`X-Agent-Grant` 请求头)。
- 文章上的 qa 只有文章的编辑者能回答。默认发通知,`notify=false` 关闭。
- 实现:`V3\DiscussionReplyController@store`
- security:
- -
- bearerAuth: []
- parameters:
- -
- name: discussion
- in: path
- required: true
- schema:
- type: string
- description: '话题的 uuid'
- requestBody:
- required: true
- content:
- application/json:
- schema:
- type: object
- properties:
- content:
- type: string
- description: 正文(markdown)
- notify:
- type: boolean
- description: 是否发通知
- default: true
- required:
- - content
- responses:
- 200:
- description: 成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- 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
- 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: 仅在部分查询口径下返回。
- 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
- 201:
- description: 回复成功
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- 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
- 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: 仅在部分查询口径下返回。
- 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
- 401:
- $ref: '../../main.yaml#/components/responses/ProblemUnauthorized'
- 403:
- description: 当前用户不能回复这个话题
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 409:
- description: 话题已关闭
- content:
- application/problem+json:
- schema:
- $ref: '../../main.yaml#/components/schemas/ProblemDetails'
- 422:
- $ref: '../../main.yaml#/components/responses/ProblemValidation'
|