Skip to content
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

Routing constraints are not working #39

Open
natenho opened this issue Sep 3, 2019 · 0 comments
Open

Routing constraints are not working #39

natenho opened this issue Sep 3, 2019 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@natenho
Copy link
Owner

natenho commented Sep 3, 2019

Is your feature request related to a problem? Please describe.
Earlier versions of Mockaco used to fully parse AspNet Core Routing constraints like {field:int} or package/{operation:regex(^track|create$)}/{id:int}.

In an attempt to simplify the routing decision process, the feature was lost, so it's not considering the routing constraints anymore, basically because TemplateMatcher class does not compute constraints.

The example route template
package/{operation:regex(^track|create$)}/{id:int} matches routes like package/foo/bar, ignoring the regex and int constraints:

Describe the solution you'd like
The best solution so far is to reimplement the first approach of using full asp net routing infrastructure instead of just using the TemplateMatcher.

Describe alternatives you've considered
Another approach is to find the proper classes to compute routing constraints, but it would end up bringing complexity to the code.

@natenho natenho added bug Something isn't working enhancement New feature or request labels Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant