Ryan Nowak
747420e5aa
Compatibility switches ( #7142 )
...
* [Design] Compatibility switches
This introduces a pattern for versioning breaking behaviour changes in
minor releases of MVC.
The general plan is that application developers choose a release version
(2.0, 2.1, Latest) as their baseline which determines the effective
'defaults' for some options. Anything the developer sets explicitly is
an override and always wins.
Then we add a version setting to the template to point to the current
release.
This allows us to be progressive with fixing issues and improving areas
that don't work well, but offers the developer some choice about when to
adopt new behaviours. In effect, we separate new behaviours from the
libraries that develiver them. Apps can update the version, and then opt
in to new behaviours as a separate change.
* Be more american
* improve docs, add example
* Fix visibility
* Fix broken test
* Add test
* Docs!
* The rest of the tests
* fix example
* Adding docs
* PR feedback
2017-12-28 09:43:24 -08:00
Pranav K
dfa085afaf
Add support for areas to Razor Pages
...
Fixes #6926
2017-12-19 15:03:05 -08:00
Kiran Challa
c8cabde1f1
Improve logging - individual filters
2017-12-18 13:16:06 -08:00
Kiran Challa
4c4a7b3c6c
Improve logging - filter pipeline execution
...
Related to issue #6498 : When enabling "Trace" logging for MVC loggers, I should be buried in log messages
2017-12-14 11:22:13 -08:00
Kiran Challa
7e26af908e
[ Fixes #6514 ] Add default ctor overload to AuthorizeFilter
2017-12-12 14:07:02 -08:00
Kiran Challa
821daa5ad0
[ Fixes #7085 ] ApplicationModelConventionExtensions should make a copy of collections when iterating them
2017-12-12 14:03:35 -08:00
Kiran Challa
db38da7edb
Fix Xml formatters to taking in MvcOptions to take affect of options mutation
...
Related to issue [Fixes #6858 ] Changes to MvcOption's settings (SuppressInputFormatterBuffering & AllowBindingUndefinedValueToEnumType) are not taking affect
2017-12-06 11:44:35 -08:00
Kiran Challa
629f87181a
[ Fixes #6858 ] Changes to MvcOption's settings (SuppressInputFormatterBuffering & AllowBindingUndefinedValueToEnumType) are not taking affect
2017-12-04 14:25:41 -08:00
Pranav K
b6144142fe
Update samples and tests to target netcoreapp2.1
2017-11-13 14:58:40 -08:00
Steve Sanderson
d9825d1547
Better JSON deserialization errors. Implements #4607 , #4862
2017-11-06 23:02:13 +00:00
Pranav K
ab4c519dd5
Infer multipart/form-data for FromFile parameters
2017-11-02 09:36:31 -07:00
Nate McMaster
2e4bc548f5
Pin tool and package versions to make builds more repeatable ( #7013 )
2017-10-31 19:18:14 -07:00
Ryan Nowak
861d78fb78
Refactor content negotiation code into a service ( #6998 )
...
* Refactor content negotiation code into a service
This is a refactor in anticipation of using this logic in some other
places
2017-10-31 16:32:37 -07:00
Pranav K
41efa409a4
Remove TestOptionsManager
2017-10-30 17:49:15 -07:00
Pranav K
de2aef61ba
Make controllers with ApiControllerAttribute visible in ApiExplorer
2017-10-27 12:04:12 -07:00
Pranav K
8946a68923
Infer binding sources for ApiController parameters
...
Fixes #6847
2017-10-16 15:20:43 -07:00
Ryan Nowak
7ba167fcd8
Add 'default response' to API Response Type
...
Also some cleanup and unit tests.
2017-10-09 19:48:52 -07:00
Nate McMaster
3f02482617
Minor test code changes to resolve xUnit2013 build error
2017-10-05 16:04:20 -07:00
Sébastien Ros
d0a8b5f78f
Port fix for URL helper redirect ( #6917 )
...
Fixes #6910
2017-10-05 11:24:18 -07:00
Pranav K
950db6587c
Require attribute routing with [ApiController]
...
Fixes #6870
2017-10-04 13:13:20 -07:00
Ryan Nowak
e3ce1f52d4
Added Conflict result helper to ControllerBase
...
- Added ConflictObjectResult and ConflictResult types.
- Conflict(), Conflict(object error), Conflict(ModelState modelState)
added to ControllerBase.cs.
Fixes #6172
2017-10-02 15:05:57 -07:00
Jass Bagga
2fcfc6be7c
Add EnableRangeProcessing ( #6895 )
...
Addresses #6780
2017-09-29 18:39:45 -07:00
Jass Bagga
eeac99985a
Only set Content-Length when serving body ( #6886 )
...
Addresses #6875
2017-09-25 15:07:12 -07:00
Kiran Challa
83c3ac62fb
Updated formatters to wrap exceptions in InputFormatException for invalid input
2017-09-22 14:33:17 -07:00
Ryan Nowak
38712609bb
Design extensibility for executors
...
We have all of these executors but they aren't really
documented/supported for extensibility today. This change introduces a
pattern for action result executors so we can make them extensible.
2017-09-22 10:32:55 -07:00
Kristian Hellang
97fab8711a
Add UnprocessableEntityResult, UnprocessableEntityObjectResult and ControllerBase.UnprocessableEntity methods ( #6851 )
...
* Added UnprocessableEntityResult
* Added UnprocessableEntityObjectResult
* Added UnprocessableEntity overloads to ControllerBase
Fixes https://github.com/aspnet/Mvc/issues/6795
2017-09-22 09:27:29 -07:00
Steve Sanderson
236ef5d1d1
Support validation and BindBehavior on top-level action parameters and bound properties. Fixes #6790
2017-09-22 10:13:48 +01:00
Pranav K
7f214492b8
Introduce a filter to send bad request results with details when ModelState is invalid ( #6849 )
...
* Introduce a filter to send bad request results with details when ModelState is invalid
Fixes #6789
2017-09-21 11:09:32 -07:00
Pranav K
f0a5af2ba7
Revisit the unwrapping code in ControllerActionInvoker
...
Fixes #6679
2017-09-19 09:49:37 -07:00
Kiran Challa
23b7d8f62a
Added RequestFormLimits filter.
...
[Fixes #5128 ] Overriding Request Form max upload limit
2017-09-18 13:48:15 -07:00
Ryan Nowak
c09575dbd0
Fix #4914 patternize filter overrides
...
Adding some convenience methods to the context class and updating our
code to use them.
2017-09-18 12:12:44 -07:00
Pranav K
776c2604f8
Introduce opinionated API defaults.
...
* Introduce ProblemDescriptionAttribute to enhance some 4xx messages and produce better API description.
* Introduce IErrorDescriptionProvider to modify the shape of error response.
Fixes #6785 , Fixes #6786
2017-09-14 17:07:34 -07:00
Kiran Challa
35601f95b3
Added a model binder for handling Enum types. [ Fixes #6329 ] Why don't we check for Enum.IsDefined on action parameters of enum type
2017-09-14 08:25:05 -07:00
Kiran Challa
06f6de6c11
Changed RequestSizeLimitAttribute to create an authorization filter rather than a resource filter.
...
[Fixes #6777 ] RequestSizeLimit is ignored
2017-09-12 17:03:24 -07:00
Pranav K
717f1e6f7d
Normalize paths in RazorViewEngine prior to invoking page factory
...
Fixes #6672
2017-09-07 11:36:31 -07:00
Pranav K
a7cc243942
Introduce ProblemDescription
2017-09-06 18:46:35 -07:00
Pranav K
151cf44607
Introduce ActionResult<T>
2017-09-06 18:46:06 -07:00
bchavez
16c267d95e
House Cleaning - Spelling and grammar 🚿
2017-08-30 14:58:44 -07:00
Nate McMaster
b811e69d00
Use PackageLineup to manage PackageReference versions
...
- Move the Mvc.Performance project from test/ to benchmarks/.
- Remove the Version attribute on PackageReference.
- Add a reference to two PackageLineup's.
- Add snippet to README explaining the additional requirement to run build.cmd /t:restore.
- Add a target to check that packages have been pinned.
2017-08-30 12:14:11 -07:00
Pranav K
900a5c7c4c
Add support for ResponseCache in Razor Pages
...
Fixes #6437
2017-08-18 16:25:40 -07:00
Nate McMaster
3a710c3d64
Upgrade to xunit 2.3.0-beta4
2017-08-17 10:45:03 -07:00
Nate McMaster
b43b244830
Use Directory.Build.props/targets
2017-08-16 12:30:13 -07:00
Javier Calvarro Nelson
f2a8c1cea7
Refactor CORS support out of MVC Core
2017-08-14 11:40:56 -07:00
Pranav K
a5b55edb93
Fix filter order ( #6577 )
...
* Fix filter order
2017-07-21 10:50:34 -07:00
Hao Kung
36e24b7a31
Fix AuthZ Regression ( #6574 )
2017-07-20 21:18:53 -07:00
Jass Bagga
b4fe715c71
Revert breaking change ( #6519 )
...
Addresses #6518
2017-07-07 17:09:36 -07:00
Pranav K
288da1a405
RedirectToPage(page, handler) does not work ( #6503 )
...
Fixes #6436
2017-07-06 14:12:57 -07:00
Doug Bunting
c351712419
Add `FloatingPointTypeModelBinderProvider` and related binders
...
- #5502
- support thousands separators for `decimal`, `double` and `float`
- add tests demonstrating `SimpleTypeModelBinder` does not support thousands separators for numeric types
- add tests demonstrating use of commas (not thousands separators) with `enum` values
2017-07-03 17:55:04 -07:00
Hao Kung
eeee3ef731
Add SignOut overload + Use new auth api ( #6476 )
2017-07-03 12:32:11 -07:00
Henk Mollema
948982ebff
Create custom collection for model binder providers
...
Fixes #6161
2017-06-30 15:44:07 -07:00