def parameterize(path):
    def fparam(p):
        if p.startswith('<') and p.endswith('>'):
            _, _, parameter = p.strip('<>').rpartition(':')
            return '{%s}' % (parameter,)
        return p
    return '/'.join(map(fparam, path.split('/')))
Parmeterize path using Swagger-style for parameters.
dataset/ETHPy150Open martinp/flask-swagger/flask_swagger/__init__.py/parameterize