Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

Commit 16d0e85

Browse files
committed
Added the apropriate returns and examples
Issues #44 and #64
1 parent 39d980e commit 16d0e85

File tree

1 file changed

+104
-17
lines changed

1 file changed

+104
-17
lines changed

documentation/dev/endpoints/swagger/task.yaml

+104-17
Original file line numberDiff line numberDiff line change
@@ -586,20 +586,43 @@ paths:
586586
properties:
587587
lecture_id:
588588
type: integer
589-
example: 2
589+
example: 1
590590
name_key:
591591
type: string
592592
example: Tolles-Aufgaben-Pack
593593
task_ids:
594594
type: array
595595
items:
596596
type: integer
597-
example: 5
597+
example: 1
598598
difficulty_id:
599599
type: integer
600+
example: 1
600601
responses:
601602
'200':
602603
description: Ok
604+
content:
605+
application/json:
606+
schema:
607+
type: object
608+
properties:
609+
task_group_id:
610+
type: integer
611+
example: 1
612+
lecture_id:
613+
type: integer
614+
example: 1
615+
name_key:
616+
type: string
617+
example: Tolles-Aufgaben-Pack
618+
task_ids:
619+
type: array
620+
items:
621+
type: integer
622+
example: 1
623+
difficulty_id:
624+
type: integer
625+
example: 1
603626
'400':
604627
description: User Error
605628
content:
@@ -641,24 +664,44 @@ paths:
641664
properties:
642665
task_group_id:
643666
type: integer
644-
example: 7
667+
example: 1
645668
description: The task group id to modify
646669
lecture_id:
647670
type: integer
648-
example: 2
671+
example: 1
649672
name_key:
650673
type: string
651674
example: Tolles-Aufgaben-Pack
652675
task_ids:
653676
type: array
654677
items:
655678
type: integer
656-
example: 5
679+
example: 1
657680
difficulty_id:
658681
type: integer
682+
example: 1
659683
responses:
660684
'200':
661685
description: Ok
686+
content:
687+
application/json:
688+
schema:
689+
type: object
690+
properties:
691+
lecture_id:
692+
type: integer
693+
example: 1
694+
name_key:
695+
type: string
696+
example: Tolles-Aufgaben-Pack
697+
task_ids:
698+
type: array
699+
items:
700+
type: integer
701+
example: 1
702+
difficulty_id:
703+
type: integer
704+
example: 1
662705
'400':
663706
description: User Error
664707
content:
@@ -744,6 +787,7 @@ paths:
744787
required: true
745788
schema:
746789
type: string
790+
example: 0b870676-1a01-47aa-8402-859fb9806238
747791
responses:
748792
'200':
749793
description: Ok
@@ -794,7 +838,8 @@ paths:
794838
in: path
795839
required: true
796840
schema:
797-
type: string
841+
type: integer
842+
example: 1
798843
responses:
799844
'200':
800845
description: Ok
@@ -840,6 +885,7 @@ paths:
840885
required: true
841886
schema:
842887
type: string
888+
example: 1
843889
responses:
844890
'200':
845891
description: Ok
@@ -885,14 +931,28 @@ paths:
885931
properties:
886932
task_group_id:
887933
type: integer
888-
example: 7
934+
example: 1
889935
description: The task group id to add the task to
890936
task_id:
891937
type: integer
892938
description: The id of the task to add to the Task Group
939+
example: 1
893940
responses:
894941
'200':
895942
description: Ok
943+
content:
944+
application/json:
945+
schema:
946+
type: object
947+
properties:
948+
task_group_id:
949+
type: integer
950+
example: 1
951+
description: The task group id to add the task to
952+
task_id:
953+
type: integer
954+
description: The id of the task to add to the Task Group
955+
example: 1
896956
'400':
897957
description: User Error
898958
content:
@@ -932,13 +992,15 @@ paths:
932992
required: true
933993
description: The id of the task group
934994
schema:
935-
type: string
995+
type: integer
996+
example: 1
936997
- name: task_id
937998
in: path
938999
required: true
9391000
description: The id of the task to remove from the task group
9401001
schema:
9411002
type: integer
1003+
example: 1
9421004
responses:
9431005
'200':
9441006
description: Ok
@@ -987,9 +1049,12 @@ paths:
9871049
content:
9881050
application/json:
9891051
schema:
990-
type: array
991-
items:
992-
$ref: '#/components/schemas/TaskGroup'
1052+
type: object
1053+
properties:
1054+
task_Groups:
1055+
type: array
1056+
items:
1057+
$ref: '#/components/schemas/TaskGroup'
9931058
'400':
9941059
description: User Error
9951060
content:
@@ -1032,11 +1097,13 @@ paths:
10321097
properties:
10331098
task_id:
10341099
type: integer
1100+
example: 1
10351101
solution:
10361102
type: string
10371103
example: "L\xF6sung 1"
10381104
is_correct:
10391105
type: boolean
1106+
example: 1
10401107
responses:
10411108
200:
10421109
description: Ok
@@ -1047,10 +1114,11 @@ paths:
10471114
properties:
10481115
multiple_choice_solution_id:
10491116
type: integer
1050-
format: int64
10511117
minimum: 0
1118+
example: 1
10521119
correct:
10531120
type: boolean
1121+
example: true
10541122
solution:
10551123
type: string
10561124
example: "L\xF6sung 1 lol"
@@ -1093,6 +1161,7 @@ paths:
10931161
required: true
10941162
schema:
10951163
type: integer
1164+
example: 1
10961165
responses:
10971166
'200':
10981167
description: Ok
@@ -1108,8 +1177,10 @@ paths:
11081177
properties:
11091178
multiple_choice_solution_id:
11101179
type: integer
1180+
example: 1
11111181
solution:
11121182
type: string
1183+
example: "L\xF6sung 1 lol"
11131184
'400':
11141185
description: User Error
11151186
content:
@@ -1151,6 +1222,7 @@ paths:
11511222
required: true
11521223
schema:
11531224
type: integer
1225+
example: 1
11541226
responses:
11551227
'200':
11561228
description: Ok
@@ -1166,10 +1238,13 @@ paths:
11661238
properties:
11671239
multiple_choice_solution_id:
11681240
type: integer
1241+
example: 1
11691242
solution:
11701243
type: string
1244+
example: "L\xF6sung 1 lol"
11711245
correct:
11721246
type: boolean
1247+
example: true
11731248
/solution/multiple_choice/check:
11741249
post:
11751250
tags:
@@ -1205,8 +1280,10 @@ paths:
12051280
properties:
12061281
multiple_choice_solution_id:
12071282
type: integer
1283+
example: 1
12081284
correct:
12091285
type: boolean
1286+
example: true
12101287
responses:
12111288
'200':
12121289
description: Ok
@@ -2860,6 +2937,7 @@ paths:
28602937
required: true
28612938
schema:
28622939
type: integer
2940+
example: 1
28632941
responses:
28642942
'200':
28652943
description: Ok
@@ -3054,10 +3132,10 @@ paths:
30543132
properties:
30553133
name_key:
30563134
type: string
3057-
example: lecturename
3135+
example: squares
30583136
module_name_key:
30593137
type: string
3060-
example: squares
3138+
example: geometry
30613139
module_id:
30623140
type: integer
30633141
example: 1
@@ -3074,10 +3152,10 @@ paths:
30743152
example: 1
30753153
name_key:
30763154
type: string
3077-
example: lecturename
3155+
example: squares
30783156
module_name_key:
30793157
type: string
3080-
example: squares
3158+
example: geometry
30813159
module_id:
30823160
type: integer
30833161
example: 1
@@ -3165,6 +3243,7 @@ paths:
31653243
required: true
31663244
schema:
31673245
type: string
3246+
example: squares
31683247
responses:
31693248
'200':
31703249
description: Ok
@@ -3210,6 +3289,7 @@ paths:
32103289
required: true
32113290
schema:
32123291
type: string
3292+
example: squares
32133293
responses:
32143294
'200':
32153295
description: Ok
@@ -3341,6 +3421,7 @@ paths:
33413421
required: true
33423422
schema:
33433423
type: string
3424+
example: geometry
33443425
responses:
33453426
'200':
33463427
description: Ok
@@ -3392,6 +3473,7 @@ paths:
33923473
required: true
33933474
schema:
33943475
type: integer
3476+
example: 1
33953477
responses:
33963478
'200':
33973479
description: Ok
@@ -3547,6 +3629,7 @@ paths:
35473629
required: true
35483630
schema:
35493631
type: string
3632+
example: easy
35503633
responses:
35513634
'200':
35523635
description: Ok
@@ -3593,6 +3676,7 @@ paths:
35933676
required: true
35943677
schema:
35953678
type: string
3679+
example: easy
35963680
responses:
35973681
'200':
35983682
description: Ok
@@ -3636,6 +3720,7 @@ paths:
36363720
required: true
36373721
schema:
36383722
type: integer
3723+
example: 1
36393724
responses:
36403725
'200':
36413726
description: Ok
@@ -4180,8 +4265,10 @@ components:
41804265
example: 1
41814266
author_id:
41824267
type: string
4268+
example: 0b870676-1a01-47aa-8402-859fb9806238
41834269
difficulty_id:
41844270
type: integer
4271+
example: 1
41854272
Lecture:
41864273
type: object
41874274
properties:
@@ -4226,7 +4313,7 @@ components:
42264313
example: 1
42274314
name_key:
42284315
type: string
4229-
example: hard
4316+
example: easy
42304317
TaskType:
42314318
type: object
42324319
properties:

0 commit comments

Comments
 (0)