aspnetcore/test/Microsoft.AspNet.Mvc.Core.Test
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
..
ActionResults [Fixes #1841] Change XML DCS and XmlSerializer output formatters to not derive from the base XmlOutputFormatter 2015-01-20 17:22:04 -08:00
AntiXsrf Revert "Revert "Added SetAntiForgeryCookieAndHeader method that sets cookie token and header"" 2015-01-20 10:51:44 -08:00
ApplicationModel Fix for #384 - And some other changes to controller as filter 2015-01-16 19:15:59 -08:00
Description Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
Filters Changing when controllers are created 2015-01-16 20:23:39 -08:00
Formatters [Fixes #1841] Change XML DCS and XmlSerializer output formatters to not derive from the base XmlOutputFormatter 2015-01-20 17:22:04 -08:00
Internal
Logging
OptionDescriptors
ParameterBinding Changing when controllers are created 2015-01-16 20:23:39 -08:00
Properties
Rendering Correct `CheckBoxFor` to ignore `ViewData` 2015-01-16 17:20:34 -08:00
Routing
TestFiles
Utils
ViewComponents
ActionConstraintValuesTest.cs
ActionDescriptorValuesTest.cs
ActionExecutorTests.cs
ActionModelValuesTest.cs
ApiExplorerModelValuesTest.cs
AttributeRouteInfoValuesTest.cs
AttributeRouteModelValuesTest.cs
BodyModelBinderTests.cs
ConsumesAttributeTests.cs Adding Support for consumes. 2015-01-16 14:15:08 -08:00
ControllerActionDescriptorProviderTests.cs Adds parameter information to ApiExplorer 2015-01-22 13:30:41 -08:00
ControllerActionInvokerTest.cs Changing when controllers are created 2015-01-16 20:23:39 -08:00
ControllerModelValuesTest.cs
ControllerTests.cs Added support for TryValidateModel and its corresponding tests 2015-01-16 17:23:59 -08:00
ControllerUnitTestabilityTests.cs Some cleanup of ActionResults - #657 2015-01-16 17:29:56 -08:00
CopyOnWriteDictionaryTest.cs
DefaultActionDescriptorCollectionProviderLoggingTest.cs
DefaultActionSelectorSelectAsyncValuesTest.cs
DefaultActionSelectorTests.cs
DefaultAssemblyProviderTests.cs
DefaultControllerActivatorTest.cs Changing when controllers are created 2015-01-16 20:23:39 -08:00
DefaultControllerFactoryTest.cs
DefaultInputFormatterSelectorTests.cs
DefaultViewComponentActivatorTests.cs
FilterDescriptorValuesTest.cs
FilterValuesTest.cs
HttpMethodProviderAttributesTests.cs
JsonResultTest.cs [Fixes #1791]Remove XML formatter from defaults 2015-01-15 15:46:49 -08:00
KnownRouteValueConstraintTests.cs
Microsoft.AspNet.Mvc.Core.Test.kproj
MockModelBinderProvider.cs
MockModelValidatorProviderProvider.cs
MockMvcOptionsAccessor.cs
MockScopedInstance.cs
MockValueProviderFactoryProvider.cs
MvcOptionsTests.cs
MvcRouteHandlerTests.cs [Fixes #1791]Remove XML formatter from defaults 2015-01-15 15:46:49 -08:00
PropertyHelperTest.cs
RequireHttpsAttributeTests.cs
ResponseCacheAttributeTest.cs Changing when controllers are created 2015-01-16 20:23:39 -08:00
RouteConstraintProviderValuesTest.cs
RouteDataActionConstraintTest.cs
RouteDataActionConstraintValuesTest.cs
RouteTemplateProviderAttributesTest.cs
StaticAssemblyProvider.cs
StaticControllerModelBuilder.cs
TestController.cs
TestGlobalFilterProvider.cs
TypeHelperTest.cs
UrlHelperTest.cs
ViewComponentTests.cs
ViewDataDictionaryOfTModelTest.cs
ViewDataDictionaryTest.cs
project.json