BigW Consortium Gitlab

Commit 0d75db1d by Ritesh Shrivastav

Fix regex for positional parameters

parent cd9e93e0
......@@ -101,10 +101,10 @@ class APIMethod(object):
def compile(self):
uri = self.spec['uri']
self.positionals = re.findall('{(.*)}', uri)
self.positionals = re.findall(':([_\w]+)', uri)
for p in self.positionals:
uri = uri.replace('{%s}' % p, '%%(%s)s' % p)
uri = uri.replace(':%s' % p, '%%(%s)s' % p)
self.uri_format = uri
self.compiled = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment