updated modelgen tool

This commit is contained in:
2026-02-06 20:18:45 -03:00
parent 8f5d407e0e
commit 72e4113529
24 changed files with 321 additions and 938 deletions

View File

@@ -5,6 +5,7 @@ Loads Python dataclasses from a schema/ folder.
Expects the folder to have an __init__.py that exports:
- DATACLASSES: List of dataclass types to generate
- ENUMS: List of Enum types to include
- API_MODELS: (optional) List of API request/response types
- GRPC_MESSAGES: (optional) List of gRPC message types
- GRPC_SERVICE: (optional) gRPC service definition dict
"""
@@ -88,7 +89,7 @@ class SchemaLoader:
for cls in dataclasses:
self.models.append(self._parse_dataclass(cls))
# Extract API_MODELS (TypeScript-only request/response types)
# Extract API_MODELS (request/response types)
if load_all or "api" in include:
api_models = getattr(module, "API_MODELS", [])
for cls in api_models: