2
0

v3-discussions-batch-count.yaml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-discussions-batch-count.yaml
  2. post:
  3. summary: 批量取讨论角标
  4. tags:
  5. - discussions
  6. operationId: post_api_v3_discussions_batch_count
  7. description: |-
  8. 每个对象返回未关闭的评论线程数(total)与其中当前用户发起的数目(mine,未登录为 0),
  9. 按请求顺序、一个不少(没有讨论的为 0)。只数评论线程(discussion / qa / help / issue),
  10. 批注与已删除的不算;可见性与列表相同:未登录不数协作类话题,basic 角色在无权管理的
  11. 对象上只数自己发起的协作类话题。最多 500 个对象。
  12. 与 v2 的区别:入参是对象 uid 而不是句子坐标;只给计数不给明细;v2 不分类型、不管可见性。
  13. 实现:`V3\DiscussionBatchCountController@__invoke`
  14. security:
  15. - { }
  16. -
  17. bearerAuth: []
  18. requestBody:
  19. required: true
  20. content:
  21. application/json:
  22. schema:
  23. type: object
  24. properties:
  25. targets:
  26. type: array
  27. description: '讨论对象列表,每项 {type, id},最多 500 个'
  28. items:
  29. type: object
  30. properties:
  31. type:
  32. type: string
  33. description: 对象类型
  34. enum:
  35. - sentence
  36. - wbw
  37. id:
  38. type: string
  39. description: '对象 uid'
  40. required:
  41. - type
  42. - id
  43. required:
  44. - targets
  45. responses:
  46. 200:
  47. description: 成功
  48. content:
  49. application/json:
  50. schema:
  51. type: object
  52. properties:
  53. data:
  54. type: array
  55. items:
  56. type: object
  57. properties:
  58. target_type:
  59. type: string
  60. target_id:
  61. type: string
  62. total:
  63. type: integer
  64. mine:
  65. type: integer
  66. meta:
  67. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  68. 422:
  69. $ref: '../../main.yaml#/components/responses/ProblemValidation'