Commit Graph

69 Commits

Author SHA1 Message Date
Pranav K 8d66f104f7 Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal 2018-11-08 14:00:16 -08:00
Doug Bunting 5bddd226a3
Use Internal.AspNetCore.Sdk as an MSBuild SDK
- should resolve issues with occasional strange MSBuild caching issues in this repo
- modeled after aspnet/Scaffolding#905
- follows aspnet/BuildTools#729 recommendation to check in global.config file
  - see also Microsoft/msbuild#2914
- use newer KoreBuild
  - `.\build.cmd -update /t:noop`
2018-10-04 15:12:38 -07:00
Pranav K 9c424b7b02
Use content-type specified by ProducesAttribute if no formatter supports it
This allows users to use `ProducesAttribute` to specify the content-type
for action results such as FileStreamResult where the result determines the content type
and the specified value is informational.

Fixes https://github.com/aspnet/Mvc/issues/5701
2018-09-19 13:51:31 -07:00
Pranav K cb88e906b2 Allow ProducesAttribute to apply along with conventions
Fixes #8389
2018-09-12 13:58:02 -07:00
Simon Cropp 43d4416a1d Fix typos (#8413) 2018-09-12 09:34:45 -07:00
Simon Cropp b156dee4f1 Fix some spelling (#8378) 2018-09-06 07:39:01 -07:00
Pranav K f90a47c5af
Introduce ProducesErrorResponseTypeAttribute
Fixes https://github.com/aspnet/Mvc/issues/8288
2018-08-30 11:24:03 -07:00
Pranav K e2b6f07778 Respect LowercaseUrls in ApiExplorer
Fixes #8006
2018-08-02 14:58:41 -07:00
Pranav K 0102d4efab
Introduce ApiConventionMethodAttribute
Fixes #8147
2018-07-30 11:13:25 -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
Nathanael Marchand 133d49c57e
Fix Api Explorer not returning type with ActionResult<T> and no type in ProducesResponseTypeAttribute 2018-06-29 13:55:30 -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 6911e192e4
Add IsRequired and DefaultValue to ApiParameterDescription 2018-06-22 06:51:58 -07:00
Pranav K 6c2ef122f8 Add support for conventions in DefaultApiDescriptionProvider 2018-06-11 16:07:09 -07:00
Pranav K e1eaf6a6e0
Cleanup TestCommon 2018-05-18 10:45:57 -07:00
Ryan Nowak c93c168df3 Add mapping service for action results
This allows the use of custom 'envelope' types like ActionResult<> with
a corresponding API Explorer implementation.

Basically this PR services to decouple a bunch of infrastructure from
ActionResult<>.
2018-03-27 17:13:41 -07:00
Doug Bunting 5e245da326
Add compatibility switch controlling parameter metadata and top-level validation
- #7413 part 1 of 2
- made all `ModelMetadataProvider` and `ObjectModelValidator`-specific code conditional
  - fortunately, `MvcOptions` easy to get; affected code is primarily `internal` or pub-`Internal`
  - remove unnecessary `ModelMetadataProvider` use in `ApiBehaviorApplicationModelProvider`
- run integration and functional tests with `CompatibilityVersion.Version_2_1`
  - functional test change depends on @javiercn's recent #7541 fix
  - remove test code now redundantly turning compatibility switches on

nits:
- correct spelling errors in `CompatibilitySwitch`
- take VS suggestions, mostly in test code
- rename methods in `ControllerBinderDelegateProviderTest` to match current API
- slightly refactor in `ApiBehaviorApplicationModelProvider`
2018-03-26 12:29:04 -07:00
Kiran Challa 09b5ff7b72 Use ParameterInfo for getting metadata of a parameter to show the correct information in ApiExplorer
[Fixes #7435] 2.1-Preview 1: IsBindingRequired and IsRequired still false with RequiredAttribute on controller parameter.
2018-03-19 11:50:19 -07:00
Pranav K ebdb3c650a Smooth rough ApiBehavior edges
Fixes #7262
2018-01-22 09:53:21 -08:00
Pranav K b6144142fe Update samples and tests to target netcoreapp2.1 2017-11-13 14:58:40 -08:00
Pranav K ab4c519dd5 Infer multipart/form-data for FromFile parameters 2017-11-02 09:36:31 -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 63397653fa Make DefaultApiDescriptionProvider understand ActionResult<T>
Fixes #6784
2017-09-11 14:20:38 -07:00
Nate McMaster b43b244830 Use Directory.Build.props/targets 2017-08-16 12:30:13 -07:00
Ryan Brandenburg 03404cd3df Return to NetStandard 2017-05-25 10:34:16 -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
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
Nate McMaster 6f7717a381 Unify dependency versions to one file 2017-03-15 16:54:32 -07:00
N. Taylor Mullen acfad83aa6 Migrate to MSBuild
- thanx to @NTaylorMullen for initial conversion
  - e.g. AssemblyInfo.cs files were already minimized or removed :)
- allow `>=` RC3 CLI's to build and run MVC
- work around several dotnet migration issues; see #5482
- disable full .NET Framework runs of functional tests; see #5873
- remove `Microsoft.DotNet.InternalAbstractions` and `System.Xml.XmlDocument` dependencies
- remove project.json (!!), *.xproj, .notest, and web.config files

Redo earlier changes:
- apply test migration to .NET 4.5.2 in *.csproj world
  - see 63507c8 for previous, project.json work
- apply dependency version downgrade from 0097e40 in *.csproj world

Make other test-related changes:
- make Microsoft.AspNetCore.Mvc.TestDiagnosticListener a regular class library
- add support for `/p:GenerateBaselines=true` for functional and Razor.Host tests
- separate `GetCSharpTypeName_ReturnsCorrectTypeNames_ForOutParameter()` test
  - work around inability to deserialize a odd `ref` type
  - xUnit and vstest now serialize / deserialze test data more often
- skip poor test mentioned in #5768
- work around Microsoft/vstest#392
  - rename tests to avoid duplicates
- work around Microsoft/vstest#419
  - set up created `AppDomain`s with current `ApplicationBase`
2017-02-28 21:20:39 -08:00
Doug Bunting 63507c8da9 Bump test projects up to .NET 4.5.2
- aspnet/Testing#248
- xUnit no longer supports .NET 4.5.1
- update AppVeyor config so this framework version is available
- build tests for desktop .NET only on Windows
2017-02-21 07:15:36 -08:00
Nate McMaster 0097e40e46 Downgrade to stable packages 2017-02-15 14:23:48 -08:00
Jass Bagga 07c22f2b29 Mutate API description parameter type from JsonPatchDocument to Operation[]
Addresses #5464
2017-01-13 16:39:08 -08:00
Pranav K 2b50ec99df Updating to 4.4 CoreFx packages 2016-12-21 16:47:14 -08:00
Pranav K 5b2a4aecb6 Make Microsoft.AspNetCore.Mvc.TestCommon a regular project
* This allows specifying all it's dependencies rather than for consuming projects to do this
* Remove unused APIs
* Fix weird downgrade warnings that show up due to P2P references
2016-11-23 16:23:56 -08:00
Pranav K 1506a44cd5 Fix downgrade warnings 2016-11-10 09:22:11 -08:00
Pranav K b82969a557 Updating versions to 1.2.0-* 2016-11-09 14:18:46 -08:00
Jass Bagga 79e576b86c ProducesResponseTypeAttribute(int statusCode) ctor added
Addresses #4863
2016-10-19 17:08:06 -07:00
Pranav K a52d692de0 Updating to netcoreapp1.1 2016-10-13 11:21:09 -07:00
Pranav K ed1378a365 Revert "Updating to netcoreapp1.1"
This reverts commit 398a104810.
2016-10-12 16:09:12 -07:00
Pranav K 398a104810 Updating to netcoreapp1.1 2016-10-12 14:24:52 -07:00
jbagga 41f00eea23 Default Status Code for void types changed to 200
Fixes #4838
2016-10-06 14:39:04 -07:00
Pranav K 6fe683c585 Add Microsoft.DotNet.InternalAbstractions to fix tests 2016-10-04 10:11:09 -07:00
Pranav K 6d235e4ef5 Update partner package versions 2016-10-03 14:27:20 -07:00
Pranav K 67dce322df Updating to Moq \ Castle.Core that does not require imports 2016-08-08 12:20:14 -07:00
Doug Bunting 7430efa8cc One build to rule them all
- well, at least VS and command-line builds will share output
- part of aspnet/Coherence-Signed#277
2016-07-06 16:21:18 -07:00
Pranav K 222165e145 Updating to RTM builds of xunit and Moq (#4946) 2016-07-05 20:58:16 -07:00
Pranav K cd7954a164 Updating to dev versions 2016-06-16 10:40:11 -07:00