ASP.NET Web API
-
OData string transform to .NET types
Consider having the following string OData query string:
$filter=(Name eq 'bla)&$skip=5
Would be awesome if you can get the lambda function of $filter. Aswell things like skip, sort field and order, etc.
This would be useful for creating a specific AJAX handler which would filter out a dataset, create Observable data streams (Signalr), etc...
Would be cool if we can extend this parser (get the AST and override parts of the Visitor pattern applied to build an Expression).
Why would you not satisified with only $filter -> Func<T, bool>? Well other collections like (Nhibernate) like to do filtering on a…5 votes -
Provide an OData client that allows for shared entity classes
I'd like to see a complementary OData client to go along with ASP.NET Web API OData services.
The current, built-in "WCF Data Service References" in Visual Studio are very "heavy" in nature and don't fit the more modern style of entity programming very well.
In particular, it doesn't support sharing a common set of "code first" entities. The biggest problem is that OData doesn't natively support enumerations, so they end up being converted to "Int" or "String" in the OData data model. A shared entity model would help this problem somewhat, and allow for code reuse.
5 votes -
Support CREF attribute in ASP.NET Web Api Help Pages
I would really like it if the CREF tag was honored in the WebAPI documentation pages. Example:
<param name="resizeType">The resize type as defined in <see cref="MyModels.ResizeTypeEnum"/></param>
Should dynamically pull information from the summary found at MyModels.ResizeTypeEnum and put it in the Help Page
4 votes -
Add a fluent OData query configuration API
In the current release of OData Web API, security for queries is applied via the Queryable attribute or via ODataQueryOptions. The current system lacks any built-in method for restricting which fields can be used with the $filter query option. Implementing a trivial list of fields that support $filter is difficult, given that it can apply to relations.
Instead, consider adding a "fluent" configuration API that captures this information at the entity level and allows orderby & filter to be "entity model aware" (for lack of a better term).
For example,
var settingsBuilder = ODataConventionSettingsBuilder();
settingsBuilder.Entity<Order>().OrderByProperties("Id");
settingsBuilder.Entity<Order>()
.OrderByProperties({ "Id", "Name" }) …3 votes -
Allow the return type for Help samples to be specified by an Attribute
Note that this request is about the default HelpPage code that is added through Nuget, I can fix the code myself, but i'd love to see it baked into the default code (HelpPageSampleGenerator.cs):
The way the Help samples are created based off the return type of the action is cool: If i return a Person then a Person is created with some nice sample values. But most of the time, my actions return an HttpResponse, because I need to control the headers/status codes. This is obviously considered in HelpPageSampleGenerator, there is a comment:
// Do the sample generation based on…
3 votes -
OData to support Areas
MVC has Areas to support the creation of different components but the Odata implementation does not support this. Specifically I would like to be able to use OData Controllers with the same names as other Web API or MVC controllers.
3 votes -
Make Web API a common component
Right now Web API is viewed as a component under AP.NET MVC. But, in my opinion, it should be available as just a common file template. The file template is available now, but still developers categorize Web API under ASP.NET MVC. Please evangelize Web API such that it will be viewed as a component under ASP.NET core.
It is just my opinion. You may correct me if I am wrong.
2 votes -
Change the way the [Authorize] attribute works by default in Web API
One of the primary ideas behind a REST API is that it is stateless. The current implementation of Web API seems to rely on Form Based Authentication. I would suggest ripping API Authentication out by default and have the default Web API template modified to reflect that. A selection of authentication of providers should be provided by the community or separate plug and play solutions.
2 votes -
Make WebAPI support everything MVC does minus views.
I think most people expectations would rightfully (IMHO) that WebAPI would support everything MVC does minus any view rendering or ActionResult overhead. When I search the web I see many comments relating to "I can do X in MVC but not in WebAPI". Example: Multipart/form-data or jsonp handling works in MVC out of the box.
2 votes -
Add SSL to HttpMethodAttribute
Add an optional parameter to the HttpMethodAttributes to enforce SSL on methods/actions eg.
[HttpGet(SSL=Required)]
public .... Get(){}[HttpPost(SSL=Optional)]
...[HttpPut(SSL=NotSupported)]
...1 vote
- Don't see your idea?