Skip to content

Add configurable entity set name resolution#40

Closed
PavilsG wants to merge 1 commit into
panoramicdata:mainfrom
PavilsG:feature/IPL-6548-entity-set-name-resolver
Closed

Add configurable entity set name resolution#40
PavilsG wants to merge 1 commit into
panoramicdata:mainfrom
PavilsG:feature/IPL-6548-entity-set-name-resolver

Conversation

@PavilsG

@PavilsG PavilsG commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Add an opt-in EntitySetNameResolver to resolve entity-set names for parameterless For<T>() calls.
  • Preserve existing [EntitySet] and pluralization conventions when the resolver returns null, empty, or whitespace.
  • Document the option and add focused coverage for resolver override and fallback behavior.

Validation

  • dotnet build PanoramicData.OData.Client.Test/PanoramicData.OData.Client.Test.csproj --no-restore
  • dotnet vstest PanoramicData.OData.Client.Test/bin/Debug/net10.0/PanoramicData.OData.Client.Test.dll --TestCaseFilter:"FullyQualifiedName~UnitTests" (700 passed)

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 5 complexity · 0 duplication

Metric Results
Complexity 5
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR successfully implements the EntitySetNameResolver in ODataClientOptions, allowing for custom type-to-entity-set mapping. The implementation correctly prioritizes the custom resolver over existing attribute and pluralization conventions. Documentation in the README has been updated to reflect these changes.

While the core functionality and documentation are complete, there is a gap in the unit test coverage. Specifically, the scenario where the resolver returns null to trigger a fallback to default pluralization logic is not explicitly tested. All other acceptance criteria appear to be met.

About this PR

  • The test suite does not currently include a scenario to verify that the system falls back to default pluralization logic when the custom resolver returns null. It is recommended to add this unit test to ensure full compliance with the fallback requirements.

Test suggestions

  • Custom resolver provides a name, overriding all conventions
  • Custom resolver returns whitespace, falling back to [EntitySet] attribute
  • Custom resolver returns null, falling back to default pluralization logic
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Custom resolver returns null, falling back to default pluralization logic

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@PavilsG
PavilsG force-pushed the feature/IPL-6548-entity-set-name-resolver branch from fa59e24 to a0b11d9 Compare July 17, 2026 07:24
@PavilsG PavilsG closed this Jul 17, 2026
@PavilsG
PavilsG deleted the feature/IPL-6548-entity-set-name-resolver branch July 17, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant