v3-progress.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-progress.yaml
  2. get:
  3. summary: 列出章节翻译进度
  4. tags:
  5. - progress
  6. operationId: get_api_v3_progress
  7. description: |-
  8. 按 channel 查询各章节的翻译完成度。分页与 meta 全由框架算。
  9. 原来有个 `view` 参数,但它只有 `channel` 一个合法值、传别的直接 422——
  10. 那不是业务路径开关而是噪音,已去掉(硬规范第 1 条)。
  11. 实现:`V3\ProgressController@index`
  12. security:
  13. - { }
  14. -
  15. bearerAuth: []
  16. parameters:
  17. -
  18. name: channels
  19. in: query
  20. schema:
  21. type: string
  22. description: 'channel uid 列表,**下划线分隔**(不是逗号)'
  23. required: true
  24. -
  25. name: level
  26. in: query
  27. schema:
  28. type: integer
  29. description: '只返回该层级及以上的章节,需联查 pali_texts'
  30. -
  31. name: lang
  32. in: query
  33. schema:
  34. type: string
  35. description: 按译文语言过滤
  36. example: zh-Hans
  37. -
  38. name: book
  39. in: query
  40. schema:
  41. type: integer
  42. description: '按典籍 id 过滤'
  43. -
  44. name: order
  45. in: query
  46. schema:
  47. type: string
  48. enum:
  49. - book
  50. - para
  51. - lang
  52. - progress
  53. - title
  54. - last_chapter_completed_at
  55. - completed_at
  56. - updated_at
  57. default: completed_at
  58. description: 排序字段,白名单内
  59. -
  60. name: dir
  61. in: query
  62. schema:
  63. type: string
  64. enum:
  65. - asc
  66. - desc
  67. default: desc
  68. description: 排序方向
  69. -
  70. name: page
  71. in: query
  72. schema:
  73. type: integer
  74. default: 1
  75. description: 页码
  76. -
  77. name: per_page
  78. in: query
  79. schema:
  80. type: integer
  81. default: 10
  82. description: '每页数量,最大 200'
  83. responses:
  84. 200:
  85. description: 成功
  86. content:
  87. application/json:
  88. schema:
  89. type: object
  90. properties:
  91. data:
  92. type: array
  93. items:
  94. type: object
  95. properties:
  96. book:
  97. type: integer
  98. para:
  99. type: integer
  100. lang:
  101. type: string
  102. progress:
  103. type: number
  104. channel_id:
  105. type: string
  106. title:
  107. type: string
  108. nullable: true
  109. last_chapter_completed_at:
  110. type: string
  111. nullable: true
  112. completed_at:
  113. type: string
  114. nullable: true
  115. updated_at:
  116. type: string
  117. meta:
  118. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  119. 422:
  120. $ref: '../../main.yaml#/components/responses/ProblemValidation'