@@ -0,0 +1,8 @@
+name: course
+in: path
+description: Course PK
+required: true
+schema:
+ type: integer
+ format: u32
+ summary: PK of the course to fetch
@@ -0,0 +1,10 @@
+description: OK
+content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: ../../../schemas/api/course.yaml
+ # TODO
+ # example:
+ # $ref: ../../../examples/api/lecturers/index.yaml
+ $ref: ../../../../schemas/api/course.yaml
+ # $ref: ../../../../examples/api/lecturers/index.yaml
@@ -0,0 +1,14 @@
+description: Single course entry
+type: object
+properties:
+ pk:
+ $ref: ../common/pk.yaml
+ school:
+ description: Name of the school
+ type: string
+ name:
+ description: Name of the course
+required:
+ - school
+ - name
@@ -25,6 +25,12 @@ paths:
/api/lecturers:
$ref: ./paths/api/lecturers/index.yaml
+ # Courses
+ /api/courses:
+ $ref: ./paths/api/courses/index.yaml
+ /api/courses/{course}:
+ $ref: ./paths/api/courses/{course}/index.yaml
+
# Modules
/api/modules:
$ref: ./paths/api/modules/index.yaml
+get:
+ operationId: GetCourses
+ summary: >-
+ A list of all courses
+ security: []
+ tags:
+ - Courses
+ responses:
+ "200":
+ $ref: ../../../components/responses/api/courses/index-get-200.yaml
@@ -0,0 +1,12 @@
+ operationId: GetCourse
+ Get a single course
+ parameters:
+ - $ref: ../../../../components/parameters/course.yaml
+ $ref: ../../../../components/responses/api/courses/{course}/index-get-200.yaml