feat: adding documentation for user
This commit is contained in:
parent
71a3091df0
commit
599cd689f6
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"yaml.schemas": {
|
||||
"openapi:v3": "file:///mnt/disc1/code/thesis_quiz_project/quiz_maker/docs/rest_api_docs.yaml"
|
||||
}
|
||||
}
|
|
@ -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")
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue