diff --git a/codegenerator/common/__init__.py b/codegenerator/common/__init__.py index 2447871..a46b263 100644 --- a/codegenerator/common/__init__.py +++ b/codegenerator/common/__init__.py @@ -11,9 +11,9 @@ # under the License. # import logging +import re from pathlib import Path from typing import Any -import re import jsonref import yaml @@ -511,7 +511,7 @@ def get_operation_variants(spec: dict, action_name: str | None = None): return operation_variants -def get_resource_names_from_url(path: str): +def get_resource_names_from_url(path: str) -> list[str]: """Construct Resource name from the URL""" path_elements = list(filter(None, path.split("/"))) if path_elements and VERSION_RE.match(path_elements[0]): @@ -619,7 +619,7 @@ def get_resource_names_from_url(path: str): elif path == "/v1/{account}/{container}/{object}": return ["object"] if path == "/v3/scheduler-stats/get_pools": - return ["scheduler_stats", "pool"] + return ["scheduler_stat", "pool"] if len(path_resource_names) == 0: return ["version"]