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
Currently we have bunch of projects migrating to isolated model and we struggle with lack of extensibility when we are talking about custom input binding. In the isolated model, there is no possibility to take control over multiple input bindings and validation in "all or nothing" manner and deny further execution in graceful manner (not throwing exception).
Example
Let's say I want to build custom [FromQuery] input binding for HTTP triggered function that will have multiple inputs that have to be validated and if validation fails - return 400 without throwing Exception to interrupt the function execution. For this we would need to have either IFunctionInputBindingFeature that has FunctionContext and returns FunctionInputBindingResult with bound whole parametrers or short-circuit worker execution with 400 response.
Prefered solution
Make IBindingCache<T> interface (and DefaultBindingCache<T> class) public so it could be injected and utilized in client code. This is a simple change that will allow to skip default binding process done by DefaultFunctionInputBindingFeature since it rely on checking value in cache before actual binging, so custom code could be executed beforehand and control binding process without default code to kick-in.
Or any other solution that would allow to do multiple input bindings and validation in the worker that will be ignored by default input binding pipeline.
The text was updated successfully, but these errors were encountered:
Description
Motivation
Hi there!
Currently we have bunch of projects migrating to isolated model and we struggle with lack of extensibility when we are talking about custom input binding. In the isolated model, there is no possibility to take control over multiple input bindings and validation in "all or nothing" manner and deny further execution in graceful manner (not throwing exception).
Example
Let's say I want to build custom [FromQuery] input binding for HTTP triggered function that will have multiple inputs that have to be validated and if validation fails - return 400 without throwing Exception to interrupt the function execution. For this we would need to have either
IFunctionInputBindingFeature
that hasFunctionContext
and returnsFunctionInputBindingResult
with bound whole parametrers or short-circuit worker execution with 400 response.Prefered solution
IBindingCache<T>
interface (andDefaultBindingCache<T>
class) public so it could be injected and utilized in client code. This is a simple change that will allow to skip default binding process done byDefaultFunctionInputBindingFeature
since it rely on checking value in cache before actual binging, so custom code could be executed beforehand and control binding process without default code to kick-in.The text was updated successfully, but these errors were encountered: