update swagger

This commit is contained in:
2024-11-27 08:00:18 +07:00
parent 9093999afd
commit e933adff81
4 changed files with 14 additions and 6 deletions

View File

@ -2,12 +2,13 @@
"app": { "app": {
"name": "Service User", "name": "Service User",
"description": "Purpose of this service is to provide authorization, roles, user activity and etc", "description": "Purpose of this service is to provide authorization, roles, user activity and etc",
"version": "1.0.0" "version": "1.0.0",
"env": "Development"
}, },
"server": { "server": {
"port": "4001", "port": "4001",
"host": "0.0.0.0", "host": "0.0.0.0",
"host_swagger": "127.0.0.1", "host_swagger": "http://127.0.0.1:4001/",
"max_body": "50mb", "max_body": "50mb",
"max_upload": 104857600, "max_upload": 104857600,
"morgan": "combined", "morgan": "combined",

View File

@ -2,12 +2,13 @@
"app": { "app": {
"name": "Service User", "name": "Service User",
"description": "Purpose of this service is to provide authorization, roles, user activity and etc", "description": "Purpose of this service is to provide authorization, roles, user activity and etc",
"version": "1.0.0" "version": "1.0.0",
"env": "Staging"
}, },
"server": { "server": {
"port": "4001", "port": "4001",
"host": "0.0.0.0", "host": "0.0.0.0",
"host_swagger": "bri-dev.shiblysolution.id:4001", "host_swagger": "https://bri-dev.shiblysolution.id:4001/",
"max_body": "50mb", "max_body": "50mb",
"max_upload": 104857600, "max_upload": 104857600,
"morgan": "combined", "morgan": "combined",

View File

@ -7,7 +7,12 @@ const doc = {
description: config.get('app.description'), description: config.get('app.description'),
version: config.get('app.version') version: config.get('app.version')
}, },
host: config.get('server.host_swagger') + ':' + config.get('server.port'), servers: [
{
url: config.get('server.host_swagger'),
description: 'Environtment ' + config.get('app.env')
},
],
components: { components: {
schemas: { schemas: {
login: { login: {

View File

@ -7,7 +7,8 @@
}, },
"servers": [ "servers": [
{ {
"url": "http://127.0.0.1:4001/" "url": "http://127.0.0.1:4001/",
"description": "Environtment Development"
} }
], ],
"paths": { "paths": {