API: type all services with dict[str,Any] in python to reduce complexity.

This commit is contained in:
Johannes Kirschbauer
2024-09-12 16:16:34 +02:00
parent 39518d302b
commit f2a2b8e893
8 changed files with 118 additions and 320 deletions

View File

@@ -201,7 +201,7 @@ def generate_dataclass(schema: dict[str, Any], class_name: str = root_class) ->
nested_classes: list[str] = []
if stop_at and class_name == stop_at:
# Skip generating classes below the stop_at property
return f"@dataclass\nclass {class_name}:\n pass\n"
return f"{class_name} = dict[str, Any]"
for prop, prop_info in properties.items():
field_name = prop.replace("-", "_")