v3-reactions-tally.yaml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-reactions-tally.yaml
  2. get:
  3. summary: '统计某个 target 下各 type 的计数'
  4. tags:
  5. - reactions
  6. operationId: get_api_v3_reactions_tally
  7. description: |-
  8. 一次聚合查询出各 type 的 count;登录时再查一次当前用户的选择,补 selected / id。
  9. 实现:`V3\ReactionTallyController@index`
  10. security:
  11. - { }
  12. -
  13. bearerAuth: []
  14. parameters:
  15. -
  16. name: target_id
  17. in: query
  18. schema:
  19. type: string
  20. description: 'target 的 uuid'
  21. required: true
  22. example: 5b4511c1-c99f-47e7-9798-97b9e5229e18
  23. responses:
  24. 200:
  25. description: 成功
  26. content:
  27. application/json:
  28. schema:
  29. type: object
  30. properties:
  31. data:
  32. type: array
  33. items:
  34. type: object
  35. properties:
  36. type:
  37. type: string
  38. count:
  39. type: integer
  40. selected:
  41. type: boolean
  42. id:
  43. type: string
  44. nullable: true
  45. meta:
  46. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  47. 422:
  48. $ref: '../../main.yaml#/components/responses/ProblemValidation'