-
Notifications
You must be signed in to change notification settings - Fork 0
/
docs.yml
99 lines (95 loc) · 2.69 KB
/
docs.yml
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
openapi: 3.1.0
info:
version: 0.1.0
title: ClubWorks Alpha API
description: The API that powers the backend for ClubWorks! (Alpha)
servers:
- url: http://localhost:8080
description: Localhost on the default port
components:
responses:
UnauthorizedError:
description: auth header is missing or invalid
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Auth failed, invalid token
status: 401
securitySchemes:
FBIDAuth:
type: apiKey
in: header
name: auth
security:
- FBIDAuth: []
paths:
/alpha/signup/{name}/:
post:
summary: Sign up a new user
requestBody:
required: true
content:
application/json: # Assuming JSON request body
schema:
type: object
properties:
school_id:
type: string
description: The school ID of the user
grade:
type: integer
description: The grade of the user
example: 11
year:
type: integer
description: The year that the user graduates
example: 2026
responses:
'200':
description: User signed up successfully
content:
application/json:
schema:
type: object
properties:
creation_date:
type: string
description: user creation date in UNIX milliseconds
'500':
description: Internal server error
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Failed to read from database
'409':
description: User already exists
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: User already exists
'400':
description: Bad request (e.g., invalid name provided)
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Invalid request body
'403':
$ref: '#/components/responses/UnauthorizedError'
'401':
$ref: '#/components/responses/UnauthorizedError'