Skip to content

Fix API Version with Status Using URL Segment Method - #1199

Open
commonsensesoftware wants to merge 1 commit into
mainfrom
dev/css/fix-url-segment-matching
Open

Fix API Version with Status Using URL Segment Method#1199
commonsensesoftware wants to merge 1 commit into
mainfrom
dev/css/fix-url-segment-matching

Conversation

@commonsensesoftware

Copy link
Copy Markdown
Collaborator

Fix API Version with Status Using URL Segment Method

  • 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

Fix extracting API version with status using URL segment method. This is a limitation of how constraints are matched and parsed in route templates. This will add ever-so-slightly more overhead to matching API versions on incoming requests when versioning by URL segment, which was already the slowest method.

A nice side effect is that this same fallback mechanism works for matching incoming API versions for gRPC endpoints that version by URL segment because gRPC endpoints have their own route templates that do not map to constraints. This would make it near impossible to match such endpoints. gRPC endpoints can also version by query string, which does not have this issue nor any of the performance impact.

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.

API version with status property returns 404 when called

1 participant