Repository navigation
Validate typed parameters before each request encoding - #4
Merged
Merged
Conversation
Invoke a typed-parameter validation callback before each request encoding, including bodyless and deferred operations. Document custom transport responsibilities and cover mutation after a successful request build. Validate Litestar whole-query models in request mode and translate failures to HTTP 400 before delegate invocation.
|
Translate encoding failures at the shared request build boundary for ordinary and SSE requests. Return structured Litestar validation diagnostics without submitted inputs or non-serializable contexts. Cover encoded query values, terminal SSE failures, and safe server error responses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Typed request parameters currently bypass request-mode validation, especially on bodyless operations. Add an optional parameter-validation callback that runs before each request encoding and rechecks mutable values on repeated/deferred executions. Generated callbacks reuse native model validation.
Litestar whole-query models now use request-mode Pydantic validation and translate failures to HTTP 400.
Ordinary and SSE request builds share RequestEncodingError translation. Litestar returns structured errors without submitted inputs or non-serializable context objects.
Validation: Ruff,
mypy src tests tools, and all 208 tests passed; coverage is 91.89%. The Litestar regression verifies HTTP 400 before delegate invocation.Companion fix for Sunday Generator PR #243. This runtime must be released before the generator emits the new hook.