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: docs/core/event_handler/api_gateway.md
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,8 @@ Event handler for Amazon API Gateway REST and HTTP APIs, Application Load Balanc
11
11
* Support for CORS, binary and Gzip compression, Decimals JSON encoding and bring your own JSON serializer
12
12
* Built-in integration with [Event Source Data Classes utilities](../../utilities/data_classes.md){target="_blank"} for self-documented event schema
13
13
* Works with micro function (one or a few routes) and monolithic functions (all routes)
14
-
* Support for OpenAPI and data validation for requests/responses
14
+
* Support for OpenAPI schema generation
15
+
* Support data validation for requests/responses
15
16
16
17
## Getting started
17
18
@@ -430,7 +431,7 @@ This value will override the value of the failed response validation http code s
430
431
431
432
#### Validating query strings
432
433
433
-
!!! info "We will automatically validate and inject incoming query strings via type annotation."
434
+
!!! info "You must set `enable_validation=True` to have access to the incoming query strings parameters via type annotation."
434
435
435
436
We use the `Annotated` type to tell the Event Handler that a particular parameter is not only an optional string, but also a query string with constraints.
436
437
@@ -490,9 +491,9 @@ For example, we could validate that `<todo_id>` dynamic path should be no greate
490
491
491
492
#### Validating headers
492
493
493
-
We use the `Annotated` type to tell the Event Handler that a particular parameter is a header that needs to be validated.
494
+
!!! info "You must set `enable_validation=True`to have access to the incoming headers parameters via type annotation."
494
495
495
-
!!! info "We adhere to [HTTP RFC standards](https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2){target="_blank" rel="nofollow"}, which means we treat HTTP headers as case-insensitive."
496
+
We use the `Annotated` type to tell the Event Handler that a particular parameter is a header that needs to be validated. Also, we adhere to [HTTP RFC standards](https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2){target="_blank" rel="nofollow"}, which means we treat HTTP headers as case-insensitive.
496
497
497
498
In the following example, we use a new `Header` OpenAPI type to add [one out of many possible constraints](#customizing-openapi-parameters), which should read as:
0 commit comments