Doug Bunting
58026eacbd
Correct a few model binding typos
...
- worst cases were incorrect references in doc comments
- also a few doc comments ended with `..` or `/`
- otherwise, address nits and take VS suggestions
2018-01-09 12:49:40 -08:00
Doug Bunting
afc75a8296
Move `IHttpRequestStreamReaderFactory` from `.Internal` to `.Infrastructure`
...
- #7044
- move `IHttpResponseStreamWriterFactory` too
- add breaking change records e.g. for changes to `BodyModelBinder[Provider]` constructors
- these changes relate to previously-"internal" constructors and one property
nits: take VS suggestions for changed files
2018-01-09 10:51:09 -08:00
Doug Bunting
c9ac2e6c29
Add `DisplayMetadata.NullDisplayTextProvider` and similar properties
...
- #6730
- `DisplayFormatStringProvider`, `EditFormatStringProvider`
nits:
- use `<see langword="null"/>` more
- accept VS suggestions in changed files
2018-01-09 09:01:57 -08:00
Hao Kung
73bd09dc1c
Add CombineAuthorizeFilters option
2018-01-08 11:59:30 -08:00
ASP.NET CI
2e73bab2a4
Move option for JSON errors to MvcJsonOptions
...
This was in the wrong place - JSON formatters have their own options
type already.
Moved the option to MvcJsonOptions and updated the naming + defaults to
reflect our plan.
Also did a bunch of general cleanup on these tests, which were a bit
sloppy.
2018-01-07 21:48:58 -08:00
Kiran Challa
40d027fca3
File results - logging
2018-01-04 23:49:13 -08:00
Ryan Nowak
bf61ce2b8f
Document compatiblity switch for input formatter exceptions
2018-01-03 11:23:05 -08:00
Doug Bunting
5778f44bf7
Use `ExceptionDispatchInfo` in `MiddlewareFilterBuilder` if available
...
- #6596
- better-align this code with `ResourceInvoker.Rethrow()`
nits:
- take VS suggestions in `MiddlewareFilterBuilderTest`
- clean up names like `httpCtxt`
- remove unused `Pipeline2` class
2018-01-02 14:56:41 -08:00
Kiran Challa
276c1e4360
Improve logging - output formatter selection
2018-01-02 10:09:47 -08:00
Ryan Nowak
49bdcfb150
Updated Razor Pages areas for compatibility switches
2018-01-02 09:48:23 -08:00
Ryan Nowak
82e32240a4
Update the Enum Invalid Value setting for compat
...
Updated the naming to follow guidelines, and set the default for 2.0
apps to false. Note that I inverted the naming, which means that I had
to invert the logic in a few places.
2017-12-29 12:09:29 -08:00
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
350c4ec4f6
Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter ( #7120 )
...
* Introduce IAlwaysRunResultFilter \ IAsyncAlwaysRunResultFilter
Fixes #7105
2017-12-22 10:52:52 -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
Doug Bunting
5d9f04cf34
Run `[RequireHttps]` filter early in pipeline
2017-12-14 10:40:57 -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
629f87181a
[ Fixes #6858 ] Changes to MvcOption's settings (SuppressInputFormatterBuffering & AllowBindingUndefinedValueToEnumType) are not taking affect
2017-12-04 14:25:41 -08:00
Jass Bagga
0bb3f18049
Add support for BadRequest in RazorPages ( #7097 )
...
Addresses #7095
2017-12-01 12:03:24 -08:00
Jeremy Skinner
008a562bf5
Move property definitions below constructor in ValidationVisitor
...
Remove incorrect virtual modifier on one of the Validate overloads
2017-11-22 07:50:37 -08:00
Jeremy Skinner
3a132e4af5
Open up private methods in ValidationVisitor
...
- Allows for other validation libraries to customize validation behaviour
Addresses #7014
2017-11-22 07:50:37 -08:00
Jeremy Skinner
959e7027b0
Add ValidateComplexTypesIfChildValidationFails to ValidationVisitor
...
- Allows more granular control of when model-level validation should run.
Addresses #7014
2017-11-22 07:50:37 -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
de2aef61ba
Make controllers with ApiControllerAttribute visible in ApiExplorer
2017-10-27 12:04:12 -07:00
Javier Calvarro Nelson
0989e60f73
[ Fixes #6943 ] Unit Testing Page Model Throws Null Ref On ModelState check
2017-10-26 14:37:42 -07:00
Dale Palmer
c567a690bc
[ Fixes #6902 ] Added an overload for StatusCode that takes in System.Net.HttpStatusCode
2017-10-26 12:41:34 -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
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
Doug Bunting
e659b578f6
Typo fix
2017-10-04 09:00:34 -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
Ryan Nowak
be5d4ec11e
Undo a breaking change
2017-10-02 13:12:25 -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
Javier Calvarro Nelson
f24d71136a
Add breaking changes file
2017-09-22 13:53:51 -07:00
Javier Calvarro Nelson
a8eda83222
Add MVC 2.0 baselines
2017-09-22 12:53:12 -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
Pranav K
5d1603c37f
Replace ProblemDetailsAttribute with ApiControllerAttribute
2017-09-22 10:26:13 -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
Pranav K
197ef139d6
Provide a way within the Page/PageModel to run code before any handler runs
...
Fixes #6606
2017-09-22 09:25:22 -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
Charlie Daly
324db455d9
ControllerBase helpers refactored with lambda syntax.
...
- Addresses #6864
2017-09-21 13:19:33 -07: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