Commit Graph

4564 Commits

Author SHA1 Message Date
Pranav K e01fbe420f
Merge pull request #8505 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-28 07:55:27 -07:00
Eilon Lipton d985f9ec44
Update LICENSE.txt 2018-09-27 15:46:08 -07:00
Pranav K 2f0aee6736
Merge remote-tracking branch 'origin/release/2.2' 2018-09-26 16:13:57 -07:00
Pranav K 8311fd870b
Include the response type in ProducesResponseType for client errors (#8490)
* Include the response type in ProducesResponseType for client errors

* Refactor ActualApiResponseMetadata discovery in to a separate more manageable type
* Annotate action result ctors and helper methods that specify the "object" value with attribute
* Modify the discovery of parameters to match ActionResultObjectValueAttribute and ActionResultStatusCodeAttribute by name
  to allow users to write and annotate custom helper methods and action results, a la NotNullAttribute.

Fixes #8345
2018-09-26 15:51:49 -07:00
Ryan Nowak f2612f4cc0
Merge pull request #8498 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-26 12:45:27 -07:00
Ryan Nowak 3a8f1ad564
Merge branch 'master' into merge/release/2.2-to-master 2018-09-26 10:16:14 -07:00
Pranav K 5b8b3a0067
Reference Microsoft.NET.Sdk.Razor in projects with Razor files (during benchmark builds) 2018-09-26 10:10:16 -07:00
Ryan Nowak 831937c86c Add LinkGenerator extensions for MVC 2018-09-26 09:37:46 -07:00
Pranav K 50cef4822a
Invoke FlushAsync before disposing the HttpResponseWriter in JsonResultExecutor
Fixes #8486
2018-09-24 13:00:56 -07:00
ASP.NET CI db7555b0ba Update dependencies.props
[auto-updated: dependencies]
2018-09-23 19:25:04 +00:00
ASP.NET CI bd2754160e Update dependencies.props
[auto-updated: dependencies]
2018-09-23 12:22:59 -07:00
Ryan Nowak 71d4d1be07 Merge branch 'release/2.2' 2018-09-22 16:37:02 -07:00
Ryan Nowak 89a962716f React to Routing LinkGenerator changes 2018-09-22 15:47:38 -07:00
Doug Bunting 90089953d7
Merge pull request #8491 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-21 15:40:49 -07:00
Pranav K a7513ce282
Update dependencies.props 2018-09-21 11:47:19 -07:00
Pranav K 5915c69aa3
Merge remote-tracking branch 'origin/release/2.2' 2018-09-21 11:42:45 -07:00
Doug Bunting 5c8dfef15e
Change `CollectionModelBinder` and `ComplexTypeModelBinder` to enforce `[BindRequired]`
- #8180
- add an error when binding fails for top-level model
  - same case as when MVC creates "default" / empty model i.e. `ParameterBinder` can't detect this
- update `CollectionModelBinder` subclasses and the various providers as well
- controlled by existing `MvcOptions.AllowValidatingTopLevelNodes` option

smaller issue:
- change `ModelBinding_MissingBindRequiredMember` resource to mention parameters too
2018-09-21 11:08:16 -07:00
Pranav K 61386d5f67
Reference Microsoft.NET.Sdk.Razor in projects with Razor files 2018-09-20 13:21:45 -07:00
Ryan Nowak 5b9ef5972c Merge branch 'release/2.2' 2018-09-20 11:08:03 -07:00
Ryan Nowak 5c4c746797 Reaction PR from routing rename 2018-09-20 10:15:50 -07:00
Pranav K 9c424b7b02
Use content-type specified by ProducesAttribute if no formatter supports it
This allows users to use `ProducesAttribute` to specify the content-type
for action results such as FileStreamResult where the result determines the content type
and the specified value is informational.

Fixes https://github.com/aspnet/Mvc/issues/5701
2018-09-19 13:51:31 -07:00
Pranav K f7da3503d6 Allow Implicit 200 status codes to match Ok result 2018-09-19 12:51:13 -07:00
Doug Bunting 43621246c7
Merge branch 'merge/release/2.2-to-master' 2018-09-18 12:31:58 -07:00
Pranav K c73b13f544
Cherry-pick @pranavkm's functional test for #7562
- 30a5eda508 / origin/prkrishn/form-file-value-provider

Was:
Design: Use a value provider to allow nested form files

Fixes https://github.com/aspnet/Mvc/issues/7562
2018-09-18 11:44:48 -07:00
Doug Bunting 47d6d4e82c
Update `FormFileModelBinder` to re-add prefix `ParameterBinder` removed incorrectly
- #7562 part 2
- add `OriginalModelName` to `ModelBindingContext`

nit: take VS suggestions, mostly to inline collection initialization in `FormFileModelBinderTest`
2018-09-18 11:44:48 -07:00
Doug Bunting c13e2498a8
Create model in `ComplexTypeModelBinder` if ANY property has a greedy binding source
- #7562 part 1
2018-09-18 11:44:37 -07:00
ASP.NET CI 6129c33ef8 Update dependencies.props
[auto-updated: dependencies]
2018-09-16 19:24:22 +00:00
ASP.NET CI 6abb4d9e81 Update dependencies.props
[auto-updated: dependencies]
2018-09-16 12:22:12 -07:00
James Newton-King 446ce02dd5
Merge branch 'merge/release/2.2-to-master' 2018-09-15 10:02:04 +12:00
James Newton-King 8791f9ad0d
Change test parameter transformer to slugify values (#8453) 2018-09-15 09:14:48 +12:00
Pranav K d677a32a53
Merge pull request #8459 from dotnet-maestro-bot/merge/release/2.2-to-master
[automated] Merge branch 'release/2.2' => 'master'
2018-09-14 10:00:20 -07:00
Pranav K 4b83f7b510
Make FileVersionProvider repleacable
Fixes #6371
2018-09-14 09:14:02 -07:00
Pranav K 233140c33a
Allow IFormFile parameters annotated with [FromForm] to be correctly … (#8452)
* Allow IFormFile parameters annotated with [FromForm] to be correctly bound in ApiControllers

Fixes #8311
2018-09-14 09:06:32 -07:00
Ryan Nowak 35597db277 Fix #8451
Change tokens can call into your code IMMEDIATELY when you subscribe. I
reviewed our other usage of ChangeToken.OnChange in MVC and everything
looks good.
2018-09-13 15:38:42 -07:00
James Newton-King 3671faf2ac
Update routing dependency 2018-09-13 09:21:03 +12:00
James Newton-King 7d072c1c1a
Merge release/2.2 2018-09-13 09:16:12 +12:00
Pranav K cb88e906b2 Allow ProducesAttribute to apply along with conventions
Fixes #8389
2018-09-12 13:58:02 -07:00
Pranav K a73d073eea
Allow ApiControlelrAttribute to be applied to assemblies
Fixes #7343
2018-09-12 13:42:22 -07:00
Pranav K 13281613a5
Refactor DefaultPageApplicationModel to use conventions 2018-09-12 12:28:16 -07:00
Simon Cropp 43d4416a1d Fix typos (#8413) 2018-09-12 09:34:45 -07:00
James Newton-King dfae9c208a
Add IParameterTransformer support (#8329) 2018-09-12 21:46:41 +12:00
James Newton-King 105f8b47a1
Fix endpoint support for area/controller/action in attribute route (#8447) 2018-09-12 21:16:50 +12:00
N. Taylor Mullen 7a945bd192 Merge branch 'release/2.2' 2018-09-11 14:10:01 -07:00
N. Taylor Mullen ec489da586 Add additional logging to diagnose flaky cache tag test.
#8281
2018-09-11 14:09:36 -07:00
James Newton-King 81cb0e6945
Merge branch 'merge/release/2.2-to-master' 2018-09-11 11:03:23 +12:00
James Newton-King 6e27a04bf3
No HttpContext to route constraints in MvcEndpointDataSource (#8436) 2018-09-11 10:12:09 +12:00
Ryan Brandenburg 13bb673774 Merge branch 'merge/release/2.2-to-master' 2018-09-10 15:10:13 -07:00
Ryan Nowak f573b8840a Fix aspnet/Routing#782
Currently MVC is still running the IActionConstraint implementations for
features that we've already moved into the routing layer. This has a
significant perf cost associated with, and so we want to skip it because
it's redundant. However if anyone has implemented their own
`IActionConstraint`-based features, they still need to just work.

This change takes the approach of skipping the action constraint phase
at runtime unless we see something 'unknown'. This is an all or nothing
choice, and will run action constraints if **any** action constraint we
don't special case exists. This is the most compatible behavior (running
redundant constraints) when the application is using constraints that
the developer implemented.

Another approach I considered was to eliminate these constraints as part
of the process of building ADs. I don't think that's ideal because
people have written code that introspects action constraints. We should
consider something like this in 3.0.
2018-09-09 15:17:05 -07:00
ASP.NET CI 5eff5a43fb Update dependencies.props
[auto-updated: dependencies]
2018-09-09 19:25:09 +00:00
ASP.NET CI 87c1389b5a Update dependencies.props
[auto-updated: dependencies]
2018-09-09 12:23:38 -07:00