v2-para-info.yaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-para-info.yaml
  2. get:
  3. summary: '取一个章节内 pali_texts 的全部段落记录。'
  4. tags:
  5. - para-info
  6. operationId: get_api_v2_para_info
  7. description: |-
  8. 以 (book, para) 定位章节起始段,再按 chapter_len 取出该章节覆盖的整段区间。
  9. 每条记录附带 related_paragraphs 里的 CS6 锚点(book_name + cs_para),
  10. 没有锚点的段落这两个字段为 null——约 2% 的段落没有锚点,属正常情况。
  11. 实现:`ParaInfoController@index`
  12. parameters:
  13. -
  14. name: search
  15. in: query
  16. description: 搜索关键字
  17. schema:
  18. type: string
  19. -
  20. name: order
  21. in: query
  22. description: 排序字段
  23. schema:
  24. type: string
  25. -
  26. name: dir
  27. in: query
  28. description: 排序方向
  29. schema:
  30. type: string
  31. enum:
  32. - desc
  33. - asc
  34. -
  35. name: limit
  36. in: query
  37. description: 每页记录数
  38. schema:
  39. type: number
  40. -
  41. name: offset
  42. in: query
  43. description: 从第几条记录开始提取
  44. schema:
  45. type: number
  46. responses:
  47. 200:
  48. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  49. content:
  50. application/json:
  51. schema:
  52. type: object
  53. properties:
  54. ok:
  55. type: boolean
  56. message:
  57. type: string
  58. data:
  59. type: object
  60. properties:
  61. rows:
  62. type: array
  63. items:
  64. type: object
  65. count:
  66. type: integer
  67. 401:
  68. $ref: '../../main.yaml#/components/responses/Unauthorized'
  69. 422:
  70. $ref: '../../main.yaml#/components/responses/ValidationError'
  71. post:
  72. summary: '新建 para-info'
  73. tags:
  74. - para-info
  75. operationId: post_api_v2_para_info
  76. description: 实现:`ParaInfoController@store`
  77. responses:
  78. 200:
  79. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  80. content:
  81. application/json:
  82. schema:
  83. type: object
  84. properties:
  85. ok:
  86. type: boolean
  87. message:
  88. type: string
  89. data:
  90. type: object
  91. 401:
  92. $ref: '../../main.yaml#/components/responses/Unauthorized'
  93. 422:
  94. $ref: '../../main.yaml#/components/responses/ValidationError'