Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow input binding control flow or (and) extensibility #2926

Open
nazar-kuzo opened this issue Jan 18, 2025 · 0 comments
Open

Allow input binding control flow or (and) extensibility #2926

nazar-kuzo opened this issue Jan 18, 2025 · 0 comments
Labels

Comments

@nazar-kuzo
Copy link

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 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant