Installations
npm install joi-openapi
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=14.16.1
Node Version
18.12.1
NPM Version
8.19.2
Score
76.4
Supply Chain
90.3
Quality
76
Maintenance
100
Vulnerability
99.3
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
sdrubolo
Download Statistics
Total Downloads
156,943
Last Day
79
Last Week
276
Last Month
1,459
Last Year
23,449
GitHub Statistics
6 Stars
77 Commits
5 Forks
1 Watching
1 Branches
4 Contributors
Bundle Size
264.74 kB
Minified
81.42 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.2.1
Package Id
joi-openapi@3.2.1
Unpacked Size
245.36 kB
Size
34.02 kB
File Count
52
NPM Version
8.19.2
Node Version
18.12.1
Publised On
14 Feb 2023
Total Downloads
Cumulative downloads
Total Downloads
156,943
Last day
41.1%
79
Compared to previous day
Last week
-15.1%
276
Compared to previous week
Last month
2%
1,459
Compared to previous month
Last year
-21.9%
23,449
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
joi-openapi
This is a fork of joi-to-openapi with some new options. In short, in this package I've added joi extensions as supported type.
Now the library support to outputs for converted joi: standard output and file.
examples
1const Joi = require("joi"); 2const { convert } = require("joi-openapi"); 3 4let joi = Joi.extend((joi) => ({ 5 base: joi 6 .string() 7 .isoDate() 8 .description("Date in ISO format"), 9 name: "date_start", 10 language: {}, 11 rules: [], 12})); 13 14console.log(convert(joi.date_start()));
will output
1{ 2 "type": "string", 3 "format": "date-time", 4 "description": "Date in ISO format" 5}
to write the output on a file
1const Joi = require("joi"); 2const { convertToFile } = require("joi-openapi"); 3 4let joi = Joi.extend((joi) => ({ 5 base: joi 6 .string() 7 .isoDate() 8 .description("Date in ISO format"), 9 name: "date_start", 10 language: {}, 11 rules: [], 12})); 13 14convertToFile(joi.date_start(), "./");
will output
1{ 2 "type": "string", 3 "format": "date-time", 4 "description": "Date in ISO format" 5}
in the date_start.json file (the file will be created by joi type plust json format).
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:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
8 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5
- 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-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1
- Info: no jobLevel write permissions found
Reason
Found 1/26 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/sdrubolo/joi-to-openapi/nodejs.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sdrubolo/joi-to-openapi/nodejs.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:21
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 11 are checked with a SAST tool
Score
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 MoreOther packages similar to joi-openapi
joi-to-swagger
Conversion library for transforming joi schema objects into swagger / OpenApi OAS 3.0 schema definitions.
joi-to-json
joi to JSON / OpenAPI Schema Converter
@chatkick/serverless-openapi-joi
Serverless plugin for creating OpenAPI specifications with Joi validation
koa-joi-router-docs
OpenAPI(aka Swagger) API docs generator for koa-joi-router.