274 lines
9.6 KiB
JSON
274 lines
9.6 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "Legalization API",
|
|
"version": "1.0.1"
|
|
},
|
|
"paths": {
|
|
"/api/login": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Login user",
|
|
"operationId": "a3b306d14572d1f4bd6c064b3233e7b8",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"example": {
|
|
"email": "ilmedovamahri@gmail.com",
|
|
"password": 12345678
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/register": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Register user",
|
|
"operationId": "8a56853624e025573120a09a4c75d468",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"firstname": {
|
|
"type": "string"
|
|
},
|
|
"lastname": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"example": {
|
|
"firstname": "Mahri",
|
|
"lastname": "Ilmedova",
|
|
"email": "ilmedovamahri@gmail.com",
|
|
"password": 12345678
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/client": {
|
|
"get": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Get user",
|
|
"operationId": "9f1c53ceee113e04ff7709c819ce9bf5",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/logout": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Logout user",
|
|
"operationId": "fe8f3429cd6979b3b4517e186505f9f9",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
},
|
|
"401": {
|
|
"description": "Unauthorized"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/api/forgot-password": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Send a user password reset link",
|
|
"operationId": "45bf57623119762aa1c685aff5d3716e",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"example": {
|
|
"email": "ilmedovamahri@gmail.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/reset-password": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Reset client password and enter new",
|
|
"operationId": "4196e530fdb10fa91f253ae2ef237046",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"token": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"confirm_password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"example": {
|
|
"email": "ilmedovamahri@gmail.com",
|
|
"token": "2546",
|
|
"password": "Hello001!",
|
|
"confirm_password": "Hello001!"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/update-account": {
|
|
"post": {
|
|
"tags": [
|
|
"Authorization"
|
|
],
|
|
"summary": " - Update client account",
|
|
"operationId": "0d22fd27cb66727b01ded3c5a4ac7b48",
|
|
"requestBody": {
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"properties": {
|
|
"firstname": {
|
|
"type": "string"
|
|
},
|
|
"lastname": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"confirm_password": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object",
|
|
"example": {
|
|
"firstname": "Mahri",
|
|
"lastname": "Ilmedova",
|
|
"email": "ilmedovamahri@gmail.com",
|
|
"password": "Hello001!",
|
|
"confirm_password": "Hello001!"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK"
|
|
}
|
|
},
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearerAuth": {
|
|
"type": "http",
|
|
"name": "bearerAuth",
|
|
"in": "header",
|
|
"bearerFormat": "JWT",
|
|
"scheme": "bearer"
|
|
}
|
|
}
|
|
}
|
|
} |