-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathswagger.yaml
89 lines (89 loc) · 2.46 KB
/
swagger.yaml
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
swagger: "2.0"
info:
description: "The webserver API Documentation for GSSTrainingSystem."
version: "1.0.0"
title: "GSSTrainingSystem Swagger"
tags:
- name: "Courses"
description: "Everything Course related"
- name: "Admin"
description: "Future Endpoints for administrator use"
- name: "Public"
description: "Endpoints for public use"
schemes:
- "http"
paths:
/public/{fileName}:
get:
tags:
- "Public"
summary: "Static file server"
description: "Serves periphreal files for page use"
parameters:
- name: "fileName"
in: "path"
description: "The name of the file to return"
required: true
type: "string"
responses:
200:
description: "File returned"
404:
description: "Not found"
/course/{courseName}:
get:
tags:
- "Courses"
summary: "Get a Course"
description: "Returns the first activity in a course"
operationId: "getPetById"
produces:
- "text/html"
parameters:
- name: "courseName"
in: "path"
description: "Name of Course to return"
required: true
type: "string"
- name: "activityNumber"
in: "query"
description: "Activity Number within the course to return"
required: false
type: "string"
responses:
200:
description: "Page Returned"
400:
description: "Invalid ActivityNumber supplied"
404:
description: "Course/Activity not found"
500:
description: "Internal Server Error"
post:
tags:
- "Courses"
summary: "Validate activity answers, and get next activity"
description: "Checks the posted data against the activity requirements, if valid, redirects to the next activity."
consumes:
- "application/json"
parameters:
- name: "courseName"
in: "path"
description: "ID of pet that needs to be updated"
required: true
type: "integer"
format: "int64"
- name: "activityNumber"
in: "query"
description: "Activity Number within the course to validate against"
required: false
type: "string"
responses:
302:
description: "Redirected to next activity"
400:
description: "Invalid data provided"
404:
description: "Course/Activity not found"
500:
description: "Internal Server Error"