v2-discussion-anchor-id.yaml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-discussion-anchor-id.yaml
  2. get:
  3. summary: '获取 discussion 锚点的数据'
  4. tags:
  5. - discussion-anchor
  6. operationId: get_api_v2_discussion_anchor_id_
  7. description: |-
  8. 以句子为最小单位返回锚点上下文:res_type=wbw 时,由单词定位到所属 wbw block 与巴利句子,
  9. 再用该 block 的 channel 渲染出句子内容的 markdown。其他 res_type 暂返回空字符串。
  10. 不做登录与权限校验;wbw、wbw block 或句子任一查不到时分别返回 no wbw data / no wbwBlock data / no sent data。
  11. 实现:`DiscussionController@anchor`
  12. parameters:
  13. -
  14. name: id
  15. in: path
  16. required: true
  17. schema:
  18. type: string
  19. description: '讨论 id'
  20. responses:
  21. 200:
  22. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  23. content:
  24. application/json:
  25. schema:
  26. type: object
  27. properties:
  28. ok:
  29. type: boolean
  30. message:
  31. type: string
  32. data:
  33. type: object
  34. 401:
  35. $ref: '../../main.yaml#/components/responses/Unauthorized'
  36. 422:
  37. $ref: '../../main.yaml#/components/responses/ValidationError'