From 602da5d8ad192dc74bb7b1ec96e03d00e3c3cb81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lud=C4=9Bk=20Nov=C3=BD?= <13610612+ludeknovy@users.noreply.github.com> Date: Tue, 27 Feb 2024 10:46:14 +0100 Subject: [PATCH 1/2] Delete openapi.json file This commit removes the openapi.json file which contains the project's API definitions. This suggests a change in how documentations or configurations of the API will be handled, possibly taking a different approach or discarding them altogether. --- openapi.json | 1229 --------------------------------------------- package-lock.json | 20 - package.json | 1 - src/app.ts | 5 - 4 files changed, 1255 deletions(-) delete mode 100644 openapi.json diff --git a/openapi.json b/openapi.json deleted file mode 100644 index 4d5b416a..00000000 --- a/openapi.json +++ /dev/null @@ -1,1229 +0,0 @@ -{ - "openapi" : "3.0.0", - "info" : { - "title" : "Jtl Reporter Api", - "description" : "Jtl Reporter Api", - "version" : "1.0.0" - }, - "servers" : [ { - } ], - "tags" : [ { - "name" : "projects" - }, { - "name" : "scenarios" - }, { - "name" : "items" - } ], - "paths" : { - "/projects" : { - "get" : { - "tags" : [ "projects" ], - "summary" : "returns list of projects", - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProjectItem" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "projects" ], - "summary" : "create new project", - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NewProject" - } - } - } - }, - "responses" : { - "201" : { - "description" : "Created" - }, - "400" : { - "description" : "Bad request" - } - } - } - }, - "/projects/latest-items" : { - "get" : { - "tags" : [ "projects" ], - "summary" : "get latest project items", - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ProjectLatestItems" - } - } - } - } - }, - "400" : { - "description" : "bad request" - } - } - } - }, - "/projects/overall-stats" : { - "get" : { - "tags" : [ "projects" ], - "summary" : "returns overall projects summary", - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ProjectOverallStats" - } - } - } - } - } - } - }, - "/projects/{projectName}" : { - "put" : { - "tags" : [ "projects" ], - "summary" : "updates project name", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NewProject" - } - } - } - }, - "responses" : { - "204" : { - "description" : "No content" - } - } - }, - "delete" : { - "tags" : [ "projects" ], - "summary" : "deletes project", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "No content" - } - } - } - }, - "/projects/{projectName}/scenarios" : { - "get" : { - "tags" : [ "scenarios" ], - "summary" : "returns list of scenarios", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScenarioItem" - } - } - } - } - } - } - }, - "post" : { - "tags" : [ "scenarios" ], - "summary" : "creates new scenario", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NewScenario" - } - } - } - }, - "responses" : { - "201" : { - "description" : "Created" - }, - "400" : { - "description" : "Bad request" - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}" : { - "put" : { - "tags" : [ "scenarios" ], - "summary" : "updates scenario name", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/NewScenario" - } - } - } - }, - "responses" : { - "204" : { - "description" : "No content" - }, - "400" : { - "description" : "Ok" - } - } - }, - "delete" : { - "tags" : [ "scenarios" ], - "summary" : "deletes scenario", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "No content" - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}/trends" : { - "get" : { - "tags" : [ "scenarios" ], - "summary" : "returns scenario trends", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScenarioDetail" - } - } - } - } - }, - "404" : { - "description" : "Not found" - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}/items" : { - "get" : { - "tags" : [ "items" ], - "summary" : "returns list of items", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "offset", - "in" : "query", - "description" : "The number of items to skip before starting to collect the result set", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "number" - } - }, { - "name" : "limit", - "in" : "query", - "description" : "The numbers of items to return", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "number" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Items" - } - } - } - }, - "404" : { - "description" : "Not found" - } - } - }, - "post" : { - "tags" : [ "items" ], - "summary" : "create new item", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "multipart/form-data" : { - "schema" : { - "$ref" : "#/components/schemas/NewItem" - } - } - } - }, - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ItemSave" - } - } - } - }, - "400" : { - "description" : "Bad request" - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}/items/{itemId}" : { - "get" : { - "tags" : [ "items" ], - "summary" : "returns item detail", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "itemId", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/Item" - } - } - } - } - } - }, - "put" : { - "tags" : [ "items" ], - "summary" : "updates item", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "itemId", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "requestBody" : { - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/ItemUpdate" - } - } - } - }, - "responses" : { - "204" : { - "description" : "No content" - }, - "400" : { - "description" : "Bad request" - } - } - }, - "delete" : { - "tags" : [ "items" ], - "summary" : "deletes item", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "itemId", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "204" : { - "description" : "No content" - }, - "404" : { - "description" : "Not found" - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}/items/{itemId}/label/{label}/trend" : { - "get" : { - "tags" : [ "label" ], - "summary" : "returns label trends", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "itemId", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "label", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "environment", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string" - } - }, { - "name" : "virtualUsers", - "in" : "query", - "required" : false, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LabelTrend" - } - } - } - } - } - } - }, - "/projects/{projectName}/scenarios/{scenarioName}/items/{itemId}/label/{label}/virtual-users" : { - "get" : { - "tags" : [ "label" ], - "summary" : "returns label trends", - "parameters" : [ { - "name" : "projectName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "scenarioName", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "itemId", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "label", - "in" : "path", - "required" : true, - "style" : "simple", - "explode" : false, - "schema" : { - "type" : "string" - } - }, { - "name" : "environment", - "in" : "query", - "required" : true, - "style" : "form", - "explode" : true, - "schema" : { - "type" : "string" - } - } ], - "responses" : { - "200" : { - "description" : "Ok", - "content" : { - "application/json" : { - "schema" : { - "$ref" : "#/components/schemas/LabelVirtualUsers" - } - } - } - } - } - } - } - }, - "components" : { - "schemas" : { - "ProjectItem" : { - "required" : [ "id", "itemCount", "projectName", "scenarioCount" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "format" : "uuid", - "example" : "d290f1ee-6c54-4b01-90e6-d701748f0851" - }, - "projectName" : { - "type" : "string", - "example" : "My Project" - }, - "itemCount" : { - "type" : "number", - "example" : 10 - }, - "scenariocount" : { - "type" : "number", - "example" : 3 - }, - "latestRun" : { - "type" : "string", - "format" : "date-time" - } - } - }, - "NewProject" : { - "required" : [ "projectName" ], - "type" : "object", - "properties" : { - "projectName" : { - "maxLength" : 50, - "minLength" : 3, - "type" : "string", - "example" : "My Project" - } - } - }, - "ProjectLatestItems" : { - "required" : [ "id", "projectName" ], - "properties" : { - "id" : { - "type" : "string", - "format" : "uuid", - "example" : "d290f1ee-6c54-4b01-90e6-d701748f0851" - }, - "name" : { - "type" : "string" - }, - "environment" : { - "type" : "string" - }, - "projectName" : { - "type" : "string" - }, - "startTime" : { - "type" : "string", - "format" : "date" - }, - "status" : { - "type" : "string", - "example" : "passed" - } - } - }, - "ProjectOverallStats" : { - "required" : [ "avgDuration", "avgVu", "totalDuration", "totalRunCount" ], - "properties" : { - "avgVu" : { - "type" : "number" - }, - "avgDuration" : { - "type" : "number" - }, - "totalDuration" : { - "type" : "number" - }, - "totalRunCount" : { - "type" : "number" - } - } - }, - "NewScenario" : { - "required" : [ "scenarioName" ], - "type" : "object", - "properties" : { - "scenarioName" : { - "maxLength" : 50, - "minLength" : 1, - "type" : "string", - "example" : "new scenario" - } - } - }, - "ScenarioItem" : { - "required" : [ "data", "id", "name" ], - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "my scenario" - }, - "id" : { - "type" : "string", - "format" : "uuid" - }, - "data" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ScenarioData" - } - } - } - }, - "ScenarioData" : { - "required" : [ "avgLatency", "avgResponseTime", "duration", "endDate", "errorRate", "maxVu", "percentil", "startDate", "throughput" ], - "type" : "object", - "properties" : { - "avgLatency" : { - "type" : "number", - "example" : 32 - }, - "avgResponseTime" : { - "type" : "number", - "example" : 86 - }, - "duration" : { - "type" : "number", - "format" : "float", - "example" : 1.4 - }, - "errorRate" : { - "type" : "number", - "example" : 1 - }, - "maxVu" : { - "type" : "number", - "example" : 50 - }, - "percentil" : { - "type" : "number", - "example" : 39 - }, - "throughput" : { - "type" : "number", - "format" : "float", - "example" : 1.6 - }, - "startDate" : { - "type" : "string", - "format" : "date" - }, - "endDate" : { - "type" : "string", - "format" : "date" - } - } - }, - "ScenarioDetail" : { - "required" : [ "id", "overview" ], - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "format" : "uuid" - }, - "overview" : { - "$ref" : "#/components/schemas/ScenarioData" - } - } - }, - "Items" : { - "required" : [ "data", "name", "total" ], - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "scenario name" - }, - "total" : { - "type" : "number", - "example" : 20 - }, - "data" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/ItemsData" - } - } - } - }, - "ItemsData" : { - "required" : [ "base", "duration", "id", "maxVu", "startTime", "status", "uploadTime" ], - "type" : "object", - "properties" : { - "base" : { - "type" : "boolean" - }, - "duration" : { - "type" : "number", - "format" : "float", - "example" : 10.1 - }, - "environment" : { - "type" : "string", - "example" : "prod" - }, - "id" : { - "type" : "string", - "format" : "uuid" - }, - "maxVu" : { - "type" : "number", - "example" : 30 - }, - "note" : { - "type" : "string", - "example" : "test note" - }, - "hostname" : { - "type" : "string", - "example" : "localhost" - }, - "startTime" : { - "type" : "string", - "format" : "date-time" - }, - "status" : { - "type" : "string", - "example" : "1" - }, - "uploadTime" : { - "type" : "string", - "format" : "date-time" - } - } - }, - "NewItem" : { - "type" : "object", - "properties" : { - "environment" : { - "type" : "string", - "example" : "test" - }, - "hostname" : { - "type" : "string", - "example" : "localhost" - }, - "note" : { - "type" : "string", - "example" : "test note" - }, - "status" : { - "type" : "string", - "example" : "1", - "enum" : [ "10", "0", "1", "2", "3" ] - }, - "kpi" : { - "format" : "binary" - }, - "errors" : { - "format" : "binary" - } - } - }, - "ItemSave" : { - "type" : "object", - "properties" : { - "id" : { - "type" : "string", - "format" : "uuid" - }, - "overview" : { - "$ref" : "#/components/schemas/ScenarioData" - }, - "status" : { - "type" : "string", - "example" : "1", - "enum" : [ "10", "0", "1", "2", "3" ] - } - } - }, - "Item" : { - "type" : "object", - "properties" : { - "isBase" : { - "type" : "boolean" - }, - "baseId" : { - "type" : "string", - "format" : "uuid" - }, - "environment" : { - "type" : "string", - "example" : "test" - }, - "hostname" : { - "type" : "string", - "example" : "localhost" - }, - "note" : { - "type" : "string", - "example" : "test note" - }, - "overview" : { - "$ref" : "#/components/schemas/ScenarioData" - }, - "status" : { - "type" : "string", - "example" : "1", - "enum" : [ "10", "0", "1", "2", "3" ] - }, - "statistics" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/Statistics" - } - }, - "plot" : { - "$ref" : "#/components/schemas/Item_plot" - } - } - }, - "Statistics" : { - "type" : "object", - "properties" : { - "avgResponseTime" : { - "type" : "number", - "example" : 30 - }, - "errorRate" : { - "type" : "number", - "format" : "float", - "example" : 4.3 - }, - "label" : { - "type" : "string", - "example" : "label name" - }, - "maxResponseTime" : { - "type" : "number", - "example" : 432 - }, - "minResponseTime" : { - "type" : "number", - "example" : 32 - }, - "n0" : { - "type" : "number", - "example" : 12 - }, - "n5" : { - "type" : "number", - "example" : 21 - }, - "n9" : { - "type" : "number", - "example" : 23 - }, - "samples" : { - "type" : "number", - "example" : 642 - }, - "throughput" : { - "type" : "number", - "format" : "float", - "example" : 4.2 - } - } - }, - "PlotItem" : { - "type" : "object", - "properties" : { - "name" : { - "type" : "string", - "example" : "name" - }, - "data" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - } - }, - "ItemUpdate" : { - "required" : [ "base", "environment" ], - "type" : "object", - "properties" : { - "environment" : { - "maxLength" : 50, - "minLength" : 1, - "type" : "string", - "example" : "test" - }, - "note" : { - "maxLength" : 250, - "type" : "string", - "example" : "test note" - }, - "base" : { - "type" : "boolean" - } - } - }, - "LabelTrend" : { - "required" : [ "erroRate", "n0", "n5", "n9", "threads", "throughput", "timePoints" ], - "type" : "object", - "properties" : { - "timePoints" : { - "type" : "array", - "items" : { - "type" : "string", - "example" : "15.09.2019 19:52:69" - } - }, - "errorRate" : { - "type" : "array", - "items" : { - "type" : "number", - "format" : "float" - } - }, - "throughput" : { - "type" : "array", - "items" : { - "type" : "number", - "format" : "float" - } - }, - "threads" : { - "type" : "array", - "items" : { - "type" : "number" - } - }, - "n0" : { - "type" : "array", - "items" : { - "type" : "number" - } - }, - "n5" : { - "type" : "array", - "items" : { - "type" : "number" - } - }, - "n9" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - } - }, - "LabelVirtualUsers" : { - "type" : "object", - "properties" : { - "result" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/LabelVirtualUsers_result" - } - } - } - }, - "Item_plot" : { - "type" : "object", - "properties" : { - "overallFailRate" : { - "$ref" : "#/components/schemas/PlotItem" - }, - "overallThroughput" : { - "$ref" : "#/components/schemas/PlotItem" - }, - "overallTimeResponse" : { - "$ref" : "#/components/schemas/PlotItem" - }, - "responseTime" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PlotItem" - } - }, - "threads" : { - "type" : "array", - "items" : { - "type" : "array", - "items" : { - "type" : "number" - } - } - }, - "throughput" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/PlotItem" - } - } - } - }, - "LabelVirtualUsers_result" : { - "type" : "object", - "properties" : { - "maxVu" : { - "type" : "number", - "example" : 50 - }, - "count" : { - "type" : "string", - "example" : "10" - } - } - } - } - } -} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 7d461a9f..29d448d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,6 @@ "node-pg-migrate": "^6.2.2", "pg": "^8.11.3", "pg-promise": "^10.15.4", - "swagger-ui-express": "^4.6.3", "uuid": "^9.0.1", "winston": "^3.11.0", "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz" @@ -10392,25 +10391,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/swagger-ui-dist": { - "version": "4.14.3", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.14.3.tgz", - "integrity": "sha512-Y7Sta24I9r+G6dX3ZTIq9Psr55cDC3myCB0E00ZnVkB0Wn3cO77NdLXSM0f90WZh9VpgTetKpMPR3n2VqKr+lQ==" - }, - "node_modules/swagger-ui-express": { - "version": "4.6.3", - "resolved": "https://registry.npmjs.org/swagger-ui-express/-/swagger-ui-express-4.6.3.tgz", - "integrity": "sha512-CDje4PndhTD2HkgyKH3pab+LKspDeB/NhPN2OF1j+piYIamQqBYwAXWESOT1Yju2xFg51bRW9sUng2WxDjzArw==", - "dependencies": { - "swagger-ui-dist": ">=4.11.0" - }, - "engines": { - "node": ">= v0.10.32" - }, - "peerDependencies": { - "express": ">=4.0.0 || >=5.0.0-beta" - } - }, "node_modules/tar": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", diff --git a/package.json b/package.json index ee8ec26c..8b21569d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,6 @@ "node-pg-migrate": "^6.2.2", "pg": "^8.11.3", "pg-promise": "^10.15.4", - "swagger-ui-express": "^4.6.3", "uuid": "^9.0.1", "winston": "^3.11.0", "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz" diff --git a/src/app.ts b/src/app.ts index 60663d67..345e329d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -7,7 +7,6 @@ import * as compression from "compression" import * as expressWinston from "express-winston" import { logger } from "./logger" import { Router } from "./server/router" -import * as swaggerUi from "swagger-ui-express" import * as http from "http" import { v4 as uuidv4 } from "uuid" import { config } from "./server/config" @@ -16,8 +15,6 @@ import { NextFunction, Request, Response } from "express" import { PgError } from "./server/errors/pgError" import { bree } from "./server/utils/scheduled-tasks/scheduler" import helmet from "helmet" -// eslint-disable-next-line @typescript-eslint/no-var-requires -const swaggerDocument = require("../openapi.json") const DEFAULT_PORT = 5000 const PORT = process.env.PORT || DEFAULT_PORT @@ -49,8 +46,6 @@ export class App { })) this.app.use(helmet()) - this.app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument)) - this.app.use((req, res, next) => { res.header("Access-Control-Allow-Origin", "*") res.header("Access-Control-Allow-Methods", "*") From f9543a7618c43f6ffcb58715d553824096f9933e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lud=C4=9Bk=20Nov=C3=BD?= <13610612+ludeknovy@users.noreply.github.com> Date: Fri, 1 Mar 2024 08:45:08 +0100 Subject: [PATCH 2/2] docker image fix --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7df1a3ed..3822f2ed 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ COPY package.json package-lock.json ./ RUN npm install -COPY tsconfig.json custom-typings.d.ts openapi.json ./ +COPY tsconfig.json custom-typings.d.ts ./ COPY /migrations ./migrations