You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9f7ba04
Browse filesBrowse the repository at this point in the historyBrowse files
- Map OpenAPI 'array' properties ('list' from map_openapi_type_to_python) to 'dict' in openapi_client.sqlalchemy_cdd.emit.emit_sqlalchemy so cdd.emit.sqlalchemy.sqlalchemy emits Column(JSON, default=None) instead of invalid Column(list, default=None) that triggers sqlalchemy.exc.ArgumentError at declarative model import time.
- Introduce _to_fastapi_type in openapi_client.fastapi.emit to normalize component $ref and array-of-$ref schema annotations into Pydantic-safe JSON structures (dict[str, Any] and list[dict[str, Any]]) across route parameters, requestBody, and response_model return annotations, preventing fastapi.exceptions.FastAPIError when generated server models are SQLAlchemy declarative_base() ORM classes.
- Emit 'from json import loads' in openapi_client.cli_sdk_cdd.emit.emit_cli_sdk so cdd.emit.argparse_function's type=loads for dict/requestBody CLI flags resolves at runtime.
- Decorate test_stub_endpoints in openapi_client.tests.emit_server_tests with @patch.dict(os.environ, {}, clear=True) to isolate stub-mode endpoint tests from ambient DATABASE_URL or EPHEMERAL_DB variables.
0 commit comments