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
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
Kiran Challa
630aeade07
Added tests related to generating urls with route name
2018-07-24 15:06:16 -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
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
ec8976ffaf
Update MvcEndpointDataSource on raised change token ( #8108 )
2018-07-19 16:43:24 +12:00
Doug Bunting
35fad0881b
Mark unused `ParameterBinder.BindModelAsync(...)` overloads as `[Obsolete]`
...
- #7660
- also addresses part of #7317 , only in `ComplexTypeModelBinderIntegrationTest`
2018-07-13 13:26:56 -07:00
Doug Bunting
f2608c2ff4
Do not suppress `ModelValidationState.Invalid` entries
...
- #7992 , #7963
2018-07-13 13:21:43 -07:00
James Newton-King
f12f9b46ed
Add startup filter to set MiddlewareFilterBuilder.ApplicationBuilder
2018-07-13 12:23:30 +12:00
Hao Kung
a5083d525b
Fix regression with Authorize + IPolicyProvider ( #8068 )
2018-07-12 15:36:03 -07:00
Pranav K
46189abda7
Refactoring for ApiConvention analyzers
2018-07-12 14:26:27 -07:00
James Newton-King
a67d9363e2
Consumes endpoint constraint ( #8057 )
2018-07-12 16:35:33 +12:00
James Newton-King
183ecd85d6
Fix MVC integration with UseEndpoint ( #8047 )
2018-07-11 11:47:33 +12:00
Kiran Challa
0812279464
Merge branch 'release/2.1' into kichalla/21.to.22.mergecommit
...
# Conflicts:
# build/dependencies.props
# korebuild-lock.txt
# src/Microsoft.AspNetCore.Mvc.ApiExplorer/DefaultApiDescriptionProvider.cs
# test/Microsoft.AspNetCore.Mvc.Core.Test/Internal/ApiBehaviorApplicationModelProviderTest.cs
# version.props
2018-07-09 13:00:10 -07:00
Kiran Challa
bd995d4cb1
[ Fixes #7959 ] Conventional routing with custom templates not working when you have area attributes
2018-07-09 12:35:14 -07:00
Pranav K
d2bb674b0a
Add support for default response ( #8028 )
...
* Add support for default response
Fixes #6828
2018-07-06 16:44:07 -07:00
Pranav K
335500ab0e
Use ModelMetadata from actual types for validation
...
Fixes https://github.com/aspnet/Mvc/issues/7952
2018-07-02 11:23:16 -07:00
Kiran Challa
54c14b8782
Reacting to Routing repo's EndpointFinder changes
2018-06-28 12:40:04 -07:00
kishanAnem
e1af5b8b6d
Array or List in query string does not get parsed #7712 ( #7967 )
...
- exclude collections when detecting complex types in `ApiBehaviorApplicationModelProvider`
- add test cases
2018-06-26 11:43:46 -07:00
Pranav K
94a7c83998
Change DefaultApiConventions ( #7939 )
...
* Change DefaultApiConventions
* Introduce attributes for matching by name and type.
* Move discovery of ApiConventionAttribute to ApiBehaviorApplicationModelProvider. This is required
for us to detect during startup if the convention is incorrectly authored.
2018-06-25 08:24:30 -07:00
Pranav K
17d2545b55
Throw if the type parameter for ActionResult<T> is an action result ( #7942 )
...
Fixes #7931
2018-06-21 07:51:12 -07:00
James Newton-King
3547341762
Add support for conventional routes with dispatching ( #7928 )
2018-06-20 09:02:52 +12:00
Kiran Challa
a0a9c2c585
Integrate Dispatcher's link generator
...
Related to https://github.com/aspnet/Routing/issues/530
2018-06-19 04:14:05 -07:00
James Newton-King
a7406d4497
Add MvcEndpointDataSource and functional tests ( #7886 )
2018-06-14 11:03:45 +12:00
Pranav K
6c2ef122f8
Add support for conventions in DefaultApiDescriptionProvider
2018-06-11 16:07:09 -07:00
Kiran Challa
2d63669695
[ Fixes #7609 ] ApiBehaviorApplicationModelProvider overwrites existing BindingInfo in entirety when inferring binding sources
2018-05-30 05:30:10 -07:00
Pranav K
984cd46c4d
Fix ActionMethodExecutor incorrectly setting DeclaredType on ObjectResult
...
Fixes #7782
2018-05-29 14:35:42 -07:00
Pranav K
632425d0e6
Unskip skipped tests
2018-05-29 12:10:59 -07:00
Kiran Challa
418aac57f4
[ Fixes #7609 ] ApiBehaviorApplicationModelProvider overwrites existing BindingInfo in entirety when inferring binding sources
2018-05-24 14:28:42 -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
624a5ed522
Fix ActionMethodExecutor incorrectly setting DeclaredType on ObjectResult
...
Fixes #7782
2018-05-18 10:43:28 -07:00
Pranav K
777782ac6e
Test cleanup
2018-05-03 16:03:42 -07:00
Pranav K
5d5222cdd8
Introduce BindPropertiesAttribute
...
* Allow controller and Razor Page models to be annotated with BindPropertiesAttribute
* Disallow BindPropertyAttribute from being declared on types.
* Do not allow arbitrary binding attributes to be applied to Razor Page models.
Fixes #7686
2018-04-20 14:32:14 -07:00
Kiran Challa
4f7d53f4e7
[ Fixes #7658 ] FileStreamResultExecutor fails to Dispose FileStream
2018-04-18 11:43:09 -07:00
Doug Bunting
e0e96ce53b
Include parameter type's attributes in ModelMetadata
...
- #7595
- #7595 relates to #7350 but does not have the same root cause
- did _not_ revert the src changes in #7350 fix (d995b0418a )
- make non-`[Obsolete]` `ModelAttributes` constructor overload `internal`
- should generally use `static` methods and not any constructor
- change some unit tests to use `[Obsolete]` constructor overloads (with suppressions)
- fix test `ParameterBinderExtensions` to use current `ParameterBinder.BindModelAsync(...)` overload
- found some tests updated `IModelMetadataProvider`, `MvcOptions`, etc. instances but didn't register them in DI
- extend `ModelBindingTestHelper` and `ModelBindingTestContext`
- reorder some tests to use correct `MvcOptions` and `IModelMetadataProvider` everywhere
- fixes above issues
nits:
- take a few VS suggestions
- remove an old comment indended only for PR "Reviewers:"
2018-04-17 12:40:38 -07:00
Pranav K
d8fc2d4009
Fix test failures
...
* Disable deps file generation in class library project. This workarounds known issue - https://github.com/dotnet/core-setup/issues/3726
* Update RazorProjectRouteModelProvider to not specify a trailing slash. This produces paths with a single slash as opposed to two slashes messing with route creation.
* React to Microsoft.AspNetCore.Mvc.Razor.Extensions.Reference that shows up in the deps file.
2018-04-15 16:31:41 -07:00
Doug Bunting
cc5ae02b7d
Fix binding & validating dictionaries of non-simple types in jQuery requests
...
- #7423
- retry failed inner bindings with alternate syntax in `ModelStateDictionary`
- use property syntax if first attempt tried index syntax and visa versa
- instantiate `ShortFormDictionaryValidationStrategy` with full `ModelState` keys
- can now provide exact `ModelState` keys that `ModelStateDictionary` used in inner bindings
- normalize model names without a leading period in `JQueryKeyValuePairNormalizer`
nits:
- take a few VS suggestions
2018-04-14 10:41:00 -07:00
Kiran Challa
e52933e4e3
Removed UrlTestEncoder references in tests
...
This is because with the following commit, Routing no longer depends on DI to get a UrlEncoder and always uses UrlEncoder.Default.
4184b2406d
2018-04-14 06:08:20 -07:00
Pranav K
d995b0418a
Allow BindPropertyAttribute to be specified on controller classes
...
Fixes #7350
2018-04-13 13:58:44 -07:00
John Luo
c35030267c
Update usage of TestSink
2018-04-13 10:21:41 -07:00
Pranav K
e34b4e8335
Use DependencyContext.CompileLibraries to determine dependency graph ( #7626 )
...
* Use DependencyContext.CompileLibraries to determine dependency graph
Fixes https://github.com/aspnet/Mvc/issues/7617
2018-04-11 15:57:11 -07:00
Kiran Challa
62272ad56a
Round off file result's LastModifiedDate to whole seconds for correct comparison with http header dates
...
[Fixes #7572 ] PhysicalFileResult does not respond 304 Not Modified
2018-04-11 06:43:50 -07:00
Pranav K
ec31ff0c28
Throw if multiple Body bound parameters are discovered
...
Fixes #6963
2018-04-09 11:20:34 -07:00
Pranav K
5e019bd707
Add Microsoft.AspNetCore.All
...
Fixes https://github.com/aspnet/Mvc/issues/7605
2018-04-06 10:57:59 -07:00
Pranav K
c515cece8e
Use ModelMetadataProvider to infer BindingSource on application model
2018-04-02 09:48:49 -07:00