update swagger done
This commit is contained in:
@ -9,6 +9,47 @@ const doc = {
|
||||
},
|
||||
host: config.get('server.host_swagger') + ':' + config.get('server.port'),
|
||||
components: {
|
||||
schemas: {
|
||||
login: {
|
||||
$username: "admin",
|
||||
$password: "123456"
|
||||
},
|
||||
user: {
|
||||
$email: "admin@gmail.com",
|
||||
$username: "admin",
|
||||
$password: "123456",
|
||||
$retype_password: "123456",
|
||||
$name: "Administrator",
|
||||
$id_role: "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8",
|
||||
$status: "Y"
|
||||
},
|
||||
user_profile: {
|
||||
$email: "admin@gmail.com",
|
||||
$username: "admin",
|
||||
$name: "Administrator"
|
||||
},
|
||||
user_password: {
|
||||
$password: "123456",
|
||||
$retype_password: "123456"
|
||||
},
|
||||
user_role: {
|
||||
$name: "Administrator",
|
||||
$roles: ["dashboard"],
|
||||
$status: "Y"
|
||||
},
|
||||
user_activity: {
|
||||
$id_user: "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8",
|
||||
$refresh_token: "1a1221b6-78a0-4b3b-bf5c-fa0af5f69be8",
|
||||
$module: "dashboard",
|
||||
$description: "Main Dashboard",
|
||||
$action: "V",
|
||||
$url: "https://bri-dev.shiblysolution.id/",
|
||||
$data_body: "{\"from\":\"2024-11-01\",\"to\":\"2024-11-26\"}"
|
||||
}
|
||||
},
|
||||
parameters: {
|
||||
|
||||
},
|
||||
securitySchemes: {
|
||||
bearerAuth: {
|
||||
type: 'http',
|
||||
|
||||
@ -61,12 +61,12 @@
|
||||
"name": "order_direction",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"enum": [
|
||||
"ASC",
|
||||
"DESC"
|
||||
],
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"ASC",
|
||||
"DESC"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -88,47 +88,6 @@
|
||||
"User"
|
||||
],
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"description": "User data",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "admin@gmail.com"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "admin"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
},
|
||||
"retype_password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Administrator"
|
||||
},
|
||||
"id_role": {
|
||||
"type": "string",
|
||||
"example": "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": ""
|
||||
@ -138,7 +97,17 @@
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/user"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/user/update/{id}": {
|
||||
@ -169,15 +138,11 @@
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"example": "any"
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/user"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -212,15 +177,11 @@
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"example": "any"
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/user_profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -255,15 +216,11 @@
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"example": "any"
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/user_password"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -391,7 +348,30 @@
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/user_role/role": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"User Roles"
|
||||
],
|
||||
"description": "",
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/user_role/create": {
|
||||
@ -400,40 +380,25 @@
|
||||
"User Roles"
|
||||
],
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"description": "User role data",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Administrator"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"example": [
|
||||
"dashboard"
|
||||
],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "Y"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/user_role"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -459,16 +424,17 @@
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"example": "any"
|
||||
}
|
||||
}
|
||||
"$ref": "#/components/schemas/user_role"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -496,7 +462,12 @@
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/user_role/restore/{id}": {
|
||||
@ -520,7 +491,12 @@
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/user_activity": {
|
||||
@ -586,7 +562,12 @@
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/user_activity/create": {
|
||||
@ -595,51 +576,25 @@
|
||||
"User Activity"
|
||||
],
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"description": "User Activity data",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id_user": {
|
||||
"type": "string",
|
||||
"example": "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"refresh_token": {
|
||||
"type": "string",
|
||||
"example": "1a1221b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"example": "dashboard"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"example": "Main Dashboard"
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"example": "V"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"example": "https://bri-dev.shiblysolution.id/"
|
||||
},
|
||||
"data_body": {
|
||||
"type": "string",
|
||||
"example": "{'from':'2024-11-01','to':'2024-11-26'}"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/user_activity"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -698,7 +653,12 @@
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"bearerAuth": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/refresh_token/force_logout/{refresh_token}": {
|
||||
@ -731,31 +691,20 @@
|
||||
"Auth"
|
||||
],
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"description": "Login data",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "admin"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"default": {
|
||||
"description": ""
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/login"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -809,6 +758,176 @@
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"login": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "admin"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"username",
|
||||
"password"
|
||||
]
|
||||
},
|
||||
"user": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "admin@gmail.com"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "admin"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
},
|
||||
"retype_password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Administrator"
|
||||
},
|
||||
"id_role": {
|
||||
"type": "string",
|
||||
"example": "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "Y"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"email",
|
||||
"username",
|
||||
"password",
|
||||
"retype_password",
|
||||
"name",
|
||||
"id_role",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"user_profile": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string",
|
||||
"example": "admin@gmail.com"
|
||||
},
|
||||
"username": {
|
||||
"type": "string",
|
||||
"example": "admin"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Administrator"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"email",
|
||||
"username",
|
||||
"name"
|
||||
]
|
||||
},
|
||||
"user_password": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
},
|
||||
"retype_password": {
|
||||
"type": "string",
|
||||
"example": "123456"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"password",
|
||||
"retype_password"
|
||||
]
|
||||
},
|
||||
"user_role": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "Administrator"
|
||||
},
|
||||
"roles": {
|
||||
"type": "array",
|
||||
"example": [
|
||||
"dashboard"
|
||||
],
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "Y"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"name",
|
||||
"roles",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"user_activity": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id_user": {
|
||||
"type": "string",
|
||||
"example": "4a6991b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"refresh_token": {
|
||||
"type": "string",
|
||||
"example": "1a1221b6-78a0-4b3b-bf5c-fa0af5f69be8"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"example": "dashboard"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"example": "Main Dashboard"
|
||||
},
|
||||
"action": {
|
||||
"type": "string",
|
||||
"example": "V"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"example": "https://bri-dev.shiblysolution.id/"
|
||||
},
|
||||
"data_body": {
|
||||
"type": "string",
|
||||
"example": "{\"from\":\"2024-11-01\",\"to\":\"2024-11-26\"}"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id_user",
|
||||
"refresh_token",
|
||||
"module",
|
||||
"description",
|
||||
"action",
|
||||
"url",
|
||||
"data_body"
|
||||
]
|
||||
}
|
||||
},
|
||||
"parameters": {},
|
||||
"securitySchemes": {
|
||||
"bearerAuth": {
|
||||
"type": "http",
|
||||
|
||||
Reference in New Issue
Block a user