Gathering detailed insights and metrics for swagger-express-jsdoc
Gathering detailed insights and metrics for swagger-express-jsdoc
Gathering detailed insights and metrics for swagger-express-jsdoc
Gathering detailed insights and metrics for swagger-express-jsdoc
npm install swagger-express-jsdoc
Typescript
Module System
Node Version
NPM Version
46.3
Supply Chain
93.8
Quality
70.5
Maintenance
25
Vulnerability
97.3
License
JavaScript (94.34%)
EJS (4.15%)
CSS (1.51%)
Total Downloads
60,532
Last Day
1
Last Week
23
Last Month
142
Last Year
1,700
12 Stars
11 Commits
4 Forks
2 Watching
5 Branches
1 Contributors
Latest Version
1.0.4
Package Id
swagger-express-jsdoc@1.0.4
Unpacked Size
11.36 kB
Size
4.04 kB
File Count
10
NPM Version
6.4.1
Node Version
10.13.0
Cumulative downloads
Total Downloads
Last day
-93.3%
1
Compared to previous day
Last week
-39.5%
23
Compared to previous week
Last month
0.7%
142
Compared to previous month
Last year
-59.8%
1,700
Compared to previous year
Example of Express with swagger-jsdoc
1$ git clone https://github.com/SangHakLee/swagger-express-jsdoc.git
1$ npm i swagger-express-jsdoc 2$ cd node_modules
1$ cd swagger-express-jsdoc 2$ npm install 3$ npm start
http://localhost:3000/api-docs/
This application is based on Swagger, swagger-jsdoc and swagger-ui-express
1// ... 2var swaggerUi = require('swagger-ui-express'); // line 7 3var swaggerJSDoc = require('swagger-jsdoc'); // line 8 4 5// ... 6var options = { // line 27 7 swaggerDefinition: { 8 info: { 9 title: 'swagger-express-jsdoc', // Title (required) 10 version: '1.0.0', // Version (required) 11 }, 12 }, 13 apis: ['./routes/*'], // Path to the API docs 14}; 15var swaggerSpec = swaggerJSDoc(options); // line 36 16 17// ... 18app.get('/api-docs.json', function(req, res) { // line 41 19 res.setHeader('Content-Type', 'application/json'); 20 res.send(swaggerSpec); 21}); 22 23// ... 24app.use('/api-docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec)); // line 45
Your Swagger docs information here. swagger-jsdoc
1{ 2 "title": "Swagger Sample App", 3 "description": "This is a sample server Petstore server.", 4 "termsOfService": "http://swagger.io/terms/", 5 "contact": { 6 "name": "API Support", 7 "url": "http://www.swagger.io/support", 8 "email": "support@swagger.io" 9 }, 10 "license": { 11 "name": "Apache 2.0", 12 "url": "http://www.apache.org/licenses/LICENSE-2.0.html" 13 }, 14 "version": "1.0.1" 15}
Your routing files path. If your routing file path like this,
Set your apis
value like this, apis: ['./controllers/*']
It will be json object.
Your option
value and apis
value are combined.
This returns a simple json document. http://localhost:3000/api-docs.json
This will convert the json document to Swagger-ui. So when you connect with http://localhost:3000/api-docs, it will make you see beautiful documents.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/9 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
17 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Moreexpress-jsdoc-swagger
Swagger OpenAPI 3.x generator
swagger-jsdoc-express
Parses JSDoc comments from files and strings and set ups Swagger UI from it, to be used with Express framework.
swagger-express
Document your express rest api by jsDoc or yaml.
express-jsdoc-swagger-extended
Swagger OpenAPI 3.x generator