

def _set_versioned_urls(api, resource_name, endpoint_suffix):
    resource = None
    for version in SUPPORTED_API_VERSIONS:
        (version_name, resources_impl) = version
        if hasattr(resources_impl, resource_name):
            resource = getattr(version_name, resource_name)
        if resource:
            endpoint = '{0}/{1}'.format(version_name, endpoint_suffix)
            url = '/api/{0}'.format(endpoint)
            api.add_resource(resource, url, endpoint=endpoint)
            rest_swagger.add_swagger_resource(api, version_name, resource, url)

dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/rest-service/manager_rest/endpoint_mapper.py _set_versioned_urls/VarMisuse@47/72 `resources_impl`->`version_name`