File tree 1 file changed +50
-29
lines changed
1 file changed +50
-29
lines changed Original file line number Diff line number Diff line change @@ -225,7 +225,7 @@ paths:
225
225
content :
226
226
application/json :
227
227
schema :
228
- $ref : " #/components/schemas/CourseBase "
228
+ $ref : " #/components/schemas/CourseUpdateBody "
229
229
responses :
230
230
" 200 " :
231
231
description : " Returns the updated course"
@@ -355,6 +355,42 @@ paths:
355
355
$ref : " #/components/responses/InternalServerError"
356
356
components :
357
357
schemas :
358
+ SectionBase :
359
+ type : object
360
+ properties :
361
+ title :
362
+ type : string
363
+ description : Can be empty
364
+ elements :
365
+ type : array
366
+ items :
367
+ type : object
368
+ properties :
369
+ type :
370
+ type : string
371
+ enum :
372
+ - VIDEO
373
+ - QUIZ
374
+ - PAGE
375
+ # - ATTACHMENT # TODO
376
+ id :
377
+ type : string
378
+ order :
379
+ type : integer
380
+ required :
381
+ - type
382
+ - id
383
+ - order
384
+ required :
385
+ - title
386
+ - elements
387
+ Section :
388
+ allOf :
389
+ - $ref : " #/components/schemas/SectionBase"
390
+ - properties :
391
+ id :
392
+ type : string
393
+ description : The id is only required if the section is updated
358
394
CourseBase :
359
395
type : object
360
396
properties :
@@ -371,34 +407,7 @@ components:
371
407
sections :
372
408
type : array
373
409
items :
374
- type : object
375
- properties :
376
- title :
377
- type : string
378
- description : Can be empty
379
- elements :
380
- type : array
381
- items :
382
- type : object
383
- properties :
384
- type :
385
- type : string
386
- enum :
387
- - VIDEO
388
- - QUIZ
389
- - PAGE
390
- # - ATTACHMENT # TODO
391
- id :
392
- type : string
393
- order :
394
- type : integer
395
- required :
396
- - type
397
- - id
398
- - order
399
- required :
400
- - title
401
- - elements
410
+ $ref : " #/components/schemas/SectionBase"
402
411
required :
403
412
- title
404
413
- description
@@ -408,6 +417,10 @@ components:
408
417
allOf :
409
418
- $ref : " #/components/schemas/CourseBase"
410
419
- properties :
420
+ sections :
421
+ type : array
422
+ items :
423
+ $ref : " #/components/schemas/Section"
411
424
id :
412
425
type : string
413
426
userId :
@@ -424,6 +437,14 @@ components:
424
437
- userId
425
438
- createdAt
426
439
- updatedAt
440
+ CourseUpdateBody :
441
+ allOf :
442
+ - $ref : " #/components/schemas/CourseBase"
443
+ - properties :
444
+ sections :
445
+ type : array
446
+ items :
447
+ $ref : " #/components/schemas/Section"
427
448
PageBase :
428
449
type : object
429
450
properties :
You can’t perform that action at this time.
0 commit comments