Skip to content

Conversation

@commonsensesoftware
Copy link
Collaborator

Fix Explicit versus Implicit Matches in Matcher Policy

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Description

#884 highlighted an issue where [MapToApiVersion] could allow routing to an endpoint that shouldn't be. This was fixed by considering the score as part of the matching process. This is incorrect. Score alone can differentiate endpoints by constraints such as media type. This is allowed and has nothing to do with API Versioning. This change once again only considers explicit version implicit matches. All implicit matches are in invalidated if there are any explicit matches. Multiple, explicit matches will be ambiguous as expected.

⚠️ These changes were evaluated in conjunction with the changes in #1155. Those changes may need to be merged for the test suite to pass.

…without considering the score and invalidating candidates that are still valid. Fixes #1101
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.

ApiVersionMatcherPolicy Invalidates valid candidates

2 participants