Skip to content

Commit ecf056e

Browse files
author
Pascal Romanens
committed
#1298 updated documentation to match new behavior of @Validation
1 parent 4808b8f commit ecf056e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/utilities/validation.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,9 @@ We support JSON schema version 4, 6, 7 and 201909 (from [jmespath-jackson librar
156156

157157
`@Validation` annotation is used to validate either inbound events or functions' response.
158158

159-
It will fail fast with `ValidationException` if an event or response doesn't conform with given JSON Schema.
159+
It will fail fast if an event or response doesn't conform with given JSON Schema. For most type of events a `ValidationException` will be thrown. But for
160+
specific `APIGatewayProxyRequestEvent` and `APIGatewayV2HTTPEvent`, instead, the `@Validation` annotation will build and return a custom
161+
400 (BAD_REQUEST) response. Its body will contain the validation error(s) message(s).
160162

161163
While it is easier to specify a json schema file in the classpath (using the notation `"classpath:/path/to/schema.json"`), you can also provide a JSON String containing the schema.
162164

0 commit comments

Comments
 (0)