Installations
npm install koa-joi-router-to-swagger-json
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.11.2
NPM Version
5.6.0
Score
71.1
Supply Chain
90.8
Quality
74.5
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
zouyixiong
Download Statistics
Total Downloads
2,718
Last Day
1
Last Week
3
Last Month
7
Last Year
81
GitHub Statistics
1 Stars
36 Commits
1 Forks
2 Watching
1 Branches
1 Contributors
Bundle Size
40.57 kB
Minified
12.26 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.2.0
Package Id
koa-joi-router-to-swagger-json@0.2.0
Unpacked Size
72.39 kB
Size
22.41 kB
File Count
16
NPM Version
5.6.0
Node Version
8.11.2
Total Downloads
Cumulative downloads
Total Downloads
2,718
Last day
0%
1
Compared to previous day
Last week
200%
3
Compared to previous week
Last month
0%
7
Compared to previous month
Last year
-15.6%
81
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
3
Dev Dependencies
5
Koa-Joi-Router Docs Generator
This project is based on paul42/joi-router-swagger-docs.
A node module for generating Swagger 2.0 JSON definitions from existing koa-joi-router routes.
Aiming to be a replacement for koa-resourcer-docs which can take advantage of various Swagger 2.0 tools for generating client libraries, test suites, AWS Lambda/serverless, etc.
Preview
Install
1# use npm 2npm install koa-joi-router-to-swagger-json --save 3# use yarn 4yarn add koa-joi-router-to-swagger-json
Example
Visit example/ folder to see the full example.
API
new SwaggerAPI()
Creates a new SwaggerAPI instance.
swaggerAPI.addJoiRouter(router, options)
Add a joi-router instance to the API. The router should already have all its
routes set up before calling this method (which pulls the route definitions
from the router's .routes
property).
Options:
- prefix: Prefix to add to Swagger path (use prefix from JoiRouter if not set)
swaggerAPI.generateSpec(baseSpec, options)
Create a Swagger specification for this API. A base specification should be
provided with an info
object (containing at least the title
and version
strings) and any other global descriptions.
Options:
- defaultResponses: Custom default responses
1{ 2 200: { 3 description: 'Success' 4 } 5}
Donation
If you find this project useful, you can buy us a cup of coffee:
Acknowledgements
We are grateful to the authors of existing related projects for their ideas and collaboration:
Contributors
chuyik |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Warn: project license file does not contain an FSF or OSI license.
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
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
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
31 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-wm7h-9275-46v2
- Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr
- Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6
- Warn: Project is vulnerable to: GHSA-p9w8-2mpq-49h9
- Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6
- Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj
Score
1.7
/10
Last Scanned on 2025-02-03
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