Add configurable entity set name resolution#41
Open
PavilsG wants to merge 3 commits into
Open
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 13 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
This PR implements a configurable entity set name resolution mechanism. The implementation establishes the required resolution order: custom resolver, followed by attributes, and finally default naming conventions. Codacy analysis indicates the code is up to standards. No issues were found that should prevent merging.
Test suggestions
- Resolver value overrides the default pluralization convention
- Resolver value overrides the [EntitySet] attribute
- Resolver returning whitespace falls back to the [EntitySet] attribute
- Resolver returning null falls back to the pluralization convention
- Explicit entity set name in For call prevents resolver invocation
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
- Add empty-string fallback, resolver-receives-type, and attribute-based resolver tests (706 pass) - Expand EntitySetNameResolver XML docs with resolution order, per-call guidance and an example - Clarify querying.md that a non-empty resolver short-circuits [EntitySet] and AutoPluralization - Add CHANGELOG Unreleased entry
test/docs: strengthen EntitySetNameResolver coverage and docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
EntitySetNameResolverfor parameterlessFor<T>()calls.[EntitySet]attribute, then built-in type-name convention.null, empty, or whitespace.Test coverage
[EntitySet].[EntitySet].nullfalls back to pluralization.For<T>(entitySetName)overload does not invoke the resolver.Validation
dotnet build PanoramicData.OData.Client.Test/PanoramicData.OData.Client.Test.csproj --no-restoredotnet vstest PanoramicData.OData.Client.Test/bin/Debug/net10.0/PanoramicData.OData.Client.Test.dll --TestCaseFilter:"FullyQualifiedName~UnitTests"(703 passed)