Gathering detailed insights and metrics for fastify-serve-swagger-ui
Gathering detailed insights and metrics for fastify-serve-swagger-ui
npm install fastify-serve-swagger-ui
Typescript
Module System
Node Version
NPM Version
63.8
Supply Chain
79.5
Quality
73.9
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
40,296
Last Day
6
Last Week
15
Last Month
26
Last Year
263
3 Stars
1 Commits
2 Forks
2 Watching
2 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
fastify-serve-swagger-ui@1.0.0
Unpacked Size
4.64 kB
Size
2.01 kB
File Count
3
NPM Version
5.6.0
Node Version
8.9.4
Cumulative downloads
Total Downloads
Last day
0%
6
Compared to previous day
Last week
200%
15
Compared to previous week
Last month
136.4%
26
Compared to previous month
Last year
-62.2%
263
Compared to previous year
2
5
fastify-serve-swagger-ui
serves swagger UI for your fastify instance, at the same time allowig you to inject swagger specification of your choice as default speficiation.
npm i fastify-serve-swagger-ui
1const fastify = require("fastify")(); 2fastify.register(require("fastify-serve-swagger-ui"), { 3 // swagger specification which should be exposed 4 specification: { 5 type: "file", 6 path: "./var/examples/example.yaml" 7 }, 8 // path under which swagger-ui will be available 9 path: "swagger" 10}); 11 12const start = async () => { 13 try { 14 await fastify.listen(3000); 15 16 console.log(`server listening on ${fastify.server.address().port}`); 17 } catch (err) { 18 console.error(err); 19 process.exit(1); 20 } 21}; 22 23start();
Given that ./var/examples/example.yaml
is the path which is relative to the root of the project. You can then open http://localhost:3000/swagger/ and see the swagger-ui which shows your specification.
Example:
Another variant is to provide the specification fot the url
, you can pass the object like this:
{
specification: {
type: "url",
url: "http://petstore.swagger.io/v2/swagger.json"
},
path: 'swagger'
}
Basic working example is located under var/examples/simple.js.
fastify-serve-swagger-ui
works wunderfully with fastify-blipp, try it out!
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/1 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
license file not detected
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
82 existing vulnerabilities detected
Details
Score
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