@@ -123,8 +123,10 @@ Router.get('/:assignmentId', asInt('assignmentId'), isAuthorizedByAssignmentStat
123123 * tags:
124124 * - Assignments
125125 * responses:
126- * '200':
127- * description: OK
126+ * '201':
127+ * description: Created
128+ * '400':
129+ * description: Bad Request
128130 * parameters:
129131 * - name: courseId
130132 * in: path
@@ -136,7 +138,41 @@ Router.get('/:assignmentId', asInt('assignmentId'), isAuthorizedByAssignmentStat
136138 * content:
137139 * application/x-www-form-urlencoded:
138140 * schema:
139- * $ref: '#/components/schemas/Assignment'
141+ * type: object
142+ * required: [courseId, name, categoryName, maxFileSize, disableHandins, startDate, dueDate, endDate]
143+ * properties:
144+ * courseId:
145+ * type: integer
146+ * name:
147+ * type: string
148+ * maxLength: 128
149+ * categoryName:
150+ * type: string
151+ * maxLength: 128
152+ * description:
153+ * type: string
154+ * nullable: true
155+ * maxFileSize:
156+ * type: integer
157+ * maxSubmissions:
158+ * type: integer
159+ * nullable: true
160+ * disableHandins:
161+ * type: boolean
162+ * startDate:
163+ * type: string
164+ * format: date-time
165+ * dueDate:
166+ * type: string
167+ * format: date-time
168+ * endDate:
169+ * type: string
170+ * format: date-time
171+ * scoringType:
172+ * type: string
173+ * enum: [highest-score, latest-submission, no-score]
174+ * default: highest-score
175+ * description: Determines how the final score is chosen for the assignment
140176 */
141177
142178
@@ -151,7 +187,9 @@ Router.post('/', isAuthorized('assignmentEditAll'), upload.array('files', 5), va
151187 * - Assignments
152188 * responses:
153189 * '200':
154- * description: OK
190+ * description: Updated
191+ * '404':
192+ * description: Not Found
155193 * parameters:
156194 * - name: courseId
157195 * in: path
@@ -168,7 +206,37 @@ Router.post('/', isAuthorized('assignmentEditAll'), upload.array('files', 5), va
168206 * content:
169207 * application/x-www-form-urlencoded:
170208 * schema:
171- * $ref: '#/components/schemas/Assignment'
209+ * type: object
210+ * properties:
211+ * name:
212+ * type: string
213+ * maxLength: 128
214+ * categoryName:
215+ * type: string
216+ * maxLength: 128
217+ * description:
218+ * type: string
219+ * nullable: true
220+ * maxFileSize:
221+ * type: integer
222+ * maxSubmissions:
223+ * type: integer
224+ * nullable: true
225+ * disableHandins:
226+ * type: boolean
227+ * startDate:
228+ * type: string
229+ * format: date-time
230+ * dueDate:
231+ * type: string
232+ * format: date-time
233+ * endDate:
234+ * type: string
235+ * format: date-time
236+ * scoringType:
237+ * type: string
238+ * enum: [highest-score, latest-submission, no-score]
239+ * description: Determines how the final score is chosen for the assignment
172240 */
173241Router . put (
174242 '/:assignmentId' ,
0 commit comments