Doug Bunting
1da7a89f59
Add `ErrorContext.Member` to `ErrorContext.Path` when clearly needed
...
- #8509
nits:
- use `ModelNames.CreatePropertyModelName(...)`
- move `exception` assignment up and reuse that variable
2018-11-16 16:30:43 -08:00
Nate McMaster
f5aae26b44
Update projects and packages to target netcoreapp3.0 ( aspnet/Mvc#8734 )
2018-11-16 16:28:35 -08:00
James Newton-King
6270ea48a6
Refactor MVC endpoint integration for templates ( #8695 )
2018-11-15 17:04:26 +13:00
Doug Bunting
8308d94e39
Quick fixes: Make `dotnet-getdocument` more reliable ( #8716 )
...
- use `WaitAny(...)` in inside man
- call `Process.WaitForExit()` twice
- `Flush()` all output `FileStream`s before disposal
- catch `UnauthorizedAccessException` when calling `File.Delete(...)` in case file's in use
- add `/nr:false` to `dotnet msbuild` command line
2018-11-12 11:26:02 -08:00
Pranav K
195a22d92c
Move pubinternal to internal in CORS, DataAnnotations, Formatters, TagHelpers
2018-11-12 10:27:26 -08:00
Pranav K
fcf5593813
Remove additional exe produced as part of updating to 3.0 SDK
...
Fixes https://github.com/aspnet/Mvc/issues/8681
2018-11-09 15:52:58 -08:00
Pranav K
f734efe2e7
Move pubinternal types in Mvc.Razor and Mvc.RazorPages to internal
2018-11-09 15:00:38 -08:00
Pranav K
ecb7edadc8
Remove WebApiCompatShim
2018-11-09 14:32:28 -08:00
Pranav K
b18526cdc8
Make types in Microsoft.AspNetCore.Mvc.ViewFeatures internal
2018-11-09 11:14:19 -08:00
Pranav K
8d66f104f7
Make types in Microsoft.AspNetCore.Mvc.Internal namespace internal
2018-11-08 14:00:16 -08:00
Pranav K
17ed44c868
React to Razor.Design package removal ( #8680 )
...
* React to Razor.Design package removal
* Remove references to packages (Razor.Design, Razor.Extensions) solely used to bring in compiler \ targets
* Target netcoreapp3.0 in samples and tests to allow Sdk to infer values
2018-10-31 15:38:22 -07:00
Doug Bunting
e4292c236c
Merge pull request #8682 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-31 14:47:16 -07:00
Doug Bunting
a6199bbfba
Add integration and functional tests of `[BindRequired]` on page properties ( #8677 )
...
- #7353
2018-10-31 14:15:14 -07:00
Pranav K
f2af66bc31
Cleanup InferParameterBindingInfoConvention ( #8665 )
...
* Cleanup InferParameterBindingInfoConvention
* Infer BindingSource for collection parameters as Body. Fixes https://github.com/aspnet/Mvc/issues/8536
* Introduce a compat switch to keep 2.1.x LTS behavior for collection parameters
* Do not infer BinderModelName in InferParameterBindingInfoConvention
2018-10-31 12:24:37 -07:00
Doug Bunting
579341c8d6
Merge branch 'master' into merge/release/2.2-to-master
2018-10-30 21:08:15 -07:00
Doug Bunting
c74a945dda
Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture` ( #8674 )
...
* Convert `RouteValueDictionary` values to `string` using `CultureInfo.InvariantCulture`
- #8578
- user may override this choice in one case:
- register a custom `IValueProviderFactory` to pass another `CultureInfo` into the `RouteValueProvider`
- values are used as programmatic tokens outside `RouteValueProvider`
nits:
- take VS suggestions in changed classes
- take VS suggestions in files I had open :)
2018-10-30 20:09:17 -07:00
Pranav K
734b919b02
Respect SuppressInferBindingSourcesForParameters
...
Fixes https://github.com/aspnet/Mvc/issues/8657
2018-10-30 14:37:21 -07:00
Pranav K
16b15fcb2a
Merge pull request #8672 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-30 13:33:07 -07:00
Piotr Wosiek
af6527dcef
Fix XML doc on HttpMethodAttribute and derived ones
2018-10-30 13:21:15 -07:00
Pranav K
4015c9863e
Merge pull request #8664 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-29 12:54:42 -07:00
Pranav K
13cf754425
Merge pull request #8663 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-29 09:59:34 -07:00
Pranav K
35d2ab37f7
Allow passing a dictionary to ValidationProblemDetails
...
Fixes https://github.com/aspnet/Mvc/issues/8645
2018-10-29 09:56:17 -07:00
Pranav K
ccde910b29
Specify TaskCreationOptions when using TCS
...
Fixes https://github.com/aspnet/Mvc/issues/8558
2018-10-29 09:33:05 -07:00
Doug Bunting
0cea1b2a5f
Merge pull request #8656 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-27 16:53:19 -07:00
Doug Bunting
37e562902f
Support single `IDocumentProvider` method signature
...
- #8593
- also find `IDocumentProvider` using a more-laborious process
- `Type.GetType(string)` requires an assembly-qualified name and we don't know the assembly
- default method name now `GenerateAsync`
- only supported signature is `public Task GenerateAsync(string, TextWriter)`
also:
- handle more error cases in the tool's inside man
- avoid an empty document file if `IDocumentProvider.GenerateAsync(...)` fails
- unwrap an `AggregateException`
nits:
- remove duplicate comments
- change `GetDocumentCommandWorker.TryProcess(...)` to return `false` on failure
- minor because return value is currently ignored
- rename `GetDocumentCommandContext.Output` -> `OutputPath`
- reflect recent change to `dotnet-getdocument`'s `Resources.resx` file in its designer file
2018-10-27 15:27:33 -07:00
James Newton-King
1c61f3538e
Merge release/2.2
2018-10-27 11:56:04 +13:00
James Newton-King
6bb292cfcc
Add test for metadata precedence ( #8642 )
2018-10-27 07:59:15 +13:00
Pranav K
ce11eb9b71
Merge pull request #8641 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-24 11:19:50 -07:00
Pranav K
2544926b2f
Provide a convenience API to configure ApiBehaviorOptions
2018-10-24 10:10:33 -07:00
James Newton-King
79117fa08a
Merge 2.2 to master
2018-10-23 22:04:56 +13:00
James Newton-King
40959a97e7
Fix link generation of routes with default values ( #8616 )
2018-10-23 16:10:43 +13:00
James Newton-King
e9737a90e5
Endpoing routing 3.0 registration ( #8470 )
2018-10-23 14:04:12 +13:00
Ryan Nowak
a3e999762f
Merge pull request #8630 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-22 07:58:36 -07:00
Ryan Nowak
76a30b0911
Remove LinkGenerationTemplate
...
This doesn't really accomplish our goals for 2.2 - I don't have a clear
scenario where I would tell a developer to use this VS something else.
Will reevaluate in 3.0
2018-10-21 15:39:59 -07:00
Pranav K
79458c16fd
Merge pull request #8626 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-19 13:57:59 -07:00
Patrick Westerhoff
ddbe0fef26
Allow custom handling of antiforgery failures
...
To enable custom handling of antiforgery validation failures, use an
`AntiforgeryValidationFailedResult` which is just a `BadRequestResult`
but allows to be identified explicitly inside always-running result
filters using the `IAntiforgeryValidationFailedResult` marker interface.
2018-10-19 13:47:08 -07:00
Pranav K
8a183bb4f4
Allow serving Razor files with leading underscore
...
Fixes https://github.com/aspnet/Mvc/issues/8617
2018-10-19 13:43:35 -07:00
Pranav K
1c1aabc605
Merge branch 'master' into merge/release/2.2-to-master
2018-10-17 16:22:55 -07:00
Pranav K
27e75e7a51
Add a switch to allow turning on ValidationVisitor shortcircuiting ( #8599 )
2018-10-17 15:47:01 -07:00
Ryan Nowak
5502c43159
Merge pull request #8610 from dotnet-maestro-bot/merge/release/2.2-to-master
...
[automated] Merge branch 'release/2.2' => 'master'
2018-10-16 13:35:46 -07:00
Ryan Nowak
a2a8a5ce36
Merge pull request #8598 from aspnet/rynowak/compat-version-docs
...
Update docs for compat switch value
2018-10-15 17:04:17 -07:00
Ryan Nowak
c421178a22
Update docs for compat switch value
2018-10-15 07:43:18 -07:00
Pranav K
5f42d5063e
Merge remote-tracking branch 'origin/release/2.2'
2018-10-12 15:58:08 -07:00
Pranav K
fb57810f29
Shortcircuit validation when using default validator providers and no validation metadata is discovered
...
Fixes https://github.com/aspnet/Mvc/issues/5887
2018-10-12 14:47:06 -07:00
Pranav K
a40c1f2d02
Use compat flag to drive XML ProblemDetails formatting
2018-10-12 14:15:28 -07:00
Pranav K
164d14064c
Use casing for ProblemDetails that specified by RFC
...
* Use JsonProperty.MemberName to specify lowercase casing for ProblemDetails properties -
https://tools.ietf.org/html/rfc7807#section-3
* Use XML NS and lowercase for Xml elements specified by RFC -
https://tools.ietf.org/html/rfc7807#appendix-A
Fixes https://github.com/aspnet/Mvc/issues/8501
2018-10-12 14:15:28 -07:00
Doug Bunting
d3c8d171bd
Fix builds that do real signing e.g. UniverseCoherence
2018-10-11 21:13:23 -07:00
Doug Bunting
8c58fdb755
Add Newtonsoft.Json.dll to Microsoft.Extensions.ApiDescription.Design package
...
- also remove dotnet-getdocument.runtimeconfig.dev.json file
2018-10-11 15:51:20 -07:00
Turner Bass
05d729b409
UrlHelperBase L166-167 declared type of url in TryFastGenerateUrl
2018-10-11 15:41:14 -07:00
Doug Bunting
5cd86977ed
Rename client code generation components
...
- #8523
- main project / package --> `Microsoft.Extensions.ApiDescription.Design`
- tasks assembly and namespace --> `Microsoft.Extensions.ApiDescription.Tasks`
- tool namespace --> `Microsoft.Extensions.ApiDescription.Tool`
- targets --> verbs e.g. `GenerateTypeScriptNSwag` and `GenerateDocumentDefault`
- `@(ServiceProjectReference)` metadata -> align with common MSBuild project properties
- exception: `$(MSBuildProjectExtensionsPath)`; it's readonly and `%(ProjectExtensionsPath)` is unambiguous
- use `%(ProjectExtensionsPath)`
- also add `%(Targets)` metadata and remove unused `%(ProjectRuntimeIdentifier)`
- `@(<ServiceProjectReferenceMetadata)` metadata -> align with MSBuild project properties
- exceptions: `$(MSBuildProjectDirectory)`, `$(MSBuildProjectExtensionsPath)` and `$(MSBuildProjectName)`
- readonly properties and names already unambiguous
2018-10-10 14:52:57 -07:00