Skip to content

Commit 03d15fa

Browse files
committed
docs: add native middleware section
Signed-off-by: heitorlessa <lessa@amazon.co.uk>
1 parent 6f63b4f commit 03d15fa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/core/event_handler/api_gateway.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,14 @@ As a practical example, let's refactor our correlation ID middleware so it accep
555555
!!! note "Class-based **vs** function-based middlewares"
556556
When registering a middleware, we expect a callable in both cases. For class-based middlewares, `BaseMiddlewareHandler` is doing the work of calling your `handler` method with the correct parameters, hence why we expect an instance of it.
557557

558+
#### Native middlewares
559+
560+
These are native middlewares that may become native features depending on customer demand.
561+
562+
| Middleware | Purpose |
563+
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
564+
| [SchemaValidationMiddleware](/api/event_handler/middlewares/schema_validation.html){target="_blank"} | Validates API request body and response against JSON Schema, using [Validation utility](../../utilities/validation.md){target="_blank"} |
565+
558566
#### Being a good citizen
559567

560568
Middlewares can add subtle improvements to request/response processing, but also add significant complexity if you're not careful.

0 commit comments

Comments
 (0)