fix: split openapi src files and made bash file to run
This commit is contained in:
@ -5,7 +5,7 @@ const fs = require("fs");
|
||||
|
||||
const app = express();
|
||||
|
||||
const swaggerDocument = yaml.load(fs.readFileSync("../main.yaml", "utf8"));
|
||||
const swaggerDocument = yaml.load(fs.readFileSync("../src/bundled.yaml", "utf8"));
|
||||
|
||||
app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));
|
||||
|
||||
|
1295
documentation/openapi/swagger-ui/package-lock.json
generated
1295
documentation/openapi/swagger-ui/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,9 @@
|
||||
"version": "1.0.0",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"bundle": "swagger-cli bundle -o ../src/bundled.yaml -t yaml ../src/main.yaml",
|
||||
"start": "npm run bundle; node main.js"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@ -12,6 +14,8 @@
|
||||
"dependencies": {
|
||||
"express": "^4.21.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"package.json": "^2.0.1",
|
||||
"swagger-cli": "^4.0.4",
|
||||
"swagger-ui-express": "^5.0.1"
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user