You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGE_HISTORY.md
+19-10Lines changed: 19 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -7,16 +7,25 @@
7
7
8
8
### breaking change
9
9
10
-
* by defaulting to `true` when not defined by the user.
11
-
12
-
Add tests:
13
-
1. Make sure `AjvOptions` sets the value appropriately based on whether
14
-
the end user defined `allErrors` or not.
15
-
2. When validating requests, make sure the number of errors reported
16
-
(when multiple occur) is 1 when `allErrors` is `false`.
17
-
18
-
The `allErrors` configuration for OpenAPISchemaValidator is not changed
19
-
by this commit since that validation is for trusted content.
10
+
By default, request and response validation now stops after the first failure. Only one error will be reported even when multiple may exist. This follows best practices from AJV:
11
+
-[Security risks of trusted schemas](https://ajv.js.org/security.html#security-risks-of-trusted-schemas)
To report all validation errors (only recommended in development), option `allErrors` can be set in options `validateRequests` and/or `validateResponses`. For example:
0 commit comments