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

parentheses ( ) not regex escaped #204

Open
leon-vg opened this issue Jul 5, 2018 · 0 comments
Open

parentheses ( ) not regex escaped #204

leon-vg opened this issue Jul 5, 2018 · 0 comments

Comments

@leon-vg
Copy link

leon-vg commented Jul 5, 2018

I logged an issue in the Robot-Framework RESTinstance library, regarding an issue with parentheses ( ) in a swagger endpoint. asyrjasalo/RESTinstance#34

The issue is, in short, that an endpoint with parentheses cannot be found, while this is incorrect.

I tracked down the problem to the following file in this library: https://github.com/pipermerriam/flex/blob/master/flex/paths.py#L19

The problem seems to be resolved when I change the following code:

REGEX_REPLACEMENTS = (
    ('\.', '\.'),
    ('\{', '\{'),
    ('\}', '\}'),
)

to this:

REGEX_REPLACEMENTS = (
    ('\.', '\.'),
    ('\{', '\{'),
    ('\}', '\}'),
    ('\(', '\('),
    ('\)', '\)'),
)

I am not a python developer, otherwise I would have submitted a PR. I hope a more experienced developer can check if this change is appropriate and realize this change.

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

No branches or pull requests

1 participant