|
|
|
@ -48,6 +48,31 @@ paths:
|
|
|
|
|
$ref: '#/components/responses/InvalidToken'
|
|
|
|
|
500:
|
|
|
|
|
$ref: '#/components/responses/ServerError'
|
|
|
|
|
/auth/register:
|
|
|
|
|
post:
|
|
|
|
|
tags:
|
|
|
|
|
- Auth Endpoints
|
|
|
|
|
summary: Creates a new user account that can be used to participate with the website.
|
|
|
|
|
requestBody:
|
|
|
|
|
description: The information for the new user.
|
|
|
|
|
required: true
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
$ref: '#/components/schemas/RegisteredUser'
|
|
|
|
|
responses:
|
|
|
|
|
200:
|
|
|
|
|
description: Your account has successfully been created, and you can now log in.
|
|
|
|
|
content:
|
|
|
|
|
application/json:
|
|
|
|
|
schema:
|
|
|
|
|
type: object
|
|
|
|
|
400:
|
|
|
|
|
$ref: '#/components/responses/MalformedBody'
|
|
|
|
|
401:
|
|
|
|
|
$ref: '#/components/responses/InvalidToken'
|
|
|
|
|
500:
|
|
|
|
|
$ref: '#/components/responses/ServerError'
|
|
|
|
|
|
|
|
|
|
components:
|
|
|
|
|
requestBodies:
|
|
|
|
@ -117,6 +142,28 @@ components:
|
|
|
|
|
reason: The internal server reached an unknown state.
|
|
|
|
|
code: 500
|
|
|
|
|
schemas:
|
|
|
|
|
RegisteredUser:
|
|
|
|
|
type: object
|
|
|
|
|
required:
|
|
|
|
|
- username
|
|
|
|
|
- email
|
|
|
|
|
- password
|
|
|
|
|
properties:
|
|
|
|
|
username:
|
|
|
|
|
type: string
|
|
|
|
|
minLength: 3
|
|
|
|
|
maxLength: 16
|
|
|
|
|
pattern: "[a-zA-Z0-9 ]{3,16}"
|
|
|
|
|
description: A Unique uusername to identify a user around the website.
|
|
|
|
|
email:
|
|
|
|
|
type: string
|
|
|
|
|
format: email
|
|
|
|
|
description: A Unique email used for communication/further identification.
|
|
|
|
|
password:
|
|
|
|
|
type: string
|
|
|
|
|
format: password
|
|
|
|
|
minLength: 8
|
|
|
|
|
maxLength: 32
|
|
|
|
|
Token:
|
|
|
|
|
required:
|
|
|
|
|
- token
|
|
|
|
|