chore(openapi): define the endpoint, method and description on auth routes

> Common Responses
- 200
- 422
- 500
This commit is contained in:
Mert Şişmanoğlu committed 2024-08-12 21:39:10 +03:00
1 parent adbbdd405c
commit 1541fd20fc
1 file changed
+319 -1
+319 -1
View File
@@ -43,5 +43,323 @@
}
}
}
]
],
"tags": [
{
"name": "auth",
"description": "Authentication"
}
],
"paths": {
"/auth/register": {
"post": {
"tags": ["auth"],
"description": "Register a new user",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/login": {
"post": {
"tags": ["auth"],
"description": "Login with credentials",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/logout": {
"post": {
"tags": ["auth"],
"description": "Logout",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/user/:userId": {
"put": {
"tags": ["auth"],
"description": "Change user informations",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
},
"delete": {
"tags": ["auth"],
"description": "Delete user",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/users/admin": {
"get": {
"tags": ["auth"],
"description": "Checks to see if an admin account exists",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/users": {
"get": {
"tags": ["auth"],
"description": "Get all users",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/invite": {
"post": {
"tags": ["auth"],
"description": "Invite people to application",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/invite/verify": {
"post": {
"tags": ["auth"],
"description": "Verify the invite",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/recovery/request": {
"post": {
"tags": ["auth"],
"description": "Request a recovery token",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/recovery/validate": {
"post": {
"tags": ["auth"],
"description": "Validate recovery token",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
},
"/auth/recovery/reset": {
"post": {
"tags": ["auth"],
"description": "Password reset",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {}
}
},
"422": {
"description": "Unprocessable Content",
"content": {
"application/json": {}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {}
}
}
}
}
}
}
}