pyopenapi-gen 0.20.0__py3-none-any.whl → 0.20.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyopenapi-gen might be problematic. Click here for more details.

pyopenapi_gen/__init__.py CHANGED
@@ -50,7 +50,7 @@ __all__ = [
50
50
  ]
51
51
 
52
52
  # Semantic version of the generator core – automatically managed by semantic-release.
53
- __version__: str = "0.20.0"
53
+ __version__: str = "0.20.1"
54
54
 
55
55
  # ---------------------------------------------------------------------------
56
56
  # Lazy-loading and autocompletion support (This part remains)
@@ -181,12 +181,12 @@ class EndpointMethodGenerator:
181
181
  writer.dedent()
182
182
  writer.write_line(")")
183
183
  elif content_type == "multipart/form-data":
184
- writer.write_line(f"files_data = DataclassSerializer.serialize({param_info['name']})")
184
+ # Files dict is already in correct format for httpx - pass directly
185
185
  writer.write_line("response = await self._transport.request(")
186
186
  writer.indent()
187
187
  writer.write_line(f'"{op.method.value.upper()}", url,')
188
188
  writer.write_line("params=None,")
189
- writer.write_line("files=files_data,")
189
+ writer.write_line(f"files={param_info['name']},")
190
190
  writer.write_line("headers=None")
191
191
  writer.dedent()
192
192
  writer.write_line(")")
@@ -6,6 +6,7 @@ from typing import Any
6
6
  from pyopenapi_gen import IROperation
7
7
 
8
8
  from ....context.render_context import RenderContext
9
+ from ....core.utils import NameSanitizer
9
10
  from ....core.writers.code_writer import CodeWriter
10
11
  from ..processors.parameter_processor import EndpointParameterProcessor
11
12
  from .docstring_generator import EndpointDocstringGenerator
@@ -134,9 +135,12 @@ class OverloadMethodGenerator:
134
135
  # Get return type from response strategy
135
136
  return_type = response_strategy.return_type
136
137
 
138
+ # Sanitize method name to snake_case
139
+ method_name = NameSanitizer.sanitize_method_name(op.operation_id)
140
+
137
141
  # Write signature
138
142
  params_str = ",\n ".join(param_parts)
139
- writer.write_line(f"async def {op.operation_id}(")
143
+ writer.write_line(f"async def {method_name}(")
140
144
  writer.indent()
141
145
  writer.write_line(params_str)
142
146
  writer.dedent()
@@ -232,9 +236,12 @@ class OverloadMethodGenerator:
232
236
  # Get return type
233
237
  return_type = response_strategy.return_type
234
238
 
239
+ # Sanitize method name to snake_case
240
+ method_name = NameSanitizer.sanitize_method_name(op.operation_id)
241
+
235
242
  # Write signature
236
243
  params_str = ",\n ".join(param_parts)
237
- writer.write_line(f"async def {op.operation_id}(")
244
+ writer.write_line(f"async def {method_name}(")
238
245
  writer.indent()
239
246
  writer.write_line(params_str)
240
247
  writer.dedent()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyopenapi-gen
3
- Version: 0.20.0
3
+ Version: 0.20.1
4
4
  Summary: Modern, async-first Python client generator for OpenAPI specifications with advanced cycle detection and unified type resolution
5
5
  Project-URL: Homepage, https://github.com/your-org/pyopenapi-gen
6
6
  Project-URL: Documentation, https://github.com/your-org/pyopenapi-gen/blob/main/README.md
@@ -1,4 +1,4 @@
1
- pyopenapi_gen/__init__.py,sha256=7tPgmApPAqQDxIpBEwskl1RD3ao1g0E9H4JE2O3YeQs,7533
1
+ pyopenapi_gen/__init__.py,sha256=AAHPrKYYe_xNqjTYJxWB4YZFzmGsIMIsResorFRQYso,7533
2
2
  pyopenapi_gen/__main__.py,sha256=4-SCaCNhBd7rtyRK58uoDbdl93J0KhUeajP_b0CPpLE,110
3
3
  pyopenapi_gen/cli.py,sha256=9T_XF3-ih_JlM_BOkmHft-HoMCGOqL5UrnAHBJ0fb5w,2320
4
4
  pyopenapi_gen/http_types.py,sha256=EMMYZBt8PNVZKPFu77TQija-JI-nOKyXvpiQP9-VSWE,467
@@ -112,8 +112,8 @@ pyopenapi_gen/visit/endpoint/__init__.py,sha256=DftIZSWp6Z8jKWoJE2VGKL4G_5cqwFXe
112
112
  pyopenapi_gen/visit/endpoint/endpoint_visitor.py,sha256=1aS0i2D_Y-979_7aBd0W6IS2UVO6wMujsMMw8Qt8PRE,3574
113
113
  pyopenapi_gen/visit/endpoint/generators/__init__.py,sha256=-X-GYnJZ9twiEBr_U0obW8VuSoY6IJmYaxinn-seMzA,50
114
114
  pyopenapi_gen/visit/endpoint/generators/docstring_generator.py,sha256=_VpRabZ2g_N42TTWGI6gtPxqzlZD65dOHm8U_YvtWbQ,5891
115
- pyopenapi_gen/visit/endpoint/generators/endpoint_method_generator.py,sha256=W_i_8KYZanVP-dA2sWCfDJ50jV_RzefrWGPGbJKDTwM,10242
116
- pyopenapi_gen/visit/endpoint/generators/overload_generator.py,sha256=1W8pt5iUSDsgxJJUoxfQyRZkxCwFi1WbvVM__SazCe0,9074
115
+ pyopenapi_gen/visit/endpoint/generators/endpoint_method_generator.py,sha256=-Hpae2H1gD4DbBb5LikvAw1rI_cUTaGZV8l4OgI9EbE,10234
116
+ pyopenapi_gen/visit/endpoint/generators/overload_generator.py,sha256=XijowsP3SS6kJrX3Yq1h2foO5_Nranzrels3N0hinCQ,9347
117
117
  pyopenapi_gen/visit/endpoint/generators/request_generator.py,sha256=MKtZ6Fa050gCgqAGhXeo--p_AzqV9RmDd8e4Zvglgo0,5349
118
118
  pyopenapi_gen/visit/endpoint/generators/response_handler_generator.py,sha256=Jb_8hRQY1OfpThupa7UdCNxa712m3WaeNIbLhlYk1bg,24193
119
119
  pyopenapi_gen/visit/endpoint/generators/signature_generator.py,sha256=ENi34Rf2x1Ijtvca652ihV9L2UUT1O2SEsG-66Pm_Z8,3873
@@ -126,8 +126,8 @@ pyopenapi_gen/visit/model/alias_generator.py,sha256=wEMHipPA1_CFxvQ6CS9j4qgXK93s
126
126
  pyopenapi_gen/visit/model/dataclass_generator.py,sha256=L794s2yyYUO__akGd120NJMV7g2xqiPfQyZo8CduIVM,14426
127
127
  pyopenapi_gen/visit/model/enum_generator.py,sha256=AXqKUFuWUUjUF_6_HqBKY8vB5GYu35Pb2C2WPFrOw1k,10061
128
128
  pyopenapi_gen/visit/model/model_visitor.py,sha256=TC6pbxpQiy5FWhmQpfllLuXA3ImTYNMcrazkOFZCIyo,9470
129
- pyopenapi_gen-0.20.0.dist-info/METADATA,sha256=x2Q2IjV_O4XMsJQ7_OVvIPBWeGMThwM_LjrFEgR2JQY,20551
130
- pyopenapi_gen-0.20.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
131
- pyopenapi_gen-0.20.0.dist-info/entry_points.txt,sha256=gxSlNiwom50T3OEZnlocA6qRjGdV0bn6hN_Xr-Ub5wA,56
132
- pyopenapi_gen-0.20.0.dist-info/licenses/LICENSE,sha256=UFAyTWKa4w10-QerlJaHJeep7G2gcwpf-JmvI2dS2Gc,1088
133
- pyopenapi_gen-0.20.0.dist-info/RECORD,,
129
+ pyopenapi_gen-0.20.1.dist-info/METADATA,sha256=aLIMp4fHbHXCAdEtngq92k6HFEj4E0L_RwplsXUkumY,20551
130
+ pyopenapi_gen-0.20.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
131
+ pyopenapi_gen-0.20.1.dist-info/entry_points.txt,sha256=gxSlNiwom50T3OEZnlocA6qRjGdV0bn6hN_Xr-Ub5wA,56
132
+ pyopenapi_gen-0.20.1.dist-info/licenses/LICENSE,sha256=UFAyTWKa4w10-QerlJaHJeep7G2gcwpf-JmvI2dS2Gc,1088
133
+ pyopenapi_gen-0.20.1.dist-info/RECORD,,