express-jsdoc-swagger
Version:
Swagger OpenAPI 3.x generator
19 lines (17 loc) • 624 B
JavaScript
const expressJSDocSwaggerOptions = {
// Absolute path of the application
baseDir: __dirname,
// Glob pattern to find your jsdoc files (multiple patterns can be added in an array)
filesPattern: './**/*.js',
// URL where SwaggerUI will be rendered
swaggerUIPath: '/api-docs',
// Expose OpenAPI UI
exposeSwaggerUI: true,
// Expose Open API JSON Docs documentation in `apiDocsPath` path.
exposeApiDocs: false,
// Open API JSON Docs endpoint.
apiDocsPath: '/v3/api-docs',
// Set non-required fields as nullable by default
notRequiredAsNullable: false,
};
module.exports = expressJSDocSwaggerOptions;