@property
    def swagger(self):
        # prepare Swagger.host & Swagger.basePath
        if not self.__swagger:
            return None

        common_path = os.path.commonprefix(self.__swagger.paths.keys())
        # remove tailing slash,
        # because all paths in Paths Object would prefixed with slah.
        common_path = common_path[:-1] if common_path[-1] == '/' else common_path

        if len(common_path) > 0:
            p = six.moves.urllib.parse.urlparse(common_path)
            self.__swagger.update_field('host', p.netloc)

            new_common_path = six.moves.urllib.parse.urlunparse((
                p.scheme, p.netloc, '', '', '', ''))
            new_path = {}
            for k in self.__swagger.paths.keys():
                new_path[k[len(new_common_path):]] = self.__swagger.paths[k]
            self.__swagger.update_field('paths', new_path)

        return self.__swagger
Return the id of the group that owns a given file
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/scanner/v1_2/upgrade.py/Upgrade.swagger--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_file.py/get_gid