express-joi-simple
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "express-joi-simple", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -63,3 +63,4 @@ # Express + Joi + Swagger | ||
host: 'localhost:3000', | ||
basePath: '/' | ||
basePath: '/', | ||
documentaionPath: /doc | ||
} | ||
@@ -69,1 +70,5 @@ ``` | ||
Doc(app, settings); | ||
Default documentation path is: / | ||
So you can find documentation: localhost:3000/ |
@@ -8,3 +8,3 @@ | ||
export function Doc(app: any, settings?: any) { | ||
const {info, host, basePath} = settings; | ||
const {info, host, basePath, documentationPath} = settings; | ||
@@ -46,3 +46,5 @@ Swagger.swaggerDoc.createJsonDoc(info, host, basePath); | ||
app.use('/doc', SwaggerUi.serve, SwaggerUi.setup(JSON.parse(swaggerDocument))); | ||
let docPath = documentationPath || '/'; | ||
app.use(docPath, SwaggerUi.serve, SwaggerUi.setup(JSON.parse(swaggerDocument))); | ||
} |
@@ -15,3 +15,4 @@ export const settings = { | ||
host: 'localhost:3000', | ||
basePath: '/' | ||
basePath: '/', | ||
documentationPath: '/doc' | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
18041
271
73