Commit Graph

19 Commits

Author SHA1 Message Date
Pranav K 5bd818bd64
Introduce ProblemDetailsFilter
Fixes https://github.com/aspnet/Mvc/issues/6786
2018-08-21 17:29:12 -07:00
Ryan Nowak 2b289d2f2c Use MatcherPolicy for Consumes 2018-08-01 19:05:04 -07:00
Ryan Nowak fbae57cde1 React to the removal of EndpointConstraint 2018-07-28 19:03:16 -07:00
James Newton-King f12f9b46ed
Add startup filter to set MiddlewareFilterBuilder.ApplicationBuilder 2018-07-13 12:23:30 +12:00
James Newton-King a7406d4497
Add MvcEndpointDataSource and functional tests (#7886) 2018-06-14 11:03:45 +12:00
Pranav K e1eaf6a6e0
Cleanup TestCommon 2018-05-18 10:45:57 -07:00
Pranav K dbff416be6 Add support for running conventions on controller properties, Razor Page parameter and properties
Fixes #6935
2018-01-29 11:43:25 -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
Kiran Challa 821daa5ad0 [Fixes #7085] ApplicationModelConventionExtensions should make a copy of collections when iterating them 2017-12-12 14:03:35 -08: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 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
Jass Bagga b4fe715c71 Revert breaking change (#6519)
Addresses #6518
2017-07-07 17:09:36 -07:00
Jass Bagga 9146fce4ec Add extension method for IParameterModelConvention. (#5640) 2016-12-27 16:49:12 -08:00
Doug Bunting 48546dbb28 Add more to `MvcCoreServiceCollectionExtensionsTest`
- 2nd half of #5554
- follow-on to #5540 PR
2016-12-05 20:05:24 -08:00
Ryan Nowak b80f4d31f3 Add a test to verify our service lifetimes
This test uses the new features in the service provider to verify that we
don't reference any scoped services from singletons.

Note that this can't really cover the cases where we have optional
services or where we replace default services (like DI for controllers).
You'll just have to be careful.
2016-07-20 17:10:52 -07:00
jacalvar 0d0aad41f5 [Fixes #4014] Add overload to AddControllerAsServices that uses the default controller discovery logic.
* Added ControllerFeature and ControllerFeatureProvider to perform controller discovery.
* Changed controller discovery to use application parts.
* Changed ControllerActionDescriptorProvider to make use of Application parts.
* Simplified AddControllerAsServices to not accept any parameter and perform
  controller discovery through the ApplicationPartManager in the IMvcBuilder
  and IMvcCoreBuilder. Assemblies should be added to the ApplicationPartManager
  in order to discover controllers in them.
2016-04-01 09:29:37 -07:00
jacalvar 1bd66ffda0 [Fixes #4089] Add support for application parts
This commit introduces application parts as a concept on MVC.

An application part is an abstraction that allows you to expose some
feature or corncern in a way that is decoupled from their underlying source.
Examples of this include types in an assembly, emdeded resources, files on
disk etc.

Application parts are configured during startup by adding or removing them from
the application part manager available as part of IMvcBuilder and IMvcCoreBuilder.

The application part manager provides the ability to populate features from the
list of available application parts by using a list of application feature providers.
Application feature providers are responsible for populating a given feature given a
list of application parts.

Examples of application providers can be a ControllerFeatureProvider
that goes through the list of application parts, sees which one of those parts exposes types,
determines which of those types are controller types, and adds them to a ControllerFeature
that holds a list of all the types that will be considered controllers in the application.
2016-03-31 12:14:04 -07:00
N. Taylor Mullen 3be7fbdf9f Rename AspNet 5 file contents.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:18:33 -08:00
N. Taylor Mullen 6a6c8ca544 Rename AspNet 5 folders and files.
See https://github.com/aspnet/Announcements/issues/144 for more information.
2016-01-22 12:17:07 -08:00