Commit 104dafc
Fix file upload conditional using wire_value instead of parameter name
The generated code was checking `if LogoFile is not None` instead of
`if logo_file is not None`, causing mypy "name not defined" errors when
the API wire name differed from the Python snake_case parameter name.
Changed to use `key.name.snake_case.safe_name` (the parameter name)
instead of `key.wire_value` (the API field name) in the conditional.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent ab5a922 commit 104dafc
File tree
2 files changed
+11
-1
lines changed- generators/python
- sdk
- src/fern_python/generators/sdk/client_generator/request_body_parameters
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
3 | 13 | | |
4 | 14 | | |
5 | 15 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
198 | | - | |
| 198 | + | |
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
| |||
0 commit comments