(raw: dict[str, Any])
| 1320 | |
| 1321 | |
| 1322 | def _normalize_domain_rule(raw: dict[str, Any]) -> dict[str, Any] | None: |
| 1323 | label = str(raw.get("label", "")).strip() |
| 1324 | if not label: |
| 1325 | return None |
| 1326 | rule: dict[str, Any] = {"label": label} |
| 1327 | route_to = str(raw.get("route_to", "")).strip() |
| 1328 | if route_to: |
| 1329 | rule["route_to"] = route_to |
| 1330 | rule["aliases"] = _as_string_list(raw.get("aliases")) |
| 1331 | rule["specialized_folders"] = _as_string_list(raw.get("specialized_folders")) |
| 1332 | rule["keywords"] = _as_string_list(raw.get("keywords")) + _as_string_list( |
| 1333 | raw.get("application_keywords") |
| 1334 | ) |
| 1335 | rule["methods"] = _as_string_list(raw.get("methods")) + _as_string_list( |
| 1336 | raw.get("method_keywords") |
| 1337 | ) |
| 1338 | return rule |
| 1339 | |
| 1340 | |
| 1341 | def _normalize_domain_rules( |
no test coverage detected