forked from UT-Projects/clicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.json
104 lines (104 loc) · 2.72 KB
/
swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
{
"swagger" : "2.0",
"info" : {
"description" : "This API controls all backend functions for a web-based clicker program\n",
"version" : "1.0.0",
"title" : "Clicker"
},
"host" : "virtserver.swaggerhub.com",
"basePath" : "/anshulmodh/clicker/1.0.0",
"schemes" : [ "https" ],
"paths" : {
"/createClass" : {
"post" : {
"summary" : "Create a new class and return a unique class code",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ ],
"responses" : {
"201" : {
"description" : "Success, class created"
}
}
}
},
"/poll" : {
"post" : {
"summary" : "Change the status of the poll",
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"name" : "pollStatus",
"in" : "body",
"required" : true,
"type" : "boolean"
} ],
"responses" : {
"200" : {
"description" : "successful operation"
}
}
}
},
"/report" : {
"get" : {
"summary" : "Get report of student answers",
"produces" : [ "application/json" ],
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "successful operation"
}
}
}
},
"/visualize" : {
"get" : {
"summary" : "return graph data of student answers",
"produces" : [ "application/json" ],
"parameters" : [ ],
"responses" : {
"200" : {
"description" : "successful operation"
}
}
}
},
"/answer" : {
"post" : {
"summary" : "post answer to host question",
"parameters" : [ {
"in" : "body",
"name" : "answerPayload",
"description" : "The user to create.",
"required" : false,
"schema" : {
"$ref" : "#/definitions/answerPayload"
}
} ],
"responses" : {
"201" : {
"description" : "successful operation"
}
}
}
}
},
"definitions" : {
"answerPayload" : {
"type" : "object",
"required" : [ "answer", "classCode", "username" ],
"properties" : {
"classCode" : {
"type" : "string"
},
"username" : {
"type" : "string"
},
"answer" : {
"type" : "string"
}
}
}
}
}