Azure / Azure/azure-functions-dotnet-worker
Allow input binding control flow or (and) extensibility
- Dominant language
- C#
- Stars
- 466
- Forks
- 215
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 7
Description
### 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` interface (and `DefaultBindingCache` 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.