v2-discussion-count.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-discussion-count.yaml
  2. get:
  3. summary: '列出 discussion-count'
  4. tags:
  5. - discussion-count
  6. operationId: get_api_v2_discussion_count
  7. description: 实现:`DiscussionCountController@index`
  8. parameters:
  9. -
  10. name: search
  11. in: query
  12. description: 搜索关键字
  13. schema:
  14. type: string
  15. -
  16. name: order
  17. in: query
  18. description: 排序字段
  19. schema:
  20. type: string
  21. -
  22. name: dir
  23. in: query
  24. description: 排序方向
  25. schema:
  26. type: string
  27. enum:
  28. - desc
  29. - asc
  30. -
  31. name: limit
  32. in: query
  33. description: 每页记录数
  34. schema:
  35. type: number
  36. -
  37. name: offset
  38. in: query
  39. description: 从第几条记录开始提取
  40. schema:
  41. type: number
  42. responses:
  43. 200:
  44. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  45. content:
  46. application/json:
  47. schema:
  48. type: object
  49. properties:
  50. ok:
  51. type: boolean
  52. message:
  53. type: string
  54. data:
  55. type: object
  56. properties:
  57. rows:
  58. type: array
  59. items:
  60. type: object
  61. count:
  62. type: integer
  63. 401:
  64. $ref: '../../main.yaml#/components/responses/Unauthorized'
  65. 422:
  66. $ref: '../../main.yaml#/components/responses/ValidationError'
  67. post:
  68. summary: 课程模式业务逻辑
  69. tags:
  70. - discussion-count
  71. operationId: post_api_v2_discussion_count
  72. description: |-
  73. 标准答案channel:学生提问
  74. 学生channel: 老师批改作业
  75. 老师:
  76. 标准答案channel: 本期学生,老师(区分已经回复,未回复)
  77. 学生channel: 本期学生,老师
  78. 学生:
  79. 标准答案channel:我自己topic(区分已经回复,未回复)
  80. 学生自己channel: 我自己,本期老师
  81. 输入:
  82. 句子列表
  83. courseId
  84. 返回数据
  85. resId
  86. type:'discussion':
  87. my:number
  88. myReplied:number
  89. all:number
  90. allReplied:number
  91. 实现:`DiscussionCountController@store`
  92. requestBody:
  93. required: false
  94. content:
  95. application/json:
  96. schema:
  97. type: object
  98. properties:
  99. course_id:
  100. type: string
  101. sentences:
  102. type: string
  103. responses:
  104. 200:
  105. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  106. content:
  107. application/json:
  108. schema:
  109. type: object
  110. properties:
  111. ok:
  112. type: boolean
  113. message:
  114. type: string
  115. data:
  116. type: object
  117. properties:
  118. id:
  119. type: integer
  120. res_id:
  121. type: integer
  122. res_type:
  123. type: string
  124. type:
  125. type: integer
  126. editor_uid:
  127. type: string
  128. wbw:
  129. type: string
  130. 401:
  131. $ref: '../../main.yaml#/components/responses/Unauthorized'
  132. 422:
  133. $ref: '../../main.yaml#/components/responses/ValidationError'