Installations
npm install hapi-swaggered-ui-fork
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=10.0.0
Node Version
10.15.0
NPM Version
6.9.0
Score
63.4
Supply Chain
83.9
Quality
69.9
Maintenance
40
Vulnerability
98.7
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (68.57%)
HTML (31.43%)
Developer
z0mt3c
Download Statistics
Total Downloads
1,275
Last Day
3
Last Week
8
Last Month
18
Last Year
112
GitHub Statistics
39 Stars
174 Commits
31 Forks
3 Watching
8 Branches
9 Contributors
Bundle Size
1.61 MB
Minified
503.23 kB
Minified + Gzipped
Package Meta Information
Latest Version
4.0.2
Package Id
hapi-swaggered-ui-fork@4.0.2
Unpacked Size
16.07 kB
Size
5.64 kB
File Count
7
NPM Version
6.9.0
Node Version
10.15.0
Total Downloads
Cumulative downloads
Total Downloads
1,275
Last day
0%
3
Compared to previous day
Last week
60%
8
Compared to previous week
Last month
157.1%
18
Compared to previous month
Last year
-5.9%
112
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
hapi-swaggered-ui
Easy swagger-ui (v3) drop-in plugin for hapi to be used with hapi-swaggered.
Supports hapi 17.x and up
For earlier versions check hapi-swaggered-ui 2.x (current default/latest npm install hapi-swaggered --save
)
Install
1npm install hapi-swaggered-ui@next
Configuration
title
: string, title of swagger uipath
: string, optional path where the docs should be located at (e.g. '/docs', defaults to: null)basePath
: string, optional url base path (e.g. used to fix reverse proxy routes)swaggerEndpoint
: Override the auto-detection of hapi-swaggered with a specific URL. (not recommended in use with hapi-swaggered; optional)swaggerOptions
: object (according to swagger-ui)operationsSorter
: Apply a sort to the operation list of each API. It can be 'alpha' (sort by paths alphanumerically), 'method' (sort by HTTP method), null (server side sorting) or a custom function (see link above).docExpansion
: Controls how the API listing is displayed. It can be set to 'none' (default), 'list' (shows operations for each resource), or 'full' (fully expanded: shows operations and their details).validatorUrl
: By default, Swagger-UI attempts to validate specs against swagger.io's online validator (disabled for localhost). You can use this parameter to set a different validator URL, for example for locally deployed validators (Validator Badge). Setting it to false will disable validation. This parameter is relevant for Swagger 2.0 specs only.- In addition the following options are supported:
oauth2RedirectUrl
,configUrl
,displayOperationId
,displayRequestDuration
,filter
,deepLinking
,maxDisplayedTags
,tagsSorter
,parameterMacro
,modelPropertyMacro
- have a look at swagger-ui
authorization
: object - can be null or false to disable authorization through swagger-ui (e.g. in case of public apis without auth)scope
: string, 'query' or 'header'field
: string, name of the fieldvaluePrefix
: string, prefix fields value (e.g. with 'bearer ')defaultValue
: string, default value of the api-key fieldplaceholder
: string, placeholder of the api-key field
auth
: object, auth options as specified in route options (hapi docs), will be applied to all registered plugin routesdefaultTags
: array of strings, will be passed to the specs endpoint through the query param 'tags' (hapi-swaggered feature: tag filtering)
Example
Since hapi-swaggered exposes its plugin configuration hapi-swaggered-ui should find it's swagger endpoint automatically. In case you want to use hapi-swaggered-ui without hapi-swaggered (or the auto-detection doesn't work) you can manually set the swagger endpoint by the swaggerEndpoint option. In addition the page title can be changed through the option title.
1await server.register([ 2 require('inert'), 3 require('vision'), 4 { 5 plugin: require('hapi-swaggered-ui'), 6 options: { 7 title: 'Example API', 8 path: '/docs', 9 authorization: { // see above 10 field: 'apiKey', 11 scope: 'query', // header works as well 12 // valuePrefix: 'bearer '// prefix incase 13 defaultValue: 'demoKey', 14 placeholder: 'Enter your apiKey here' 15 }, 16 swaggerOptions: {} // see above 17 } 18 } 19])
May have a look at the example listed at https://github.com/z0mt3c/hapi-swaggered
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 2/24 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 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
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 8 are checked with a SAST tool
Reason
25 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-mg85-8mv5-ffjr
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-7hx8-2rxv-66xv
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- 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-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-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-2mvq-xp48-4c77
- Warn: Project is vulnerable to: GHSA-5854-jvxx-2cg9
- Warn: Project is vulnerable to: GHSA-g64q-3vg8-8f93
- Warn: Project is vulnerable to: GHSA-6c9x-mj3g-h47x
- Warn: Project is vulnerable to: GHSA-qrmm-w75w-3wpx
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
1.3
/10
Last Scanned on 2025-01-27
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