v3-reactions.yaml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-reactions.yaml
  2. get:
  3. summary: '列出某个 target 下的 reactions'
  4. tags:
  5. - reactions
  6. operationId: get_api_v3_reactions
  7. description: |-
  8. 按 target 聚合的公共列表,不要求登录。分页由 Laravel paginator 提供。
  9. 实现:`V3\ReactionController@index`
  10. security:
  11. - { }
  12. -
  13. bearerAuth: []
  14. parameters:
  15. -
  16. name: per_page
  17. in: query
  18. schema:
  19. type: integer
  20. default: 15
  21. description: '每页数量,最大 200'
  22. -
  23. name: target_id
  24. in: query
  25. schema:
  26. type: string
  27. description: 'target 的 uuid'
  28. required: true
  29. example: 5b4511c1-c99f-47e7-9798-97b9e5229e18
  30. -
  31. name: type
  32. in: query
  33. schema:
  34. type: string
  35. enum:
  36. - like
  37. - dislike
  38. - favorite
  39. - watch
  40. - bookmark
  41. - download
  42. description: 操作类型
  43. -
  44. name: page
  45. in: query
  46. schema:
  47. type: integer
  48. default: 1
  49. description: 页码
  50. responses:
  51. 200:
  52. description: 成功
  53. content:
  54. application/json:
  55. schema:
  56. type: object
  57. properties:
  58. data:
  59. type: array
  60. items:
  61. type: object
  62. properties:
  63. id:
  64. type: string
  65. type:
  66. type: string
  67. target_id:
  68. type: string
  69. target_type:
  70. type: string
  71. context:
  72. type: string
  73. nullable: true
  74. created_at:
  75. type: string
  76. updated_at:
  77. type: string
  78. user:
  79. type: object
  80. 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 } } }
  81. nullable: true
  82. meta:
  83. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  84. 422:
  85. $ref: '../../main.yaml#/components/responses/ProblemValidation'