Schema Validation¶
Istos validates and coerces parameters at the network boundary — before your handler or subscriber runs. Bad data is rejected with a structured error reply.
Three modes¶
Where it applies¶
| Decorator | Validated input |
|---|---|
@handle |
Query parameters / payload mapped to arguments |
@stream |
Query parameters / payload mapped to arguments (same as @handle) |
@subscribe |
Published payload (when typed) |
@query / @publish |
Return processing as configured; outbound kwargs build selectors |
Return-type annotations can also drive response validation when configured via the handler wrapper (see Validation API).
Errors on the wire¶
Validation failures become a standardized error response (code, message, correlation_id, …) instead of crashing the process. Customize handling with @istos.exception_handler.
AsyncAPI schemas¶
Type hints and Pydantic models feed the AsyncAPI generator used by export_asyncapi() / serve_docs().