Gathering detailed insights and metrics for express-openapi-validator
Gathering detailed insights and metrics for express-openapi-validator
Gathering detailed insights and metrics for express-openapi-validator
Gathering detailed insights and metrics for express-openapi-validator
koa-x-oapi-validator
Koa port of the popular express-openapi-validator library.
express-openapi
An unopinionated OpenAPI framework for express
openapi-validator-middleware
Fast input validation middleware using OpenAPI 2.0 (formerly Swagger) and 3.0 definitions file and ajv
openapi-schema-validator
A validator for OpenAPI documents.
🦋 Auto-validates api requests, responses, and securities using ExpressJS and an OpenAPI 3.x specification
npm install express-openapi-validator
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
920 Stars
1,962 Commits
211 Forks
19 Watching
30 Branches
102 Contributors
Updated on 20 Nov 2024
TypeScript (99.38%)
JavaScript (0.6%)
Shell (0.02%)
Cumulative downloads
Total Downloads
Last day
3.7%
51,846
Compared to previous day
Last week
3.5%
265,907
Compared to previous week
Last month
7.2%
1,123,274
Compared to previous month
Last year
27.3%
11,265,187
Compared to previous year
13
1
An OpenApi validator for ExpressJS that automatically validates API requests and responses using an OpenAPI 3 specification.
🦋express-openapi-validator is an unopinionated library that integrates with new and existing API applications. express-openapi-validator lets you write code the way you want; it does not impose any coding convention or project layout. Simply, install the validator onto your express app, point it to your OpenAPI 3 specification, then define and implement routes the way you prefer. See an example.
Features:
Docs:
NestJS Koa and Fastify now available! 🚀
1npm install express-openapi-validator 2 3# experimental OAS 3.1 in alpha (contributions welcome - see branch `oas-3.1` and pr-882 4# please provide feedback on (issue-573) 5npm install express-openapi-validator@6.0.0-alpha.5
1const OpenApiValidator = require('express-openapi-validator');
or
1import * as OpenApiValidator from 'express-openapi-validator';
1app.use( 2 OpenApiValidator.middleware({ 3 apiSpec: './openapi.yaml', 4 validateRequests: true, // (default) 5 validateResponses: true, // false by default 6 }), 7);
1app.use((err, req, res, next) => { 2 // format error 3 res.status(err.status || 500).json({ 4 message: err.message, 5 errors: err.errors, 6 }); 7});
Important: Ensure express is configured with all relevant body parsers. Body parser middleware functions must be specified prior to any validated routes. See an example.
See the doc for complete documenation
deprecated legacy doc
No vulnerabilities found.
Reason
30 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 10
Reason
GitHub workflow tokens follow principle of least privilege
Details
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
Found 4/26 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
16 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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