(
server_url: str,
path: str,
path_params: Any,
gbls: Optional[Any] = None,
)
| 27 | |
| 28 | |
| 29 | def generate_url( |
| 30 | server_url: str, |
| 31 | path: str, |
| 32 | path_params: Any, |
| 33 | gbls: Optional[Any] = None, |
| 34 | ) -> str: |
| 35 | path_param_values: Dict[str, str] = {} |
| 36 | |
| 37 | globals_already_populated = _populate_path_params( |
| 38 | path_params, gbls, path_param_values, [] |
| 39 | ) |
| 40 | if _is_set(gbls): |
| 41 | _populate_path_params(gbls, None, path_param_values, globals_already_populated) |
| 42 | |
| 43 | for key, value in path_param_values.items(): |
| 44 | path = path.replace("{" + key + "}", value, 1) |
| 45 | |
| 46 | return remove_suffix(server_url, "/") + path |
| 47 | |
| 48 | |
| 49 | def _populate_path_params( |
nothing calls this directly
no test coverage detected