feat(openapi): add request body to login and register routes
This commit is contained in:
1 parent
cc08d7f8d5
commit
21ce46a29e
1 file changed
+59
@@ -55,6 +55,45 @@
|
|||||||
"post": {
|
"post": {
|
||||||
"tags": ["auth"],
|
"tags": ["auth"],
|
||||||
"description": "Register a new user",
|
"description": "Register a new user",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["firstName", "lastName", "email", "password", "role", "teamId"],
|
||||||
|
"properties": {
|
||||||
|
"firstName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "email"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "password"
|
||||||
|
},
|
||||||
|
"profileImage": {
|
||||||
|
"type": "file",
|
||||||
|
"format": "file"
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"type": "array",
|
||||||
|
"enum": [["user"], ["admin"], ["superadmin"]],
|
||||||
|
"default": ["superadmin"]
|
||||||
|
},
|
||||||
|
"teamId": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uuid"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
@@ -93,6 +132,26 @@
|
|||||||
"post": {
|
"post": {
|
||||||
"tags": ["auth"],
|
"tags": ["auth"],
|
||||||
"description": "Login with credentials",
|
"description": "Login with credentials",
|
||||||
|
"requestBody": {
|
||||||
|
"content": {
|
||||||
|
"application/json": {
|
||||||
|
"schema": {
|
||||||
|
"type": "object",
|
||||||
|
"required": ["email", "password"],
|
||||||
|
"properties": {
|
||||||
|
"email": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "email"
|
||||||
|
},
|
||||||
|
"password": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "password"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"responses": {
|
"responses": {
|
||||||
"200": {
|
"200": {
|
||||||
"description": "OK",
|
"description": "OK",
|
||||||
|
|||||||
Reference in new issue
Block a user