fix(security): remove obsolete Swagger documentation endpoint

This commit is contained in:
2026-11-04 09:17:23 +00:00
parent b170f65210
commit 16a206ae0f
3 changed files with 14 additions and 210 deletions
+14 -196
View File
@@ -42,7 +42,6 @@
"next-build-id": "^3.0.0",
"next-connect": "^0.12.2",
"next-redux-wrapper": "^7.0.5",
"next-swagger-doc": "^0.4.0",
"next-translate": "^2.6.2",
"next-translate-plugin": "^2.6.2",
"nodemailer": "7.0.13",
@@ -86,42 +85,6 @@
"prisma": "^5.0.0"
}
},
"node_modules/@apidevtools/json-schema-ref-parser": {
"version": "9.1.2",
"license": "MIT",
"dependencies": {
"@jsdevtools/ono": "^7.1.3",
"@types/json-schema": "^7.0.6",
"call-me-maybe": "^1.0.1",
"js-yaml": "^4.1.0"
}
},
"node_modules/@apidevtools/openapi-schemas": {
"version": "2.1.0",
"license": "MIT",
"engines": {
"node": ">=10"
}
},
"node_modules/@apidevtools/swagger-methods": {
"version": "3.0.2",
"license": "MIT"
},
"node_modules/@apidevtools/swagger-parser": {
"version": "10.0.3",
"license": "MIT",
"dependencies": {
"@apidevtools/json-schema-ref-parser": "^9.0.6",
"@apidevtools/openapi-schemas": "^2.0.4",
"@apidevtools/swagger-methods": "^3.0.2",
"@jsdevtools/ono": "^7.1.3",
"call-me-maybe": "^1.0.1",
"z-schema": "^5.0.1"
},
"peerDependencies": {
"openapi-types": ">=7"
}
},
"node_modules/@azure/abort-controller": {
"version": "2.1.2",
"license": "MIT",
@@ -1172,10 +1135,6 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
"node_modules/@jsdevtools/ono": {
"version": "7.1.3",
"license": "MIT"
},
"node_modules/@jsep-plugin/assignment": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.3.0.tgz",
@@ -1996,10 +1955,6 @@
"redux": "^4.0.0"
}
},
"node_modules/@types/swagger-jsdoc": {
"version": "6.0.1",
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.32.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.32.0.tgz",
@@ -2772,6 +2727,7 @@
},
"node_modules/argparse": {
"version": "2.0.1",
"dev": true,
"license": "Python-2.0"
},
"node_modules/aria-query": {
@@ -3061,6 +3017,7 @@
},
"node_modules/balanced-match": {
"version": "1.0.2",
"dev": true,
"license": "MIT"
},
"node_modules/base64-js": {
@@ -3348,10 +3305,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/call-me-maybe": {
"version": "1.0.2",
"license": "MIT"
},
"node_modules/callsites": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
@@ -3429,17 +3382,6 @@
"version": "2.5.1",
"license": "MIT"
},
"node_modules/cleye": {
"version": "1.3.2",
"license": "MIT",
"dependencies": {
"terminal-columns": "^1.4.1",
"type-flag": "^3.0.0"
},
"funding": {
"url": "https://github.com/privatenumber/cleye?sponsor=1"
}
},
"node_modules/client-only": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
@@ -3488,13 +3430,6 @@
"node": ">= 0.8"
}
},
"node_modules/commander": {
"version": "6.2.0",
"license": "MIT",
"engines": {
"node": ">= 6"
}
},
"node_modules/comment-parser": {
"version": "1.4.1",
"dev": true,
@@ -3505,6 +3440,7 @@
},
"node_modules/concat-map": {
"version": "0.0.1",
"dev": true,
"license": "MIT"
},
"node_modules/content-disposition": {
@@ -3815,6 +3751,7 @@
},
"node_modules/doctrine": {
"version": "3.0.0",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"esutils": "^2.0.2"
@@ -4671,6 +4608,7 @@
},
"node_modules/esutils": {
"version": "2.0.3",
"dev": true,
"license": "BSD-2-Clause",
"engines": {
"node": ">=0.10.0"
@@ -5071,6 +5009,7 @@
},
"node_modules/fs.realpath": {
"version": "1.0.0",
"dev": true,
"license": "ISC"
},
"node_modules/fsevents": {
@@ -5528,6 +5467,7 @@
},
"node_modules/inflight": {
"version": "1.0.6",
"dev": true,
"license": "ISC",
"dependencies": {
"once": "^1.3.0",
@@ -6045,6 +5985,7 @@
},
"node_modules/isarray": {
"version": "2.0.5",
"dev": true,
"license": "MIT"
},
"node_modules/isexe": {
@@ -6145,6 +6086,7 @@
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.3.2.tgz",
"integrity": "sha512-SFNOvSJ+Dgf/9An904Yx+CgSlIPCkIpao4qo51lpee25TIRejdH3rhR4EZMGoNx3/TP3O+wzWuiTFl4sqbltzA==",
"dev": true,
"funding": [
{
"type": "github",
@@ -6376,10 +6318,6 @@
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
},
"node_modules/lodash.get": {
"version": "4.4.2",
"license": "MIT"
},
"node_modules/lodash.includes": {
"version": "4.3.0",
"license": "MIT"
@@ -6413,10 +6351,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/lodash.mergewith": {
"version": "4.6.2",
"license": "MIT"
},
"node_modules/lodash.once": {
"version": "4.1.1",
"license": "MIT"
@@ -6531,6 +6465,7 @@
},
"node_modules/minimatch": {
"version": "3.1.2",
"dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^1.1.7"
@@ -6543,6 +6478,7 @@
"version": "1.1.21",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz",
"integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0",
@@ -6936,25 +6872,6 @@
"react-redux": "*"
}
},
"node_modules/next-swagger-doc": {
"version": "0.4.0",
"license": "MIT",
"dependencies": {
"@types/swagger-jsdoc": "6.0.1",
"cleye": "1.3.2",
"isarray": "2.0.5",
"swagger-jsdoc": "6.2.8"
},
"bin": {
"next-swagger-doc-cli": "dist/cli.js"
},
"engines": {
"node": ">=12"
},
"peerDependencies": {
"next": ">=9"
}
},
"node_modules/next-translate": {
"version": "2.6.2",
"license": "MIT",
@@ -7226,6 +7143,7 @@
},
"node_modules/once": {
"version": "1.4.0",
"dev": true,
"license": "ISC",
"dependencies": {
"wrappy": "1"
@@ -7442,6 +7360,7 @@
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -9078,52 +8997,6 @@
"version": "3.2.0",
"license": "ISC"
},
"node_modules/swagger-jsdoc": {
"version": "6.2.8",
"license": "MIT",
"dependencies": {
"commander": "6.2.0",
"doctrine": "3.0.0",
"glob": "7.1.6",
"lodash.mergewith": "^4.6.2",
"swagger-parser": "^10.0.3",
"yaml": "2.0.0-1"
},
"bin": {
"swagger-jsdoc": "bin/swagger-jsdoc.js"
},
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/swagger-jsdoc/node_modules/glob": {
"version": "7.1.6",
"license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"engines": {
"node": "*"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/swagger-parser": {
"version": "10.0.3",
"license": "MIT",
"dependencies": {
"@apidevtools/swagger-parser": "10.0.3"
},
"engines": {
"node": ">=10"
}
},
"node_modules/sync-fetch": {
"version": "0.5.2",
"license": "MIT",
@@ -9162,13 +9035,6 @@
"url": "https://opencollective.com/webpack"
}
},
"node_modules/terminal-columns": {
"version": "1.4.1",
"license": "MIT",
"funding": {
"url": "https://github.com/privatenumber/terminal-columns?sponsor=1"
}
},
"node_modules/terser": {
"version": "5.51.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.51.2.tgz",
@@ -9351,13 +9217,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/type-flag": {
"version": "3.0.0",
"license": "MIT",
"funding": {
"url": "https://github.com/privatenumber/type-flag?sponsor=1"
}
},
"node_modules/type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -9629,15 +9488,6 @@
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/validator": {
"version": "13.15.35",
"resolved": "https://registry.npmjs.org/validator/-/validator-13.15.35.tgz",
"integrity": "sha512-TQ5pAGhd5whStmqWvYF4OjQROlmv9SMFVt37qoCBdqRffuuklWYQlCNnEs2ZaIBD1kZRNnikiZOS1eqgkar0iw==",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/vary": {
"version": "1.1.2",
"license": "MIT",
@@ -10016,6 +9866,7 @@
},
"node_modules/wrappy": {
"version": "1.0.2",
"dev": true,
"license": "ISC"
},
"node_modules/wsl-utils": {
@@ -10060,13 +9911,6 @@
"version": "4.0.0",
"license": "ISC"
},
"node_modules/yaml": {
"version": "2.0.0-1",
"license": "ISC",
"engines": {
"node": ">= 6"
}
},
"node_modules/yocto-queue": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.1.tgz",
@@ -10081,32 +9925,6 @@
"node_modules/yoga-layout": {
"version": "2.0.1",
"license": "MIT"
},
"node_modules/z-schema": {
"version": "5.0.5",
"license": "MIT",
"dependencies": {
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
"validator": "^13.7.0"
},
"bin": {
"z-schema": "bin/z-schema"
},
"engines": {
"node": ">=8.0.0"
},
"optionalDependencies": {
"commander": "^9.4.1"
}
},
"node_modules/z-schema/node_modules/commander": {
"version": "9.5.0",
"license": "MIT",
"optional": true,
"engines": {
"node": "^12.20.0 || >=14"
}
}
}
}
-1
View File
@@ -64,7 +64,6 @@
"next-build-id": "^3.0.0",
"next-connect": "^0.12.2",
"next-redux-wrapper": "^7.0.5",
"next-swagger-doc": "^0.4.0",
"next-translate": "^2.6.2",
"next-translate-plugin": "^2.6.2",
"nodemailer": "7.0.13",
-13
View File
@@ -1,13 +0,0 @@
import { withSwagger } from 'next-swagger-doc';
const swaggerHandler = withSwagger({
definition: {
openapi: '3.0.0',
info: {
title: 'PEDW Example',
version: '0.1.0',
},
},
schemaFolders: ['models'],
});
export default swaggerHandler();