-
-
Notifications
You must be signed in to change notification settings - Fork 158
Use Mvc.Core
instead of Mvc
#300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
443e039
bbe0375
ad39fd7
9c45cb5
2390669
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4,28 +4,27 @@ | |||||
<NetCoreAppVersion>netcoreapp2.0</NetCoreAppVersion> | ||||||
<NetStandardVersion>netstandard2.0</NetStandardVersion> | ||||||
|
||||||
<AspNetCoreVersion>2.0.1</AspNetCoreVersion> | ||||||
<AspNetCoreVersion>2.1.0</AspNetCoreVersion> | ||||||
|
||||||
<MicrosoftLoggingVersion>2.0.0</MicrosoftLoggingVersion> | ||||||
<MicrosoftConfigurationVersion>2.0.0</MicrosoftConfigurationVersion> | ||||||
<MicrosoftOptionsVersion>2.0.0</MicrosoftOptionsVersion> | ||||||
<MicrosoftLoggingVersion>2.1.0</MicrosoftLoggingVersion> | ||||||
<MicrosoftConfigurationVersion>2.1.0</MicrosoftConfigurationVersion> | ||||||
<MicrosoftOptionsVersion>2.1.0</MicrosoftOptionsVersion> | ||||||
|
||||||
<EFCoreVersion>2.0.1</EFCoreVersion> | ||||||
<EFCoreToolsVersion>2.0.1</EFCoreToolsVersion> | ||||||
<EFCoreVersion>2.1.0</EFCoreVersion> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test is failing because of this. We do some reflection on EF APIs to check the actual SQL output of queries ( JsonApiDotNetCore/test/JsonApiDotNetCoreExampleTests/Helpers/Extensions/IQueryableExtensions.cs Line 19 in 3fc1099
JsonApiDotNetCore/test/JsonApiDotNetCoreExampleTests/Acceptance/Spec/SparseFieldSetTests.cs Line 56 in 3fc1099
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. #302 has a fix for this and includes the tests for the prior frameworks. I'll probably merge that in tonight and then you can rebase onto those changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I decided to hold on #302 for now. I'm going to merge this in and get a release started. |
||||||
<EFCoreToolsVersion>2.1.0</EFCoreToolsVersion> | ||||||
|
||||||
<NpgsqlVersion>3.2.6</NpgsqlVersion> | ||||||
<NpgsqlPostgreSQLVersion>2.0.0</NpgsqlPostgreSQLVersion> | ||||||
<NpgsqlVersion>4.0.0</NpgsqlVersion> | ||||||
<NpgsqlPostgreSQLVersion>2.1.0</NpgsqlPostgreSQLVersion> | ||||||
|
||||||
<TuplesVersion>4.4.0</TuplesVersion> | ||||||
<TuplesVersion>4.5.0</TuplesVersion> | ||||||
</PropertyGroup> | ||||||
|
||||||
<!-- Test Project Dependencies --> | ||||||
<PropertyGroup> | ||||||
<TestSdkVersion>15.3.0-preview-20170427-09</TestSdkVersion> | ||||||
<TestHostVersion>1.1.2</TestHostVersion> | ||||||
<XUnitVersion>2.3.0-beta3-build3705</XUnitVersion> | ||||||
<BogusVersion>15.0.3</BogusVersion> | ||||||
<MoqVersion>4.7.99</MoqVersion> | ||||||
<TestSdkVersion>15.7.2</TestSdkVersion> | ||||||
<XUnitVersion>2.3.1</XUnitVersion> | ||||||
<BogusVersion>22.1.2</BogusVersion> | ||||||
<MoqVersion>4.8.3</MoqVersion> | ||||||
</PropertyGroup> | ||||||
|
||||||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ namespace JsonApiDotNetCoreExample.Controllers.Restricted | |
{ | ||
[Route("[controller]")] | ||
[HttpReadOnly] | ||
public class ReadOnlyController : Controller | ||
public class ReadOnlyController : ControllerBase | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you! I've been wanting to do this for a while. I don't think anyone is generating views via their JADNC controllers, but if they are this would be a breaking change 🤔 ... I think this is the right direction. Just wondering about versioning. |
||
{ | ||
[HttpGet] | ||
public IActionResult Get() => Ok(); | ||
|
@@ -22,7 +22,7 @@ public class ReadOnlyController : Controller | |
|
||
[Route("[controller]")] | ||
[NoHttpPost] | ||
public class NoHttpPostController : Controller | ||
public class NoHttpPostController : ControllerBase | ||
{ | ||
[HttpGet] | ||
public IActionResult Get() => Ok(); | ||
|
@@ -39,7 +39,7 @@ public class NoHttpPostController : Controller | |
|
||
[Route("[controller]")] | ||
[NoHttpPatch] | ||
public class NoHttpPatchController : Controller | ||
public class NoHttpPatchController : ControllerBase | ||
{ | ||
[HttpGet] | ||
public IActionResult Get() => Ok(); | ||
|
@@ -56,7 +56,7 @@ public class NoHttpPatchController : Controller | |
|
||
[Route("[controller]")] | ||
[NoHttpDelete] | ||
public class NoHttpDeleteController : Controller | ||
public class NoHttpDeleteController : ControllerBase | ||
{ | ||
[HttpGet] | ||
public IActionResult Get() => Ok(); | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ public class CustomErrorTests | |
public void Can_Return_Custom_Error_Types() | ||
{ | ||
// arrange | ||
var error = new CustomError("507", "title", "detail", "custom"); | ||
var error = new CustomError(507, "title", "detail", "custom"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
var errorCollection = new ErrorCollection(); | ||
errorCollection.Add(error); | ||
|
||
|
@@ -36,7 +36,7 @@ public void Can_Return_Custom_Error_Types() | |
} | ||
|
||
class CustomError : Error { | ||
public CustomError(string status, string title, string detail, string myProp) | ||
public CustomError(int status, string title, string detail, string myProp) | ||
: base(status, title, detail) | ||
{ | ||
MyCustomProperty = myProp; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,7 +131,7 @@ public async Task Can_Filter_On_Not_Equal_Values() | |
|
||
// assert | ||
Assert.Equal(HttpStatusCode.OK, response.StatusCode); | ||
Assert.False(deserializedTodoItems.Any(i => i.Ordinal == todoItem.Ordinal)); | ||
Assert.DoesNotContain(deserializedTodoItems, x => x.Ordinal == todoItem.Ordinal); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
} | ||
|
||
[Fact] | ||
|
@@ -170,8 +170,8 @@ public async Task Can_Filter_On_In_Array_Values() | |
Assert.Equal(guids.Count(), deserializedTodoItems.Count()); | ||
foreach (var item in deserializedTodoItems) | ||
{ | ||
Assert.True(guids.Contains(item.GuidProperty)); | ||
Assert.False(notInGuids.Contains(item.GuidProperty)); | ||
Assert.Contains(item.GuidProperty, guids); | ||
Assert.DoesNotContain(item.GuidProperty, notInGuids); | ||
} | ||
} | ||
|
||
|
@@ -207,7 +207,7 @@ public async Task Can_Filter_On_Related_In_Array_Values() | |
Assert.NotNull(included); | ||
Assert.NotEmpty(included); | ||
foreach (var item in included) | ||
Assert.True(ownerFirstNames.Contains(item.Attributes["first-name"])); | ||
Assert.Contains(item.Attributes["first-name"], ownerFirstNames); | ||
|
||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit nervous about pushing this in a non-major release until #281 is done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could get #281 and bump the version or just release it. I suspect there will be no significant issues since 2.0 to 2.1 is more of a performance upgrade so just releasing might be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi - I've started this work over in #302 , should have it done tonight or tomorrow....the fix for the failing tests here will be the same as in that PR.