aspnetcore/src
Ryan Nowak 420f442487 Fixes #3818 - Support Consumes in ApiExplorer
This change adds a list of ApiRequestFormat objects to ApiDescription
object which include the content type and formatter for each supported
content type which can be understood by the action.

Computation is aware of the [Consumes] attribute via the
IApiRequestMetadataProvider metadata interface, and aware of Input
Formatters via the new IApiRequestFormatMetadataProvider interface.

This algorithm is essentially the same as what we do for
produces/output-formatters. We iterate the filters and ask them what
content types they think are supported. Then we cross check that list with
the formatters, and ask them which from that list are supported. If no
[Consumes] filters are used, the formatters will include everything they
support by default.

This feature and data is only available when an action has a [FromBody]
parameter, which will naturally exclude actions that handle GET or DELETE
and don't process the body.
2016-01-13 12:32:17 -08:00
..
Microsoft.AspNet.Mvc
Microsoft.AspNet.Mvc.Abstractions Add optional filter caching 2016-01-13 09:11:08 -08:00
Microsoft.AspNet.Mvc.ApiExplorer Fixes #3818 - Support Consumes in ApiExplorer 2016-01-13 12:32:17 -08:00
Microsoft.AspNet.Mvc.Core Fixes #3818 - Support Consumes in ApiExplorer 2016-01-13 12:32:17 -08:00
Microsoft.AspNet.Mvc.Cors Add optional filter caching 2016-01-13 09:11:08 -08:00
Microsoft.AspNet.Mvc.DataAnnotations
Microsoft.AspNet.Mvc.Formatters.Json [Fixes #3683] Replace implementations in MediaTypeComparisons and 2016-01-12 15:09:48 -08:00
Microsoft.AspNet.Mvc.Formatters.Xml [Fixes #3683] Replace implementations in MediaTypeComparisons and 2016-01-12 15:09:48 -08:00
Microsoft.AspNet.Mvc.Localization Make ViewLocalizer base name generation more efficient: 2015-12-21 16:25:35 -08:00
Microsoft.AspNet.Mvc.Razor Remove Razor precompilation 2016-01-12 14:51:33 -08:00
Microsoft.AspNet.Mvc.Razor.Host
Microsoft.AspNet.Mvc.TagHelpers Remove use of `String.Split` in Environment taghelper 2016-01-11 09:41:21 -08:00
Microsoft.AspNet.Mvc.ViewFeatures Add optional filter caching 2016-01-13 09:11:08 -08:00
Microsoft.AspNet.Mvc.WebApiCompatShim Remove runtime dependency usage of MediaTypeHeaderValue. 2016-01-12 15:09:46 -08:00