diff --git a/package-lock.json b/package-lock.json index 82ef90ee4..b026aec09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -63,7 +63,6 @@ "shacl-engine": "^0.1.2", "sinon": "^17.0.1", "stream-concat": "^1.0.0", - "swagger-ui-express": "^5.0.0", "ts-node": "^10.9.1", "tsoa": "^5.1.1", "uint8arrays": "^4.0.6", @@ -80,7 +79,6 @@ "@types/mocha": "^10.0.4", "@types/node": "^20.10.5", "@types/node-cron": "^3.0.11", - "@types/swagger-ui-express": "^4.1.3", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", "chai": "^4.3.10", @@ -5787,15 +5785,6 @@ "version": "8.1.4", "license": "MIT" }, - "node_modules/@types/swagger-ui-express": { - "version": "4.1.5", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/express": "*", - "@types/serve-static": "*" - } - }, "node_modules/@types/triple-beam": { "version": "1.3.4", "license": "MIT" @@ -24543,23 +24532,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/swagger-ui-dist": { - "version": "5.9.1", - "license": "Apache-2.0" - }, - "node_modules/swagger-ui-express": { - "version": "5.0.0", - "license": "MIT", - "dependencies": { - "swagger-ui-dist": ">=5.0.0" - }, - "engines": { - "node": ">= v0.10.32" - }, - "peerDependencies": { - "express": ">=4.0.0 || >=5.0.0-beta" - } - }, "node_modules/symbol-observable": { "version": "1.2.0", "license": "MIT", diff --git a/package.json b/package.json index f23eeaf64..e9f69fc82 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,6 @@ "scripts": { "build": "npm run clean && npm run build:tsc && npm run build:dashboard", "build:no-dashboard": "npm run clean && npm run build:tsc", - "build:swagger": "tsoa spec", "build:tsc": "tsc --sourceMap", "build-tests:tsc": "tsc --sourceMap --sourceRoot ./src/test && cp ./src/test/.env.test ./dist/test", "build:dashboard": "cd dashboard && npm install && npx next build", @@ -88,7 +87,6 @@ "shacl-engine": "^0.1.2", "sinon": "^17.0.1", "stream-concat": "^1.0.0", - "swagger-ui-express": "^5.0.0", "ts-node": "^10.9.1", "tsoa": "^5.1.1", "uint8arrays": "^4.0.6", @@ -105,7 +103,6 @@ "@types/mocha": "^10.0.4", "@types/node": "^20.10.5", "@types/node-cron": "^3.0.11", - "@types/swagger-ui-express": "^4.1.3", "@typescript-eslint/eslint-plugin": "^6.8.0", "@typescript-eslint/parser": "^6.8.0", "chai": "^4.3.10", diff --git a/src/index.ts b/src/index.ts index a9bb8f508..f05a5a488 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,7 +4,6 @@ import { OceanIndexer } from './components/Indexer/index.js' import { Database } from './components/database/index.js' import express, { Express } from 'express' import { OceanNode } from './OceanNode.js' -import swaggerUi from 'swagger-ui-express' import { httpRoutes } from './components/httpRoutes/index.js' import { getConfiguration, computeCodebaseHash } from './utils/index.js' @@ -150,15 +149,7 @@ if (config.hasHttp) { req.oceanNode = oceanNode next() }) - app.use( - '/docs', - swaggerUi.serve, - swaggerUi.setup(undefined, { - swaggerOptions: { - url: '/swagger.json' - } - }) - ) + // Integrate static file serving middleware app.use('/', httpRoutes)