Azure / azure-functions-host

The host/runtime that powers Azure Functions
https://functions.azure.com
MIT License
1.94k stars 442 forks source link

Support enum binding from route URI #1564

Open fabiocav opened 7 years ago

fabiocav commented 7 years ago

Currently, Enum binding is not supported from URI, so the following would not work:

Route: func/{myenum}

Function:

public static void Run(MyEnum myenum) { 
}

public enum MyEnum
{
    EnumA,
    EnumB
}

This should be supported.

joshua-hayes commented 5 years ago

Just ran into this on functions v2 framework core 2.2 when binding to a POCO from the query. It doesn't look like Enum binding is supported. Dredging up a super old issue here but are there any plans to at least expose some model binding extension points in the framework (similar to IModelBinder / Provider / IValueProvider etc.) for custom model binding like traditional dotnet core api has?

ajdvoynos commented 2 years ago

Any plans on ever supporting this? It doesn't seem to be working on querystring parameters either, which IMO is a pretty common use case.

Devvox93 commented 2 years ago

Milestone unknown. Any update on this or other developments that would make this possible (like the model binding extension ports as mentioned before)?

kwinsor5 commented 1 year ago

Checking on this 6 years later. I wonder why Microsoft is pushing Azure functions (as pure REST APIs) so hard if simple things like this have been handled in Web API for years and years and years.