Returns a list of name / value string pairs representing the default arguments for
        a particular route.
341425
def _get_default_route_args(
            self,
            namespace,  # pylint: disable=unused-argument
            route,
            tag=False):
        """"""
        data_type, _ = unwrap_nullable(route.arg_data_type)
        if is_struct_type(data_type):
            arg_list = []
            for field in data_type.all_fields:
                if not field.has_default and not is_nullable_type(
                        field.data_type):
                    arg_list.append((fmt_var(field.name), fmt_type(
                        field.data_type, tag=tag)))

            doc_list = ([(fmt_var(f.name), self.process_doc(f.doc, self._docf))
                         for f in data_type.fields
                         if f.doc and not f.has_default and
                         not is_nullable_type(f.data_type)])
        else:
            arg_list = []
            doc_list = []

        return arg_list, doc_list
659541
def _get_route_info(self, request):
        """"""
        resolve_match = resolve(request.path)

        app_name = resolve_match.app_name    # The application namespace for the URL pattern that matches the URL.
        namespace = resolve_match.namespace  # The instance namespace for the URL pattern that matches the URL.
        url_name = resolve_match.url_name    # The name of the URL pattern that matches the URL.
        view_name = resolve_match.view_name  # Name of the view that matches the URL, incl. namespace if there's one.

        return {
            "app_name": app_name or None,
            "namespace": namespace or None,
            "url_name": url_name or None,
            "view_name": view_name or None,
        }
127416
def handle_json_GET_routes(self, params):
    """"""
    schedule = self.server.schedule
    result = []
    for r in schedule.GetRouteList():
      result.append( (r.route_id, r.route_short_name, r.route_long_name) )
    result.sort(key = lambda x: x[1:3])
    return result
713849
def app_routes(app):
    
    _routes = []
    for rule in app.url_map.iter_rules():
        _routes.append({
            'path': rule.rule,
            'name': rule.endpoint,
            'methods': list(rule.methods)
        })
    return jsonify({'routes': _routes})
902372
def argument_getter_factory(route_spec):
     
    
    func_sig = inspect.signature(route_spec.handler_func)

    param_names = list(func_sig.parameters.keys())
    arg_getters  = build_argval_getters(route_spec)
    n_args = len(arg_getters)

    async def argument_getters(request):
        errors = None
        values = {}
        for i in range(n_args):
            try:
                arg_name = param_names[i]
                values[arg_name] = await arg_getters[i](request)
            except HTTPException:
                raise
            except Exception as exc :
                if errors is None: 
                    errors = []

                request.app.logger.error('', exc_info=True)

                exc_type = type(exc)

                data = {
                    "name": arg_name, 
                    "type": f"{exc_type.__module__}.{exc_type.__qualname__}",
                    "error": str(exc)
                }

                errors.append(data)

        if errors is not None:
            raise RESTfulArgumentError(errors)

        return values

    return argument_getters
182898
def default_args(self):
        """"""
        if self._default_args is None:
            self._default_args, unknown = self.parser.parse_known_args()  # pylint: disable=W0612
            # reinitialize logger with new log level and api settings
            self.tcex._logger()
            if self._default_args.tc_aot_enabled:
                # block for AOT message and get params
                params = self.tcex.playbook.aot_blpop()
                self.inject_params(params)
            elif self._default_args.tc_secure_params:
                # inject secure params from API
                params = self._load_secure_params()
                self.inject_params(params)
        return self._default_args
93118
def stringPropertyNames(self):
        
        """
        names = set(self.data)
        if self.defaults is not None:
            names.update(self.defaults.stringPropertyNames())
        return names
1313424
def check_arguments(self):
        """"""
        for name, default in self.argdict.items():
            if name not in self.names and default is NODEFAULT:
                raise NameError('Missing argparse specification for %r' % name)
751856
def set_defaults(self, default_config_params):
        
        map = StringValueMap.from_maps(default_config_params, self)
        return ConfigParams(map)
1331569
function getRouteParams(route, params) {
  const routeParams = {}

  if (!route.path)
    return routeParams

  const paramNames = getParamNames(route.path)

  for (const p in params) {
    if (
      Object.prototype.hasOwnProperty.call(params, p) &&
      paramNames.indexOf(p) !== -1
    ) {
      routeParams[p] = params[p]
    }
  }

  return routeParams
}
755231
def default_pathes(cls):
        """"""
        try:
            from xdg.BaseDirectory import xdg_config_home as config_home
        except ImportError:
            config_home = os.path.expanduser('~/.config')
        return [os.path.join(config_home, 'udiskie', 'config.yml'),
                os.path.join(config_home, 'udiskie', 'config.json')]
947446
function getRoutesForConfig(routes) {
  return routes.map(route => ({
    routePath: route.routePath === '?' ? '' : route.routePath.replace(/\#/g, ''),
    routeParams: route.routeParams
  }));
}
202281
private function get_named_arguments() : array {
		// name the parameters
		$named_arguments = [];

		if ( array_key_exists( 'expects', $this->routes[ $this->__method_name ] ) ) {
			$expects = $this->routes[ $this->__method_name ]['expects'];

			foreach ( $expects as $index => $parameter_name ) {
				if ( array_key_exists( $index, $this->__arguments ) ) {
					$named_arguments[ $parameter_name ] = $this->__arguments[ $index ];
				}
			}
		}

		return $named_arguments;
	}
884177
def get_parameter_defaults(self, include_flags=True):
        
        return {
            name: parameter.default
            for (name, parameter)
            in self.parameters.items()
            if parameter.default is not None and (include_flags or parameter.type != 'flag')
        }
611043
def get_routes(self, viewset):
        

        known_actions = list(flatten([route.mapping.values() for route in self.routes if isinstance(route, Route)]))

        # Determine any `@detail_route` or `@list_route` decorated methods on the viewset
        detail_routes = []
        list_routes = []

        for methodname in dir(viewset):
            attr = getattr(viewset, methodname)
            httpmethods = getattr(attr, 'bind_to_methods', None)
            detail = getattr(attr, 'detail', True)

            if httpmethods:
                # check against know actions list
                if methodname in known_actions:
                    raise ImproperlyConfigured('Cannot use @detail_route or @list_route '
                                               'decorators on method "%s" '
                                               'as it is an existing route'.format(methodname))

                httpmethods = [method.lower() for method in httpmethods]

                if detail:
                    detail_routes.append((httpmethods, methodname))
                else:
                    list_routes.append((httpmethods, methodname))

        def _get_dynamic_routes(route, dynamic_routes):
            ret = []

            for httpmethods, methodname in dynamic_routes:
                method_kwargs = getattr(viewset, methodname).kwargs
                initkwargs = route.initkwargs.copy()
                initkwargs.update(method_kwargs)
                url_path = initkwargs.pop("url_path", None) or methodname

                ret.append(Route(
                    url=replace_methodname(route.url, url_path),
                    mapping={httpmethod: methodname for httpmethod in httpmethods},
                    name=replace_methodname(route.name, url_path),
                    initkwargs=initkwargs,
                ))

            return ret

        ret = []

        for route in self.routes:
            if isinstance(route, DynamicDetailRoute):
                # Dynamic detail routes (@detail_route decorator)
                ret += _get_dynamic_routes(route, detail_routes)
            elif isinstance(route, DynamicListRoute):
                # Dynamic list routes (@list_route decorator)
                ret += _get_dynamic_routes(route, list_routes)
            else:
                # Standard route
                ret.append(route)

        return ret
496397
function generatePathParameters(isInstance) {
    var parameters = [];

    // Parameters available for singular and plural routes
    parameters.push(getParamRef('select'),
        getParamRef('populate'));

    if (isInstance) {
        // Parameters available for singular routes
        addPathSingularParameters(parameters);
    } else {
        addPathCollectionParameters(parameters);
    }
    return parameters;
}
772709
def values(self, name):
        
        return list(self.lookup_variables.get(unnest_path(name), Null))