From 8722c59318a0252c09fa44264d6a0fd5c391942a Mon Sep 17 00:00:00 2001 From: Abdul Rahman Reza Date: Wed, 27 Nov 2024 08:01:52 +0700 Subject: [PATCH] update swatter --- src/swagger/swagger.json | 939 --------------------------------------- 1 file changed, 939 deletions(-) delete mode 100644 src/swagger/swagger.json diff --git a/src/swagger/swagger.json b/src/swagger/swagger.json deleted file mode 100644 index eebdba7..0000000 --- a/src/swagger/swagger.json +++ /dev/null @@ -1,939 +0,0 @@ -{ - "openapi": "3.0.0", - "info": { - "title": "Service User", - "description": "Purpose of this service is to provide authorization, roles, user activity and etc", - "version": "1.0.0" - }, - "servers": [ - { - "url": "http://127.0.0.1:4001/", - "description": "Environtment Development" - } - ], - "paths": { - "/api/user/list": { - "get": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "filter", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "page", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "with_deleted", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "order_field", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "order_direction", - "in": "query", - "required": true, - "schema": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user/create": { - "post": { - "tags": [ - "User" - ], - "description": "", - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - }, - "/api/user/update/{id}": { - "put": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - }, - "/api/user/update_profile/{id}": { - "put": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user_profile" - } - } - } - } - } - }, - "/api/user/update_password/{id}": { - "put": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user_password" - } - } - } - } - } - }, - "/api/user/delete/{id}": { - "delete": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user/restore/{id}": { - "put": { - "tags": [ - "User" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_role/list": { - "get": { - "tags": [ - "User Roles" - ], - "description": "", - "parameters": [ - { - "name": "filter", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "page", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "with_deleted", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "order_field", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "order_direction", - "in": "query", - "required": true, - "enum": [ - "ASC", - "DESC" - ], - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_role/role": { - "get": { - "tags": [ - "User Roles" - ], - "description": "", - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_role/create": { - "post": { - "tags": [ - "User Roles" - ], - "description": "", - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user_role" - } - } - } - } - } - }, - "/api/user_role/update/{id}": { - "put": { - "tags": [ - "User Roles" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User role ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user_role" - } - } - } - } - } - }, - "/api/user_role/delete/{id}": { - "delete": { - "tags": [ - "User Roles" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User role ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_role/restore/{id}": { - "put": { - "tags": [ - "User Roles" - ], - "description": "", - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "User role ID." - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_activity": { - "get": { - "tags": [ - "User Activity" - ], - "description": "", - "parameters": [ - { - "name": "filter", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "page", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "with_deleted", - "in": "query", - "required": true, - "schema": { - "type": "boolean" - } - }, - { - "name": "order_field", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "order_direction", - "in": "query", - "required": true, - "enum": [ - "ASC", - "DESC" - ], - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/user_activity/create": { - "post": { - "tags": [ - "User Activity" - ], - "description": "", - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/user_activity" - } - } - } - } - } - }, - "/api/refresh_token/list": { - "get": { - "tags": [ - "User Refresh Token" - ], - "description": "", - "parameters": [ - { - "name": "filter", - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "page", - "in": "query", - "required": true, - "schema": { - "type": "number" - } - }, - { - "name": "order_field", - "in": "query", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "order_direction", - "in": "query", - "required": true, - "enum": [ - "ASC", - "DESC" - ], - "schema": { - "type": "string" - } - } - ], - "responses": { - "default": { - "description": "" - } - }, - "security": [ - { - "bearerAuth": [] - } - ] - } - }, - "/api/refresh_token/force_logout/{refresh_token}": { - "put": { - "tags": [ - "User Refresh Token" - ], - "description": "", - "parameters": [ - { - "name": "refresh_token", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "Refresh Token." - } - ], - "responses": { - "default": { - "description": "" - } - } - } - }, - "/api/login": { - "post": { - "tags": [ - "Auth" - ], - "description": "", - "responses": { - "default": { - "description": "" - } - }, - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/login" - } - } - } - } - } - }, - "/api/logout/{refresh_token}": { - "put": { - "tags": [ - "Auth" - ], - "description": "", - "parameters": [ - { - "name": "refresh_token", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "Refresh Token" - } - ], - "responses": { - "default": { - "description": "" - } - } - } - }, - "/api/renew_token/{refresh_token}": { - "put": { - "tags": [ - "Auth" - ], - "description": "", - "parameters": [ - { - "name": "refresh_token", - "in": "path", - "required": true, - "schema": { - "type": "string" - }, - "description": "Refresh Token" - } - ], - "responses": { - "default": { - "description": "" - } - } - } - } - }, - "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", - "scheme": "bearer" - } - } - } -} \ No newline at end of file