Skip to content

ApiVersionRouteConstraint Always Returns False for Url Generation #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
commonsensesoftware opened this issue Sep 14, 2016 · 1 comment
Assignees
Labels

Comments

@commonsensesoftware
Copy link
Collaborator

The ApiVersionRouteConstraint always returns false when Match is called for URL generation. This breaks URL generation features provided by the UrlHelper and the numerous extensions built on top of it.

For example, assume a route named HelloWorld:

api/v{version:apiVersion}/helloworld

Then:

Url.Link( "HelloWorld", new { version = "1" } );

Should generate:

api/v1/helloworld

However, an exception is thrown instead.

@commonsensesoftware commonsensesoftware self-assigned this Sep 14, 2016
commonsensesoftware pushed a commit that referenced this issue Sep 14, 2016
…int, URL generation and 400 responses are now correctly returned. Fixes #18, #19, and #20
commonsensesoftware added a commit that referenced this issue Sep 14, 2016
…int, URL generation and 400 responses are now correctly returned. Fixes #18, #19, and #20 (#22)
@commonsensesoftware
Copy link
Collaborator Author

Fixed with commit 9f5a605

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant