| 346 | |
| 347 | |
| 348 | def merge_paths(paths: list[dict[str, Any]]) -> dict[str, Any]: |
| 349 | merged_paths = {} |
| 350 | for path_dict in paths: |
| 351 | for path, verbs in path_dict.items(): |
| 352 | for verb, methods in verbs.items(): |
| 353 | if path not in merged_paths: |
| 354 | merged_paths[path] = {} |
| 355 | if verb not in merged_paths[path]: |
| 356 | merged_paths[path][verb] = {} |
| 357 | if "methods" not in merged_paths[path][verb]: |
| 358 | merged_paths[path][verb]["methods"] = [] |
| 359 | merged_paths[path][verb]["methods"].extend(methods.get("methods", [])) |
| 360 | return merged_paths |
| 361 | |
| 362 | |
| 363 | class CstMethods(abc.ABC): |