v2-course-course.yaml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-course-course.yaml
  2. get:
  3. summary: '获取单个 course/{course}'
  4. tags:
  5. - course
  6. operationId: get_api_v2_course_course_
  7. description: 实现:`CourseController@show`
  8. parameters:
  9. -
  10. name: course
  11. in: path
  12. required: true
  13. schema:
  14. type: string
  15. responses:
  16. 200:
  17. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  18. content:
  19. application/json:
  20. schema:
  21. type: object
  22. properties:
  23. ok:
  24. type: boolean
  25. message:
  26. type: string
  27. data:
  28. type: object
  29. properties:
  30. id:
  31. type: integer
  32. title:
  33. type: string
  34. subtitle:
  35. type: string
  36. summary:
  37. type: string
  38. sign_up_message:
  39. type: string
  40. teacher:
  41. type: string
  42. course_count:
  43. type: integer
  44. publicity:
  45. type: string
  46. start_at:
  47. type: string
  48. end_at:
  49. type: string
  50. sign_up_start_at:
  51. type: string
  52. sign_up_end_at:
  53. type: string
  54. content:
  55. type: string
  56. content_type:
  57. type: string
  58. cover:
  59. type: string
  60. channel_id:
  61. type: integer
  62. join:
  63. type: string
  64. number:
  65. type: string
  66. request_exp:
  67. type: string
  68. studio:
  69. type: string
  70. created_at:
  71. type: string
  72. updated_at:
  73. type: string
  74. member_count:
  75. type: integer
  76. members:
  77. type: string
  78. my_role:
  79. type: string
  80. cover_url:
  81. type: string
  82. anthology_id:
  83. type: integer
  84. anthology_title:
  85. type: string
  86. anthology_owner:
  87. type: string
  88. channel_name:
  89. type: string
  90. channel_owner:
  91. type: string
  92. my_status:
  93. type: string
  94. my_status_id:
  95. type: integer
  96. count_progressing:
  97. type: string
  98. 401:
  99. $ref: '../../main.yaml#/components/responses/Unauthorized'
  100. 422:
  101. $ref: '../../main.yaml#/components/responses/ValidationError'
  102. put:
  103. summary: '更新 course/{course}'
  104. tags:
  105. - course
  106. operationId: put_api_v2_course_course_
  107. description: 实现:`CourseController@update`
  108. parameters:
  109. -
  110. name: course
  111. in: path
  112. required: true
  113. schema:
  114. type: string
  115. requestBody:
  116. required: false
  117. content:
  118. application/json:
  119. schema:
  120. type: object
  121. properties:
  122. title:
  123. type: string
  124. subtitle:
  125. type: string
  126. summary:
  127. type: string
  128. number:
  129. type: string
  130. cover:
  131. type: string
  132. content:
  133. type: string
  134. sign_up_message:
  135. type: string
  136. teacher_id:
  137. type: string
  138. anthology_id:
  139. type: string
  140. channel_id:
  141. type: string
  142. publicity:
  143. type: string
  144. start_at:
  145. type: string
  146. end_at:
  147. type: string
  148. sign_up_start_at:
  149. type: string
  150. sign_up_end_at:
  151. type: string
  152. join:
  153. type: string
  154. responses:
  155. 200:
  156. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  157. content:
  158. application/json:
  159. schema:
  160. type: object
  161. properties:
  162. ok:
  163. type: boolean
  164. message:
  165. type: string
  166. data:
  167. type: object
  168. 401:
  169. $ref: '../../main.yaml#/components/responses/Unauthorized'
  170. 422:
  171. $ref: '../../main.yaml#/components/responses/ValidationError'
  172. patch:
  173. summary: '更新 course/{course}'
  174. tags:
  175. - course
  176. operationId: patch_api_v2_course_course_
  177. description: 实现:`CourseController@update`
  178. parameters:
  179. -
  180. name: course
  181. in: path
  182. required: true
  183. schema:
  184. type: string
  185. requestBody:
  186. required: false
  187. content:
  188. application/json:
  189. schema:
  190. type: object
  191. properties:
  192. title:
  193. type: string
  194. subtitle:
  195. type: string
  196. summary:
  197. type: string
  198. number:
  199. type: string
  200. cover:
  201. type: string
  202. content:
  203. type: string
  204. sign_up_message:
  205. type: string
  206. teacher_id:
  207. type: string
  208. anthology_id:
  209. type: string
  210. channel_id:
  211. type: string
  212. publicity:
  213. type: string
  214. start_at:
  215. type: string
  216. end_at:
  217. type: string
  218. sign_up_start_at:
  219. type: string
  220. sign_up_end_at:
  221. type: string
  222. join:
  223. type: string
  224. responses:
  225. 200:
  226. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  227. content:
  228. application/json:
  229. schema:
  230. type: object
  231. properties:
  232. ok:
  233. type: boolean
  234. message:
  235. type: string
  236. data:
  237. type: object
  238. 401:
  239. $ref: '../../main.yaml#/components/responses/Unauthorized'
  240. 422:
  241. $ref: '../../main.yaml#/components/responses/ValidationError'
  242. delete:
  243. summary: '删除 course/{course}'
  244. tags:
  245. - course
  246. operationId: delete_api_v2_course_course_
  247. description: 实现:`CourseController@destroy`
  248. parameters:
  249. -
  250. name: course
  251. in: path
  252. required: true
  253. schema:
  254. type: string
  255. responses:
  256. 200:
  257. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  258. content:
  259. application/json:
  260. schema:
  261. type: object
  262. properties:
  263. ok:
  264. type: boolean
  265. message:
  266. type: string
  267. data:
  268. type: object
  269. 401:
  270. $ref: '../../main.yaml#/components/responses/Unauthorized'
  271. 422:
  272. $ref: '../../main.yaml#/components/responses/ValidationError'