aspnetcore/samples/MvcSample.Web
Ryan Nowak 09928a2818 Adds parameter information to ApiExplorer
This change makes ApiDescription and ApiParameterDescription aware of all
of the new features we built into model binding for enhanced DTO support
(uber-binding).

The main change is that instead of sticking just to the declared
parameters on the action itself, we now traverse model metadata and break
the parameters down based on their logical data source.

This means that a model like the below will yield 3 parameters:

public class ProductChangeCommandDTO
{
    public int Id { get; set; }

    [FromBody]
    public ProductDetails Changes { get; set; }

    [FromQuery]
    public string AdminComments { get; set; }

    [FromServices]
    public IProductRepository Repository { get; set; }
}

The 'Repository' will be hidden, as it's not related to user input.

Additionally, we treat different sources differently. In the
above example, 'Changes' is from the body and will be treated as a
leaf-node.

However if you use nested DTOs that are bound from the query string (using
[FromQuery]) or similar, we'll recursively explore to find as much
structure as possible.

This information is combined with data from the route template to give a
much more complete picture than we ever could in the past for parameters,
especially when DTO/Command pattern is used.
2015-01-22 13:30:41 -08:00
..
Areas/Travel Add missing license headers 2014-11-20 22:54:05 -08:00
Compiler/Preprocess Fixed folder name casing of Compiler/* 2014-12-16 12:32:35 -08:00
Components Add missing license headers 2014-11-20 22:54:05 -08:00
Controllers/ApiExplorerSamples Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
Filters matched classnames with filenames 2014-11-25 11:21:17 -08:00
Models Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
Monitoring Add missing license headers 2014-11-20 22:54:05 -08:00
Services
Views Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
wwwroot Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
ApiExplorerController.cs
AutoGenerateRouteNamesAttribute.cs
FiltersController.cs React to Security Auth changes 2015-01-15 23:41:52 -08:00
Home2Controller.cs Removing dead code in sample 2014-12-31 11:26:49 -08:00
HomeController.cs File upload model binder 2015-01-15 13:41:14 -08:00
LanguageViewLocationExpander.cs Add missing license headers 2014-11-20 22:54:05 -08:00
LinkController.cs Add missing license headers 2014-11-20 22:54:05 -08:00
MvcSample.Web.kproj Checkin VS auto-modifications to kproj files 2014-12-03 11:11:43 -08:00
OverloadController.cs Add missing license headers 2014-11-20 22:54:05 -08:00
SimplePocoController.cs Add missing license headers 2014-11-20 22:54:05 -08:00
SimpleRest.cs Add missing license headers 2014-11-20 22:54:05 -08:00
Startup.cs React to Security Auth changes 2015-01-15 23:41:52 -08:00
TestAssemblyProvider.cs
ViewMetadata.cs Add missing license headers 2014-11-20 22:54:05 -08:00
config.json removed App_data per [Mvc] Remove App_Data from MvcSample.Web Startup (#1716) 2014-12-31 11:09:03 -08:00
project.json Nit: Remove unneeded sample dependencies on Microsoft.AspNet.Mvc.TestConfiguration 2015-01-13 12:49:22 -08:00