Commit Graph

111 Commits

Author SHA1 Message Date
Pranav K e7ab81fe0b Ensure analyzer package is referenced by Microsoft.AspNetCore.Mvc
Fixes #7684
2018-06-19 16:11:47 -07:00
Pranav K 49c653ed0b Infer BindingSource.FormFile for IEnumerable<IFormFile>
Fixes #7770
2018-05-22 11:05:09 -07:00
Pranav K e1eaf6a6e0
Cleanup TestCommon 2018-05-18 10:45:57 -07:00
Pranav K c7559e1ff4
Merge pull request #7590 from aspnet/release/2.1
Release/2.1
2018-04-02 09:49:14 -07:00
Pranav K c515cece8e Use ModelMetadataProvider to infer BindingSource on application model 2018-04-02 09:48:49 -07:00
Pranav K 133dd964ab Introduce ViewDataAttribute
Allow properties on controllers, Razor Page and Razor Page models annotatted with [ViewDataAttribute]
to populate ViewDataDictionary

Fixes https://github.com/aspnet/Mvc/issues/6525
2018-03-30 14:19:52 -07:00
Pranav K d6176ac7de ApplicationPartFactory: The works 2018-03-21 15:40:15 -07:00
Kiran Challa 0215740183 [Fixes #5859] Consider allowing binding header values to types other than string and string collections 2018-01-30 11:47:16 -08:00
Pranav K ebdb3c650a Smooth rough ApiBehavior edges
Fixes #7262
2018-01-22 09:53:21 -08:00
Ryan Nowak d342ebf8c8 Use compatibility switch for auth filters 2018-01-11 17:42:32 -08:00
Ryan Nowak 95d743e2c6 Renable compatibility switch functional tests 2018-01-09 22:24:19 -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
Ryan Nowak bf61ce2b8f Document compatiblity switch for input formatter exceptions 2018-01-03 11:23:05 -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 b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Nate McMaster 2e4bc548f5
Pin tool and package versions to make builds more repeatable (#7013) 2017-10-31 19:18:14 -07:00
Justin Kotalik ce66e95304 React to JsonPatch exception message changes. (#6976) 2017-10-20 09:56:27 -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
Pranav K 5d1603c37f Replace ProblemDetailsAttribute with ApiControllerAttribute 2017-09-22 10:26:13 -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
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
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
Pranav K 8963b83dd3 Remove ParseOptions and CompilationOptions from RazorViewEngineOptions (#6487)
* Remove ParseOptions and CompilationOptions from RazorViewEngineOptions

Fixes #6009
2017-07-05 14:18:49 -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
Pranav K 8df3032540 Add support for specifying filters on page models.
Fixes #6334
2017-06-28 14:43:02 -07:00
Jass Bagga 9d138affa2 Suppress JsonPatchDocument validation (#6429)
Addresses aspnet/JsonPatch#80
2017-06-22 14:14:11 -07:00
Pranav K 8f883e8e13 Use RazorViewAttribute \ RazorPageAttribute for view discovery 2017-06-07 13:49:24 -07:00
Pavel Krymets 2845e9b7d4 Add configuration package reference because Logging dropped it (#6375) 2017-06-07 13:47:39 -07:00
Hao Kung dbd340a5e0 Fix test 2017-06-02 12:28:56 -07:00
Ryan Brandenburg 03404cd3df Return to NetStandard 2017-05-25 10:34:16 -07:00
Ryan Nowak a6d97d35e3 Add back support for AddTagHelpersAsServices
This doesn't go through the Razor tag helper discovery pipeline because
this can really only ever work for ITagHelper based taghelpers. So
there's really no point in reusing that logic, which would be hard
anyway.
2017-05-23 14:04:42 -07:00
Pranav K 39f1f5c933 Move Pages filter creation to application model provider
Fixes #6198
2017-05-23 11:03:19 -07:00
Nate McMaster d70bfdd1ea Upgrade test framework versions and fix test issues 2017-05-15 14:11:27 -07:00
Pranav K 1c5e417606 Change TFM to netcoreapp2.0 (#6234)
* Change TFM to netcoreapp2.0
2017-05-04 18:11:26 -07:00
Ryan Nowak a8eb5bee70 Implement view search for pages
The View Engine now needs to know about pages :(. This isn't ideal but the
view engine needs to know what set of search paths to use. This was
already hardcoded for controllers vs controllers + areas. It felt right to
further hardcode instead of introduce a wierd abstraction that we only
use.

Additionally pages use a view location expander to implement an ascending
directory search.
2017-04-18 16:11:24 -07:00
Pranav K 8ed55107e7 Add support for page precompilation 2017-04-17 10:43:50 -07:00
Steve Sanderson 4f351bd37c Add support for media type suffixes (#5273, #6032) 2017-03-31 10:20:43 +01:00
Pranav K 705c36921a Use alternate workaround for #6005 2017-03-22 19:14:46 -07:00
Pranav K 18785dbed6 Add System.Reflection.TypeExtensions to fix net46 tests 2017-03-22 06:33:04 -07:00
Pranav K badb6ce8e5 Remove net451 as a cross-compile target 2017-03-22 06:32:50 -07:00
Ryan Brandenburg 270f66198f Remove Razor from projects 2017-03-17 15:00:39 -07:00
Jass Bagga 1197657e5b TempData property attribute
Addresses #5600
2017-03-16 16:34:35 -07:00
Nate McMaster 6f7717a381 Unify dependency versions to one file 2017-03-15 16:54:32 -07:00