v3-channels.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v3-channels.yaml
  2. get:
  3. summary: '公开 channel 目录'
  4. tags:
  5. - channels
  6. operationId: get_api_v3_channels
  7. description: |-
  8. 只列全网公开的。`system=true` 只要系统 channel——系统 channel 是全站共用的原文、术语等,
  9. 不论 status 都列(巴利原文 `_System_Pali_VRI_` 就是 status 10)。带 `book` + `para` 时每条多返回该章的完成度
  10. `progress`,并可按它排序。
  11. 实现:`V3\ChannelController@index`
  12. security:
  13. - { }
  14. -
  15. bearerAuth: []
  16. parameters:
  17. -
  18. name: system
  19. in: query
  20. schema:
  21. type: boolean
  22. description: '只列系统 channel'
  23. -
  24. name: per_page
  25. in: query
  26. schema:
  27. type: integer
  28. default: 20
  29. description: '每页数量,最大 200'
  30. -
  31. name: search
  32. in: query
  33. schema:
  34. type: string
  35. description: 按名字模糊匹配
  36. -
  37. name: type
  38. in: query
  39. schema:
  40. type: string
  41. enum:
  42. - translation
  43. - nissaya
  44. - original
  45. - wbw
  46. - commentary
  47. - similar
  48. description: 'channel 类型'
  49. -
  50. name: lang
  51. in: query
  52. schema:
  53. type: string
  54. description: 语言
  55. -
  56. name: book
  57. in: query
  58. schema:
  59. type: integer
  60. description: '章节所在的书(与 para 同时给)'
  61. -
  62. name: para
  63. in: query
  64. schema:
  65. type: integer
  66. description: '章节起始段(与 book 同时给)'
  67. -
  68. name: order
  69. in: query
  70. schema:
  71. type: string
  72. enum:
  73. - updated_at
  74. - created_at
  75. - name
  76. - progress
  77. default: updated_at
  78. description: 排序字段
  79. -
  80. name: dir
  81. in: query
  82. schema:
  83. type: string
  84. enum:
  85. - asc
  86. - desc
  87. default: desc
  88. description: 排序方向
  89. -
  90. name: page
  91. in: query
  92. schema:
  93. type: integer
  94. default: 1
  95. description: 页码
  96. responses:
  97. 200:
  98. description: 成功
  99. content:
  100. application/json:
  101. schema:
  102. type: object
  103. properties:
  104. data:
  105. type: array
  106. items:
  107. type: object
  108. properties:
  109. id:
  110. type: string
  111. name:
  112. type: string
  113. summary:
  114. type: string
  115. nullable: true
  116. type:
  117. type: string
  118. lang:
  119. type: string
  120. status:
  121. type: integer
  122. is_system:
  123. type: boolean
  124. source_type:
  125. type: string
  126. source_id:
  127. type: string
  128. nullable: true
  129. owner:
  130. type: object
  131. properties: { kind: { type: string }, id: { type: string }, nickName: { type: string }, realName: { type: string }, avatar: { type: string, nullable: true } }
  132. abilities:
  133. type: object
  134. properties: { read: { type: boolean }, write: { type: boolean }, update: { type: boolean }, delete: { type: boolean } }
  135. progress:
  136. type: number
  137. nullable: true
  138. description: 仅在部分查询口径下返回。
  139. created_at:
  140. type: string
  141. updated_at:
  142. type: string
  143. meta:
  144. $ref: '../../main.yaml#/components/schemas/PaginationMeta'
  145. 422:
  146. $ref: '../../main.yaml#/components/responses/ProblemValidation'