Closed
Description
DESCRIPTION
List of small refactorings and code improvements:
- The classes
JsonApiController<TResource>
andJsonApiController<TResource, TId>
should be made abstract (and their constructors protected) - Optimization in catch block of
JsonApiResourceService.CreateAsync
: only check for existing resource if an ID was specified in the request body:if (!Equals(resourceFromRequest.Id, default(TId))) { ... }
- Rename
JsonApiDotNetCoreExampleTests.IntegrationTests.ReadWrite.WriteFakers.WorkTags
and..._lazyWorkTagsFaker
to singular, like the rest in there - Add missing properties to serialization models, such as
document.jsonapi
andlinks.describedby
- Change
IResourceGraph
dependency inJsonApiRoutingConvention
toIResourceContextProvider
- Remove the code path for
if (_serializer == null)
inJsonApiWriter.WriteAsync
, because its constructor asserts that_serializer
can never be null - Class
TestServerExtensions
has no usages and can be removed - Rename
EntityFrameworkCoreRepository.IsRequiredToManyRelationshipBeingCleared
toIsToManyRelationshipBeingCleared
- Rename
IQueryLayerComposer.ComposeForHasManyThrough
toComposeForHasMany
and change first parameter toHasManyAttribute hasManyRelationship
(also update doc-comment to reflect this) - Search/replace remaining usages of
Context.RemoveRange(
withClearTableAsync
in tests - Rename
IControllerResourceMapping.GetAssociatedResource
toGetResourceTypeForController
- Remove
IRequestQueryStringAccessor.QueryString
(no usages)