Skip to content

Commit

Permalink
fix example schema removal and upgrade patch version
Browse files Browse the repository at this point in the history
  • Loading branch information
cdimascio committed Aug 23, 2023
1 parent c73b7c1 commit 495dabd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "express-openapi-validator",
"version": "5.0.4",
"version": "5.0.5",
"description": "Automatically validate API requests and responses with OpenAPI 3 and Express.",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/middlewares/openapi.request.validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class RequestValidator {
this.middlewareCache = {};
this.apiDoc = apiDoc;
// Examples not needed for validation
delete this.apiDoc.components.examples;
delete this.apiDoc.components?.examples;
this.requestOpts.allowUnknownQueryParameters =
options.allowUnknownQueryParameters;
this.ajv = createRequestAjv(apiDoc, { ...options, coerceTypes: true });
Expand Down

0 comments on commit 495dabd

Please sign in to comment.