Skip to content

Refactorings #1038

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

Merged
merged 29 commits into from
Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c97d6c4
Renamed CollectionNotEmptyExpression to HasExpression
Jul 30, 2021
5e54e4e
Renamed EqualsAnyOfExpression to AnyExpression
Jul 30, 2021
b408bad
Changed SparseFieldSetExpression.Fields type from IReadOnlyCollection…
Aug 2, 2021
48f8954
Changed SparseFieldTableExpression.Table type from IReadOnlyDictionar…
Aug 2, 2021
ae4a57b
Changed SortExpression.Elements type from IReadOnlyDictionary to IImm…
Aug 2, 2021
d0f7cc1
Changed ResourceFieldChainExpression.Fields type from IReadOnlyCollec…
Aug 2, 2021
8dddf5c
Resharper quickfix: Use negated pattern
Aug 2, 2021
159b99f
Changed PaginationQueryStringValueExpression.Elements type from IRead…
Aug 3, 2021
866c8b1
Changed AnyExpression.Constants type from IReadOnlyCollection to IImm…
Aug 3, 2021
d56c7d3
Changed LogicalExpression.Terms type from IReadOnlyCollection to IImm…
Aug 3, 2021
5d164f0
Changed IncludeExpression.Elements type and IncludeElementExpression.…
Aug 3, 2021
dfee19f
Add support for `IReadOnlySet<>` usage in resource models
Aug 3, 2021
56cf588
Changed DisableQueryStringAttribute.ParameterNames type from IReadOnl…
Aug 3, 2021
1c2726b
Changed IResourceContextProvider.GetResourceContexts() to return a se…
Aug 3, 2021
1f56ae8
Updated documentation
Aug 3, 2021
031af89
Fix cibuild
Aug 3, 2021
a925aa0
Use "endpoint" in RequestMethodNotAllowedException message
Aug 4, 2021
4a955a4
Renamed StandardQueryStringParameters to JsonApiQueryStringParameters
Aug 4, 2021
07a74e8
Replaced obsolete IQueryLayerComposer.GetResourceDefinitionAccessor()…
Aug 4, 2021
680e809
Replaced obsolete IResourceFactory.GetResourceDefinitionAccessor() wi…
Aug 4, 2021
52b3773
Made TId in IResourceDefinition contravariant
Aug 4, 2021
2c222b1
Corrected terminology: relationships use left/right instead of primar…
Aug 4, 2021
a1bef68
Removed obsolete IJsonApiRequest.BasePath
Aug 4, 2021
d6b1f9d
Removed EntityFrameworkCoreSupport (no longer needed for EF Core 5+)
Aug 4, 2021
f23ab45
cibuild fixes
Aug 4, 2021
b277e1f
Always set IJsonApiRequest.OperationKind from middleware
Aug 4, 2021
0b15d45
Renamed OperationKind to WriteOperationKind, exposed as IJsonApiReque…
Aug 4, 2021
76dbf36
Automated Code cleanup
Aug 4, 2021
0c576be
Add HTTP Method to trace logging
Aug 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cibuild fixes
  • Loading branch information
Bart Koelman committed Aug 4, 2021
commit f23ab45e6f4475505fda222feb21a884a4d2316f
2 changes: 1 addition & 1 deletion src/JsonApiDotNetCore/CollectionConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public IEnumerable CopyToTypedCollection(IEnumerable source, Type collectionType
/// <summary>
/// Returns a compatible collection type that can be instantiated, for example IList{Article} -> List{Article} or ISet{Article} -> HashSet{Article}
/// </summary>
public Type ToConcreteCollectionType(Type collectionType)
private Type ToConcreteCollectionType(Type collectionType)
{
if (collectionType.IsInterface && collectionType.IsGenericType)
{
Expand Down
8 changes: 4 additions & 4 deletions src/JsonApiDotNetCore/Middleware/JsonApiMiddleware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ public async Task InvokeAsync(HttpContext httpContext, IControllerResourceMappin
return;
}

SetupResourceRequest((JsonApiRequest)request, primaryResourceContext, routeValues, options, resourceContextProvider, httpContext.Request);
SetupResourceRequest((JsonApiRequest)request, primaryResourceContext, routeValues, resourceContextProvider, httpContext.Request);

httpContext.RegisterJsonApiRequest();
}
else if (IsOperationsRequest(routeValues))
else if (IsRouteForOperations(routeValues))
{
if (!await ValidateContentTypeHeaderAsync(HeaderConstants.AtomicOperationsMediaType, httpContext, options.SerializerSettings) ||
!await ValidateAcceptHeaderAsync(AtomicOperationsMediaType, httpContext, options.SerializerSettings))
Expand Down Expand Up @@ -209,7 +209,7 @@ private static async Task FlushResponseAsync(HttpResponse httpResponse, JsonSeri
}

private static void SetupResourceRequest(JsonApiRequest request, ResourceContext primaryResourceContext, RouteValueDictionary routeValues,
IJsonApiOptions options, IResourceContextProvider resourceContextProvider, HttpRequest httpRequest)
IResourceContextProvider resourceContextProvider, HttpRequest httpRequest)
{
request.IsReadOnly = httpRequest.Method == HttpMethod.Get.Method || httpRequest.Method == HttpMethod.Head.Method;
request.Kind = EndpointKind.Primary;
Expand Down Expand Up @@ -252,7 +252,7 @@ private static bool IsRouteForRelationship(RouteValueDictionary routeValues)
return actionName.EndsWith("Relationship", StringComparison.Ordinal);
}

private static bool IsOperationsRequest(RouteValueDictionary routeValues)
private static bool IsRouteForOperations(RouteValueDictionary routeValues)
{
string actionName = (string)routeValues["action"];
return actionName == "PostOperations";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using JetBrains.Annotations;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Queries.Expressions;
using JsonApiDotNetCore.Repositories;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;
using Microsoft.EntityFrameworkCore;
Expand Down