nquest/api/parts/user.yaml

57 lines
1.4 KiB
YAML

paths:
/user:
get:
responses:
200:
$ref: "#/components/responses/userResponse"
403:
$ref: "#/components/responses/errorResponse"
/user/login:
post:
security: []
requestBody:
content:
application/json:
schema:
type: object
properties:
email:
type: string
password:
type: string
required: [email, password]
responses:
200:
$ref: "#/components/responses/userResponse"
400:
$ref: "#/components/responses/errorResponse"
/user/register:
post:
security: []
requestBody:
content:
application/json:
schema:
type: object
properties:
username:
type: string
email:
type: string
password:
type: string
password2:
type: string
required: [username, email, password, password2]
responses:
200:
$ref: "#/components/responses/userResponse"
400:
$ref: "#/components/responses/errorResponse"
/user/logout:
post:
responses:
204:
description: "success logout"
400:
$ref: "#/components/responses/errorResponse"