Commit Graph

903 Commits

Author SHA1 Message Date
Pranav K 8946a68923 Infer binding sources for ApiController parameters
Fixes #6847
2017-10-16 15:20:43 -07:00
Jass Bagga b992ef0ced Add tests to ApplicationModelTest (#6932)
Addresses #756
2017-10-10 11:24:03 -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
Kristian Hellang bfbc04f758 Use AddHttpContextAccessor method added in aspnet/HttpAbstractions#947 2017-10-03 08:52:59 -07:00
Steve Sanderson afdda7cbee Update fsproj for FSharpWebSite. Fixes #6554 2017-10-02 14:35:28 +01:00
Jass Bagga 2fcfc6be7c Add EnableRangeProcessing (#6895)
Addresses #6780
2017-09-29 18:39:45 -07:00
Kiran Challa 83c3ac62fb Updated formatters to wrap exceptions in InputFormatException for invalid input 2017-09-22 14:33:17 -07:00
Pranav K 5d1603c37f Replace ProblemDetailsAttribute with ApiControllerAttribute 2017-09-22 10:26:13 -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
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
Hao Kung 95c10050c9 Stop using obsolete version of AddScheme in test 2017-09-20 12:48:46 -07:00
Javier Calvarro Nelson 85f3c841f1 Revert "Revert "Improvements to the testing package.""
This reverts commit 7b28334c41.
2017-09-19 21:45:05 -07:00
Ryan Brandenburg 7b28334c41 Revert "Improvements to the testing package."
This reverts commit 96bd2769d0.
2017-09-19 18:02:53 -07:00
Javier Calvarro Nelson 96bd2769d0 Improvements to the testing package.
* Detect a ConfigureDefaultBuilder static method on Program.cs of the test site
and use it to initialize the IWebHostBuilder instance that we configure for testing.
* Make use of the new service configuration extensibility points in Hosting to override
services for testing.
* Get rid of MvcWebApplicationBuilder and move MVC specific methods into extension methods.
2017-09-18 18:12:01 -07:00
Kiran Challa 47287c508e Added new extension methods to configure all MVC localization services
[Fixes #5436] Must call `AddViewLocalization()` to use `IStringLocalizer<T>` in an application
2017-09-18 14:28:55 -07:00
Kiran Challa 23b7d8f62a Added RequestFormLimits filter.
[Fixes #5128] Overriding Request Form max upload limit
2017-09-18 13:48:15 -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
Pranav K 037c1ec47d Make @inherit + Razor Pages + _ViewImports work
Fixes #6769
2017-09-14 12:34:00 -07:00
Kiran Challa 4f18d99d02 Added RedirectToAction overload with no arguments 2017-09-12 17:17:48 -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 de38922601 Allow BindPropertyAttribute to be applied on PageModel
Fixes #6653
2017-09-12 10:34:19 -07:00
Pranav K 63397653fa Make DefaultApiDescriptionProvider understand ActionResult<T>
Fixes #6784
2017-09-11 14:20:38 -07:00
Pranav K 6bf165f22f Update default Razor search paths to include ~/[PagesRoot]/Shared
Fixes #6604
2017-09-11 14:11:39 -07:00
Kiran Challa 3beb310866 Avoid saving TempData in case of unhandled exceptions. [Fixes #6598] BUG? Accessing TempData prevent response to have content on error. 2017-09-07 13:13:27 -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 151cf44607 Introduce ActionResult<T> 2017-09-06 18:46:06 -07:00
Pranav K bac68ba3c2 Injecting IViewLocalizer into Razor Page causing IndexOutOfRangeException
Fixes #6694
2017-09-06 13:54:38 -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
Ryan Nowak ca6c76c358 Add a test where [Ignore..] gets overridden
Fixing a small gap in our AF functional tests.
2017-08-25 13:55:27 -07:00
Pranav K 7b2a4ff465 Allow "page" route parameter to be used in Mvc controllers
Fixes #6660
2017-08-24 15:44:37 -07:00
Pranav K 900a5c7c4c Add support for ResponseCache in Razor Pages
Fixes #6437
2017-08-18 16:25:40 -07:00
Nate McMaster b43b244830 Use Directory.Build.props/targets 2017-08-16 12:30:13 -07:00
Pranav K 5fee1cac83 Merge pull request #6655 from aspnet/rel/2.0.0
Refactor CORS support out of MVC Core
2017-08-14 16:50:14 -07:00
Javier Calvarro Nelson f2a8c1cea7 Refactor CORS support out of MVC Core 2017-08-14 11:40:56 -07:00
Pranav K 6eba0e2128 Merge pull request #6578 from aspnet/rel/2.0.0
Rel/2.0.0
2017-07-21 10:51:10 -07:00
Pranav K a5b55edb93 Fix filter order (#6577)
* Fix filter order
2017-07-21 10:50:34 -07:00
Pranav K 1810925b13 Add _ViewStart and _ViewImports to embedded view test 2017-07-14 10:34:29 -07:00
Hao Kung e09a0f5b7c React to auth default changes 2017-07-07 12:08:11 -07:00
Pranav K fc106ab793 Revive call to FormattingUtilities in XmlDataContractSerializerOutputFormatter
Fixes #6235
2017-07-07 10:11:28 -07:00
Ajay Bhargav Baaskaran 05f5d59e44 Fix build break 2017-07-06 19:43:42 -07:00
Hao Kung a15c2afe85 React to auth 2017-07-06 13:42:05 -07:00
Ryan Nowak a23307e2b1 Check for properties that can't befound
If you give ModelExpressionProvider a lambda with a private property
you'll end up here. This wasn't common before, but it seems like users
are more likely to try it with pages.

Model Metadata and Model Binding don't handle private properties, so
supporting it in Model Expressions seems less than useful.

This isn't a breaking change because this case would have resulted in a
null-ref. Addresses #6400
2017-07-04 13:26:17 -07:00
Hao Kung eeee3ef731 Add SignOut overload + Use new auth api (#6476) 2017-07-03 12:32:11 -07:00
Javier Calvarro Nelson d917504c14 [Fixes #6468] Clean up the productionized testing infrastructure 2017-07-03 10:15:06 -07:00
Pranav K bc86ea4e47 Move convention extensions from RazorPagesOptions to PageConventionCollectionsExtensions
Fixes #6462
2017-06-30 14:25:10 -07:00
Jass Bagga 17f6b17a6d Add RequestSizeLimitAttribute (#6453)
Addresses #6352
2017-06-29 13:04:27 -07:00
Ryan Nowak 579aca0121 Define semantics for pagemodels
Fixes #6210

Now a pagemodel requires a [PageModel] somewhere in it's hierarchy. We
don't do a guess at whether or not your model class is a PageModel.
2017-06-29 09:24:57 -07:00
Pranav K 8df3032540 Add support for specifying filters on page models.
Fixes #6334
2017-06-28 14:43:02 -07:00