Commit Graph

10 Commits

Author SHA1 Message Date
N. Taylor Mullen 64e726d2b2 Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Kiran Challa 4ecbe8c709 [Fixes #1065] Need a way to specify "just type" with produces 2015-02-09 10:46:24 -08:00
Harsh Gupta 8e91c1ada6 [Fix for #1850]Produces, Consumes and ObjectResult throw if there is a match all content type. 2015-01-30 15:54:58 -08:00
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
Ryan Nowak b4975b779c Update names of WebSite projects for consistency
Project/Assembly names are all like 'FeatureWebSite' root namespaces
updated accordingly. This makes processing all of the functional tests and
deploying the web sites much simpler.
2014-12-11 09:10:24 -08:00
Doug Bunting 7eb106676c Add missing license headers
- #EngineeringDay
- license present but incorrect in just a few files
- skip generated files such as Resources.Designer.cs and files under
  test\Microsoft.AspNet.Mvc.Razor.Host.Test\TestFiles\Output
2014-11-20 22:54:05 -08:00
Doug Bunting 315908af5f Apply VS' FormatDocument and RemoveAndSort to all *.cs files
- #EngineeringDay
- VS does not yet format auto-properties nicely; reverted what it did

Also revert changes under
- test/Microsoft.AspNet.Mvc.Razor.Host.Test/TestFiles
2014-11-20 21:15:46 -08:00
jacalvar 3f54492930 [Fixes #885] API Explorer: Link Generation
1) Expose the simplified relative path template by cleaning up constraints, optional and catch all tokens from the template.
2) Expose the parameters on the route template as API parameters.
3) Combine parameters from the route and the action descriptor when the parameter doesn't come from the body. #886 will refine this.
4) Expose optionality and constraints for path parameters. Open question: Should we explicitly expose IsCatchAll?
2014-10-13 15:20:38 -07:00
YishaiGalatzer 9de86892a7 Cleanup namespaces and Task.FromResult 2014-10-02 11:49:44 -07:00
Ryan Nowak 3cd6d3e060 Adding Api Explorer 2014-09-25 15:31:51 -07:00