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
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
Pranav K
013697ad89
Remove experimental analyzers
2018-09-07 16:03:06 -07:00
Ryan Brandenburg
9895593926
Include diagnosticMessages from xunit for Functional tests
2018-09-07 15:00:33 -07:00
Doug Bunting
30274c29e5
Merge branch 'release/2.2'
2018-09-07 09:00:25 -07:00
Casey O'Brien
74ba9898f4
[ Fixes #8250 ] Improve the error message when TEntryPoint is not in an entry point assembly
...
Validates that the type used as a generic argument in WebApplicaitonFactory is contained within the entry point to assembly and throws InvalidOperationException otherwise
2018-09-06 18:02:21 -07:00
Ryan Nowak
f7d9271d71
Merge branch 'merge/release/2.2-to-master' of https://github.com/dotnet-maestro-bot/Mvc into dotnet-maestro-bot-merge/release/2.2-to-master
2018-09-06 16:09:34 -07:00
James Newton-King
863b1c2c97
Action endpoint metadata contains attributes from action and controller ( #8395 )
2018-09-07 10:01:40 +12:00
Pranav K
07cc9e66c6
Add a feature to disable file watching in Razor pages ( #8369 )
...
* Add a feature to disable file watching in Razor pages
Fixes https://github.com/aspnet/Mvc/issues/8362
2018-09-06 10:16:31 -07:00
Simon Cropp
b156dee4f1
Fix some spelling ( #8378 )
2018-09-06 07:39:01 -07:00
Ryan Nowak
fabe189470
React to LinkGenerator changes
2018-09-05 20:52:37 -07:00
Pranav K
1dba6dfcc8
Merge remote-tracking branch 'origin/release/2.2'
2018-09-05 16:59:37 -07:00
Ryan Nowak
1128bd572c
Add a functional test for middleware after routing
...
It came up during routing discussions that we don't have any tests for
this scenario.
2018-08-30 14:51:56 -07:00
Pranav K
f90a47c5af
Introduce ProducesErrorResponseTypeAttribute
...
Fixes https://github.com/aspnet/Mvc/issues/8288
2018-08-30 11:24:03 -07:00
James Newton-King
927e7c8bfc
Support route data tokens with Endpoint Routing ( #8360 )
2018-08-30 15:14:34 +12:00
James Newton-King
5cdc172b17
Fix obsolete constraint resolver usage ( #8361 )
2018-08-30 13:28:46 +12:00
Kristian Hellang
ffdbea9dc1
Add analyzer support for status code methods and constructors
2018-08-29 18:23:52 -07:00
Ben Adams
c7f6e7ab2f
Grumpy XUnit
2018-08-29 16:18:25 -07:00
Pranav K
82a01a414d
Set trace id in ProblemDetalsClientErrorFactory
2018-08-29 16:03:08 -07:00
Ajay Bhargav Baaskaran
4d98ea801e
Test basic link generation in Razor pages in both regular and endpoint routing
2018-08-29 15:50:53 -07:00
James Newton-King
b649133eec
Refactor KnownRouteValueConstraint to not require HttpContext ( #8352 )
2018-08-30 08:57:53 +12:00
James Newton-King
28f96bf832
Fix obsolete build warning ( #8358 )
2018-08-30 08:16:57 +12:00
Ryan Brandenburg
234b003b31
Set longRunningTestSeconds for Functional tests
2018-08-29 11:02:43 -07:00
Pranav K
d09c3c9e28
Polish ProblemDetails
...
* Add ability to set extended members on ProblemDetails
* Skip empty valued properties when serializing ProblemDetails
Fixes #8296
Fixes #8317
2018-08-28 16:21:39 -07:00
Pranav K
667ad4daff
Use ClientErrorData to configure ClientErrorResultFilter
...
Fixes #8289
2018-08-28 13:35:32 -07:00
Ryan Nowak
96b77c8663
Fix aspnet/Routing#721
2018-08-28 12:26:13 -07:00
Ryan Nowak
0fcf2448c3
Fix aspnet/Routing#722
...
Exposes a separate change token that will be triggered after action
descriptors have been updated.
2018-08-27 17:24:21 -07:00
James Newton-King
8ed9d0aac2
Use Endpoint instead of RouteEndpoint where possible ( #8331 )
2018-08-28 11:00:11 +12:00
Ryan Nowak
a634f6b116
add another test
2018-08-27 15:34:37 -07:00
Ryan Nowak
cb0627b28a
Addressing a skipped test
...
I think something that was meant to be revisited in a PR got left
behing. I found this while fixing aspnet/Routing#772 and it seems worth
addressing.
This change removes the hardcoding of action/controller/area in the
data source, and corrects the behavior of required route values when
they aren't in that set.
2018-08-27 15:34:37 -07:00
Pranav K
a7301120b1
Unwrap filter factories in TypeFilterAttribute & ServiceFilterAttribute
...
Fixes #7855
2018-08-24 14:15:40 -07:00
Javier Calvarro Nelson
dfb579d45c
[ Fixes #8021 ] Copy the request headers before sending the request on the RedirectHandler
...
If another handler modifies the request headers the modified headers get
applied on subsequent requests, which is not correct. This change copies
the headers before sending the request and uses the original headers for
the redirect request instead of the potentially modified ones.
2018-08-23 16:09:05 -07:00
Pranav K
8eea0ad44c
Update tests to latest compat switch
2018-08-23 08:09:02 -07:00
James Newton-King
e2de54a92d
Update MvcEndpointDataSource to use RoutePattern ( #8249 )
2018-08-23 21:42:42 +12:00
James Newton-King
03da30f3bf
Replace remaining references to global routing ( #8312 )
2018-08-23 10:23:29 +12:00
James Newton-King
cbe1526763
React to routing changes ( #8303 )
2018-08-22 17:15:09 +12:00
Pranav K
5bd818bd64
Introduce ProblemDetailsFilter
...
Fixes https://github.com/aspnet/Mvc/issues/6786
2018-08-21 17:29:12 -07:00
N. Taylor Mullen
f624c9aa7b
Add flaky test logging for `CacheTagHelper_VaryByCultureComposesWithOtherVaryByOptions`.
...
#8281
2018-08-21 15:07:31 -07:00
Pranav K
522006d2c8
[Design] Add a MaxValidationDepth option to ValidationVisitor
...
Fixes #7357
2018-08-16 15:01:18 -07:00
Pranav K
af770ede87
Ignore parameters that specify a model binder type
2018-08-15 12:12:04 -07:00
Pranav K
7e25d7908a
Warn when the parameter name for a model bound complex parameter has the same name as a top level property
...
Fixes #7753
2018-08-14 15:44:48 -07:00
Kristian Hellang
2421ae8c83
Add IStatusCodeActionResult ( #8265 )
...
* Add IStatusCodeActionResult
* Add unit test for explicitly implemented property on StatusCodeResult
2018-08-13 15:39:20 -07:00
Doug Bunting
1cae9b2658
Merge pull request #8256 from SIkebe/fix-locale-sensitive-unit-tests
...
Fix locale sensitive unit tests
2018-08-11 13:01:42 -07:00
Ikebe Shodai
253ac7c143
Ignore line ending diff
2018-08-10 11:09:49 -07:00
Ikebe Shodai
b78063d2d4
Fix locale sensitive unit tests
2018-08-11 02:53:52 +09:00
Pranav K
9da8e2c908
Ensure UnsupportedContentTypeFilter runs before ModelStateInvalidFilter
...
Both UnsupportedContentTypeFilter and ModelStateInvalidFilter use ModelState to
determine the response. UnsupportedContentTypeFilter returns a more specific
response and should execute earlier than the latter filter.
Fixes #8236
2018-08-10 10:39:13 -07:00
Kristian Hellang
da1189e6f1
Use StatusCodes constants instead of literals in the ProducesResponseType code fix ( #8234 )
...
* Use StatusCodes constants instead of literals
2018-08-08 14:41:30 -07:00
Kiran Challa
c16f86f0ef
React to Routing repo's api changes
2018-08-03 16:25:41 -07:00
Pranav K
a375cba359
Copy action constraints and EndPointMetadata when setting up a PageActionDescriptor ( #8208 )
...
* Copy action constraints and EndPointMetadata when setting up a PageActionDescriptor
Fixes #8207
2018-08-03 12:04:44 -07:00
James Newton-King
ac410b76d9
Change MvcEndpointInfo to internal ( #8210 )
2018-08-03 16:30:57 +12:00
Pranav K
ce8fc29728
ConsumesAttribute accepts requests without content type
...
Fixes #8174
2018-08-02 16:27:23 -07:00
Pranav K
e2b6f07778
Respect LowercaseUrls in ApiExplorer
...
Fixes #8006
2018-08-02 14:58:41 -07:00
Pranav K
5a20037965
Move API convention analyzers to Microsoft.AspNetCore.Mvc.Api.Analyzers
...
Fixes #8153
2018-08-02 13:53:33 -07:00
Artak Mkrtchyan
6d9aa281c5
Render `maxlength` attribute for an input tag, when MaxLength or StringLength validation attributes are applied to the model class.
2018-08-02 13:44:19 -07:00
Pranav K
b7335ac768
Add a code fix that applies ProducesResponseTypeAttributes
2018-08-02 09:40:18 -07:00
Ryan Nowak
2b289d2f2c
Use MatcherPolicy for Consumes
2018-08-01 19:05:04 -07:00
James Newton-King
44f5b54f5f
React to routing API review ( #8194 )
2018-08-02 13:37:43 +12:00
Pranav K
814a803ed8
Use local instances of MemoryCache in script, link and image tag helper
2018-08-01 10:14:31 -07:00
Kiran Challa
f4ff537a31
Fix flaky test by using a different instance of contract resolver
...
[Fixes #8175 ] FlakyTest: ExecuteAsync_ErrorDuringSerialization_DoesNotCloseTheBrackets
2018-08-01 07:33:37 -07:00
Kiran Challa
ab84d17bb3
Unskip endpoint routing functional tests
2018-08-01 07:22:42 -07:00
James Newton-King
046af405b6
Rename global routing to endpoint routing ( #8179 )
2018-08-01 15:05:49 +12:00
Pranav K
0726b8b98b
Make publicly exposed Roslyn types internal
2018-07-31 11:08:22 -07:00
Pranav K
d346255db6
Add analyzer and codefix that suggests removing unnecessary invalid model state validity checks
...
Fixes #8146
2018-07-30 13:14:20 -07:00
Justin Kotalik
367717760b
Handle subtype with suffix being a subtype without a suffix ( #8170 )
2018-07-30 12:05:41 -07:00
Pranav K
0102d4efab
Introduce ApiConventionMethodAttribute
...
Fixes #8147
2018-07-30 11:13:25 -07:00
James Newton-King
41de26a546
Add UseMvc unit tests ( #8164 )
2018-07-29 16:58:50 +12:00
Ryan Nowak
fbae57cde1
React to the removal of EndpointConstraint
2018-07-28 19:03:16 -07:00
James Newton-King
c01c7075be
Add EndpointMetadata to ActionDescriptor and hookup CORS ( #8158 )
2018-07-28 16:12:54 +12:00
Doug Bunting
556880872d
Ensure later validations of `null` models do not overwrite `Invalid` state
...
- #8078
2018-07-26 13:49:22 -07:00
Doug Bunting
0d427a60e5
Use `TheoryData` properties to avoid duplicate test data
...
- couldn't just remove duplicate `[TheoryData]` in `GlobalRoutingTest`
- xUnit analyzers don't understand `[InlineData]` is inherited (though runtime certainly does)
2018-07-26 10:12:50 -07:00
Doug Bunting
498fa2d72f
Avoid `InvalidOperationException` when serializing `SerializableError`
...
- #8055
- provide unique name (`<Empty-Key>`) for XML elements that would otherwise be nameless
nits:
- remove now-useless Mono special case in updated test class
- extend updated tests to involve square brackets as well as empty keys
2018-07-26 08:56:02 -07:00
James Newton-King
f31ab716ee
Change MvcEndpointDataSource to use GetChangeToken ( #8137 )
2018-07-26 09:20:26 +12:00
Kiran Challa
10ce77b9ca
Updated MvcEndpointDataSource to create endpoints with SuppressLinkGenerationMetadata
2018-07-25 06:41:57 -07:00
Ryan Nowak
b71d5da05e
Fix test break due to 405 returned from routing
2018-07-24 22:15:32 -07:00
James Newton-King
c08504b08a
MVC startup experience ( #8131 )
2018-07-25 14:30:51 +12:00
Kiran Challa
630aeade07
Added tests related to generating urls with route name
2018-07-24 15:06:16 -07:00
Alexej Timonin
52c1e942c6
Added UseCamelCasing and UseMemberCasing extension methods to MvcJsonOptions ( #7256 )
2018-07-23 10:11:04 -07:00
Ryan Nowak
196e3f109f
React to Routing branding
...
This is a reaction PR for the branding changes in progress in Routing.
This can be merged after the changes to in to Routing.
2018-07-22 19:47:15 -07:00
kishan.anem
c0ba374549
Custom error messages with validation message tag helper #8035
...
#8035
PR #8087
https://github.com/aspnet/Razor/issues/2497
2018-07-22 17:55:06 +05:30
Kiran Challa
e1e7ec0f28
Enable couple of skipped Dispatching functional tests
2018-07-21 04:44:38 -07:00
Alexej Timonin
d4beab5d09
CompositeValidationAttribute
...
- Add abstract CompositeValidationAttribute.
- Change DataAnnotationsMetadataProvider.CreateValidationMetadata to
populate ValidatorMetadata with validation attributes from CompositeValidationAttribute.
2018-07-20 15:31:14 -07:00
Ryan Nowak
5c488bf09c
make feature branch build
2018-07-20 12:57:43 -07:00
Ryan Nowak
3ba6f35495
React to RoutePattern changes in Routing
2018-07-20 12:57:43 -07:00
Kristian Hellang
53930af0e3
Set ProblemDetails status field during ObjectResult formatting
2018-07-19 17:57:55 -07:00
James Newton-King
36d90c9bc2
Run request service constraint test with dispatching ( #8112 )
2018-07-19 16:43:51 +12:00