v2-progress.yaml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-progress.yaml
  2. get:
  3. summary: '列出 progress'
  4. tags:
  5. - progress
  6. operationId: get_api_v2_progress
  7. description: 实现:`ProgressChapterController@index`
  8. parameters:
  9. -
  10. name: progress
  11. in: query
  12. schema:
  13. type: string
  14. -
  15. name: offset
  16. in: query
  17. schema:
  18. type: string
  19. -
  20. name: limit
  21. in: query
  22. schema:
  23. type: string
  24. -
  25. name: channel
  26. in: query
  27. schema:
  28. type: string
  29. -
  30. name: view
  31. in: query
  32. schema:
  33. type: string
  34. enum:
  35. - ids
  36. - studio
  37. - tag
  38. - chapter-tag
  39. - lang
  40. - channel-type
  41. - channel
  42. - chapter_channels
  43. - chapter
  44. - top
  45. - search
  46. - public
  47. -
  48. name: book
  49. in: query
  50. schema:
  51. type: string
  52. -
  53. name: par
  54. in: query
  55. schema:
  56. type: string
  57. -
  58. name: name
  59. in: query
  60. schema:
  61. type: string
  62. -
  63. name: public
  64. in: query
  65. schema:
  66. type: string
  67. -
  68. name: tags
  69. in: query
  70. schema:
  71. type: string
  72. -
  73. name: channel_type
  74. in: query
  75. schema:
  76. type: string
  77. -
  78. name: lang
  79. in: query
  80. schema:
  81. type: string
  82. -
  83. name: studio
  84. in: query
  85. schema:
  86. type: string
  87. -
  88. name: key
  89. in: query
  90. schema:
  91. type: string
  92. -
  93. name: order
  94. in: query
  95. schema:
  96. type: string
  97. -
  98. name: dir
  99. in: query
  100. schema:
  101. type: string
  102. -
  103. name: search
  104. in: query
  105. description: 搜索关键字
  106. schema:
  107. type: string
  108. responses:
  109. 200:
  110. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  111. content:
  112. application/json:
  113. schema:
  114. type: object
  115. properties:
  116. ok:
  117. type: boolean
  118. message:
  119. type: string
  120. data:
  121. type: object
  122. properties:
  123. rows:
  124. type: array
  125. items:
  126. anyOf: [{ type: object, description: view=chapter_channels, properties: { book: { type: integer }, para: { type: integer }, uid: { type: string }, channel_id: { type: string }, name: { type: string }, type: { type: string }, progress: { type: number }, updated_at: { type: string }, channel: { type: object, properties: { uid: { type: string }, name: { type: string }, type: { type: string } } } } }, { type: object, description: view=ids, properties: { id: { type: string } } }, { type: object, description: view=channel, properties: { channel_id: { type: string }, count: { type: integer }, studio: { type: object, properties: { id: { type: string }, nickName: { type: string }, realName: { type: string }, studioName: { type: string }, avatar: { type: string } } }, channel: { type: object, properties: { name: { type: string }, summary: { type: string, nullable: true }, lang: { type: string } } } } }]
  127. count:
  128. type: integer
  129. 401:
  130. $ref: '../../main.yaml#/components/responses/Unauthorized'
  131. 422:
  132. $ref: '../../main.yaml#/components/responses/ValidationError'
  133. post:
  134. summary: '新建 progress'
  135. tags:
  136. - progress
  137. operationId: post_api_v2_progress
  138. description: 实现:`ProgressChapterController@store`
  139. responses:
  140. 200:
  141. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  142. content:
  143. application/json:
  144. schema:
  145. type: object
  146. properties:
  147. ok:
  148. type: boolean
  149. message:
  150. type: string
  151. data:
  152. type: object
  153. 401:
  154. $ref: '../../main.yaml#/components/responses/Unauthorized'
  155. 422:
  156. $ref: '../../main.yaml#/components/responses/ValidationError'