Skip to content

Fix matching multiple OData routing metadata - #1587

Open
lpperras wants to merge 1 commit into
OData:mainfrom
lpperras:issue753
Open

Fix matching multiple OData routing metadata#1587
lpperras wants to merge 1 commit into
OData:mainfrom
lpperras:issue753

Conversation

@lpperras

@lpperras lpperras commented Jul 9, 2026

Copy link
Copy Markdown

Fixes #753.

ODataRoutingMatcherPolicy previously considered only the first
IODataRoutingMetadata entry attached to an endpoint.

The matcher now evaluates metadata entries in order and uses the first
successful translation, including its EDM model, route prefix, and updated
route values.

Added focused unit coverage for:

  • falling through from a failed metadata entry to a successful one
  • stopping after the first successful match
  • invalidating a candidate only when all metadata entries fail

The implementation approach is based on the solution proposed by
@commonsensesoftware in the original issue.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lpperras

lpperras commented Jul 9, 2026

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@lpperras

Copy link
Copy Markdown
Author

@xuzhg @WanjohiSammy we might need to shift our versioning strategy for our product depending on if this will ever be approved. We don't want to run of a fork but need this fix to move forward. Could you please let me know if there is not chance this makes it to the product so that we can align accordingly on our side?

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.

ODataRoutingMatcherPolicy Does Not Consider All Routing Metadata

1 participant