Installations
npm install @aquilacms/express-jsdoc-swagger
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>= 10.0.0
Node Version
10.23.0
NPM Version
6.14.8
Score
72
Supply Chain
95.9
Quality
71.6
Maintenance
50
Vulnerability
97.9
License
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
1,346
Last Day
2
Last Week
2
Last Month
17
Last Year
461
GitHub Statistics
MIT License
134 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Dec 03, 2020
Bundle Size
2.13 MB
Minified
697.31 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.0.6
Package Id
@aquilacms/express-jsdoc-swagger@1.0.6
Unpacked Size
212.69 kB
Size
37.79 kB
File Count
107
NPM Version
6.14.8
Node Version
10.23.0
Total Downloads
Cumulative downloads
Total Downloads
1,346
Last Day
100%
2
Compared to previous day
Last Week
-66.7%
2
Compared to previous week
Last Month
183.3%
17
Compared to previous month
Last Year
79.4%
461
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
express-jsdoc-swagger
With this library, you can document your express endpoints using swagger OpenAPI 3 Specification without writing YAML or JSON. You can write jsdoc comments on each endpoint, and the library is going to create the swagger UI.
Prerequisites
This library assumes you are using:
Installation
npm i express-jsdoc-swagger
Usage
1const express = require('express'); 2const expressJSDocSwagger = require('express-jsdoc-swagger'); 3 4const options = { 5 info: { 6 version: '1.0.0', 7 title: 'Albums store', 8 license: { 9 name: 'MIT', 10 }, 11 }, 12 security: { 13 BasicAuth: { 14 type: 'http', 15 scheme: 'basic', 16 }, 17 }, 18 filesPattern: ['./**/*.js'], // Glob pattern to find your jsdoc files 19 swaggerUIPath: '/your-url', // SwaggerUI will be render in this url. Default: '/api-docs' 20 baseDir: __dirname, 21}; 22 23const app = express(); 24const PORT = 3000; 25 26expressJSDocSwagger(app)(options); 27 28/** 29 * GET /api/v1 30 * @summary This is the summary or description of the endpoint 31 * @return {object} 200 - success response 32 */ 33app.get('/api/v1', (req, res) => res.json({ 34 success: true, 35})); 36 37app.listen(PORT, () => console.log(`Example app listening at http://localhost:${PORT}`)); 38
Examples
- Basic configuration
1const options = { 2 info: { 3 version: '1.0.0', 4 title: 'Albums store', 5 license: { 6 name: 'MIT', 7 }, 8 }, 9 security: { 10 BasicAuth: { 11 type: 'http', 12 scheme: 'basic', 13 }, 14 }, 15 filesPattern: ['./**/*.js'], // Glob pattern to find your jsdoc files 16 baseDir: __dirname, 17};
- Components definition
1/** 2 * A song type 3 * @typedef {object} Song 4 * @property {string} title.required - The title 5 * @property {string} artist - The artist 6 * @property {number} year - The year - double 7 */
- Endpoint that returns a
Songs
model array
1/** 2 * GET /api/v1/albums 3 * @summary This is the summary or description of the endpoint 4 * @tags album 5 * @return {array<Song>} 200 - success response - application/json 6 */ 7app.get('/api/v1/albums', (req, res) => ( 8 res.json([{ 9 title: 'abum 1', 10 }]) 11));
- Basic endpoint definition with tags, params and basic authentication
1/** 2 * GET /api/v1/album 3 * @summary This is the summary or description of the endpoint 4 * @security BasicAuth 5 * @tags album 6 * @param {string} name.query.required - name param description 7 * @return {object} 200 - success response - application/json 8 * @return {object} 400 - Bad request response 9 */ 10app.get('/api/v1/album', (req, res) => ( 11 res.json({ 12 title: 'abum 1', 13 }) 14));
You can find more examples here, or visit our documentation.
Contributors ✨
Briam Martinez Escobar 💻 | Kevin Julián MartÃnez Escobar 💻 | Heung-yeon Oh 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: MIT License: LICENSE.md:0
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/publish.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/runTests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/runTests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/runTests.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/runTests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/runTests.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/runTests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/runTests.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/runTests.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/runTests.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/AquilaCMS/express-jsdoc-swagger/runTests.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/publish.yml:17
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 third-party GitHubAction dependencies pinned
- Info: 2 out of 3 npmCommand dependencies pinned
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/publish.yml:1
- Warn: no topLevel permission defined: .github/workflows/runTests.yml:1
- Info: no jobLevel write permissions found
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
42 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-257v-vj4p-3w2h
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-7wpw-2hjm-89gp
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-44c6-4v22-4mhx
- Warn: Project is vulnerable to: GHSA-4x5v-gmq8-25ch
- Warn: Project is vulnerable to: GHSA-6c9x-mj3g-h47x
- Warn: Project is vulnerable to: GHSA-qrmm-w75w-3wpx
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v
- Warn: Project is vulnerable to: GHSA-38fc-wpqx-33j7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2.8
/10
Last Scanned on 2025-02-10
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 More