v2-course-curr.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # 由 openapi/scripts/generate.php 生成,请勿手改;补充写到 overrides/v2-course-curr.yaml
  2. get:
  3. summary: '获取当前用户在指定课程中的角色与 channel'
  4. tags:
  5. - course-curr
  6. operationId: get_api_v2_course_curr
  7. description: |-
  8. 必须登录。只读取 is_current=true 的记录,返回 role 与 channel_id 两个字段。
  9. 当前用户不是该课程成员时返回 not member。
  10. 实现:`CourseMemberController@curr`
  11. parameters:
  12. -
  13. name: course_id
  14. in: query
  15. schema:
  16. type: string
  17. description: 'course uid'
  18. required: true
  19. responses:
  20. 200:
  21. description: '成功。业务失败时 HTTP 仍可能为 200,以 ok 字段为准。'
  22. content:
  23. application/json:
  24. schema:
  25. type: object
  26. properties:
  27. ok:
  28. type: boolean
  29. message:
  30. type: string
  31. data:
  32. type: object
  33. 401:
  34. $ref: '../../main.yaml#/components/responses/Unauthorized'
  35. 422:
  36. $ref: '../../main.yaml#/components/responses/ValidationError'