feat: adding documentation for user

This commit is contained in:
akhdanre 2025-03-21 01:20:32 +07:00
parent 71a3091df0
commit 599cd689f6
3 changed files with 56 additions and 0 deletions

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"yaml.schemas": {
"openapi:v3": "file:///mnt/disc1/code/thesis_quiz_project/quiz_maker/docs/rest_api_docs.yaml"
}
}

View File

@ -8,6 +8,7 @@ load_dotenv(override=True)
class Config:
FLASK_ENV = os.getenv("FLASK_ENV", "development")
DEBUG = os.getenv("DEBUG", "False").lower() in ("true", "1", "t")
API_VERSION = os.getenv("API_VERSION", "v1")
SECRET_KEY = os.getenv("SECRET_KEY", "your_secret_key")
MONGO_URI = os.getenv("MONGO_URI", "mongodb://localhost:27017/yourdb")

View File

@ -161,3 +161,53 @@ paths:
message:
type: string
example: "Email already registered"
/user:
get:
summary: Get User
description: Get user data
tags:
- User
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: "Oukenze"
email:
type: string
example: "oukenzeumasio"
put:
summary: Update User
description: Update user data
tags:
- User
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
example: ""
responses:
"200":
description: OK
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: "User updated successfully"