openapi-python-generator 2.0.0__py3-none-any.whl → 2.0.1.dev1758361866__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.
- openapi_python_generator/language_converters/python/service_generator.py +11 -2
- {openapi_python_generator-2.0.0.dist-info → openapi_python_generator-2.0.1.dev1758361866.dist-info}/METADATA +1 -1
- {openapi_python_generator-2.0.0.dist-info → openapi_python_generator-2.0.1.dev1758361866.dist-info}/RECORD +6 -6
- {openapi_python_generator-2.0.0.dist-info → openapi_python_generator-2.0.1.dev1758361866.dist-info}/LICENSE +0 -0
- {openapi_python_generator-2.0.0.dist-info → openapi_python_generator-2.0.1.dev1758361866.dist-info}/WHEEL +0 -0
- {openapi_python_generator-2.0.0.dist-info → openapi_python_generator-2.0.1.dev1758361866.dist-info}/entry_points.txt +0 -0
|
@@ -428,17 +428,18 @@ def generate_services(
|
|
|
428
428
|
services = []
|
|
429
429
|
service_ops = []
|
|
430
430
|
for path_name, path in paths.items():
|
|
431
|
+
clean_path_name = clean_up_path_name(path_name)
|
|
431
432
|
for http_operation in HTTP_OPERATIONS:
|
|
432
433
|
op = path.__getattribute__(http_operation)
|
|
433
434
|
if op is None:
|
|
434
435
|
continue
|
|
435
436
|
|
|
436
437
|
if library_config.include_sync:
|
|
437
|
-
sync_so = generate_service_operation(op,
|
|
438
|
+
sync_so = generate_service_operation(op, clean_path_name, False)
|
|
438
439
|
service_ops.append(sync_so)
|
|
439
440
|
|
|
440
441
|
if library_config.include_async:
|
|
441
|
-
async_so = generate_service_operation(op,
|
|
442
|
+
async_so = generate_service_operation(op, clean_path_name, True)
|
|
442
443
|
service_ops.append(async_so)
|
|
443
444
|
|
|
444
445
|
# Ensure every operation has a tag; fallback to "default" for untagged operations
|
|
@@ -489,3 +490,11 @@ def generate_services(
|
|
|
489
490
|
)
|
|
490
491
|
|
|
491
492
|
return services
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
def clean_up_path_name(path_name: str) -> str:
|
|
496
|
+
# Clean up path name: only replace dashes inside curly brackets for f-string compatibility, keep other dashes
|
|
497
|
+
def _replace_bracket_dashes(match):
|
|
498
|
+
return "{" + match.group(1).replace("-", "_") + "}"
|
|
499
|
+
|
|
500
|
+
return re.sub(r"\{([^}/]+)\}", _replace_bracket_dashes, path_name)
|
|
@@ -9,7 +9,7 @@ openapi_python_generator/language_converters/python/common.py,sha256=DJkX9AKTLkr
|
|
|
9
9
|
openapi_python_generator/language_converters/python/generator.py,sha256=BpgALeKsNgqSvQNQPoM8x1LYG9BmvA687eNdtvPO6UM,1681
|
|
10
10
|
openapi_python_generator/language_converters/python/jinja_config.py,sha256=cdEFrFTSLu2D0tKg3ZN1kQPsFkFIrb9QAo8susH3Vz8,940
|
|
11
11
|
openapi_python_generator/language_converters/python/model_generator.py,sha256=BHNqkcqvcu8GoyG9vWC61NYmPQH86fr10CTxCKsI2lU,19519
|
|
12
|
-
openapi_python_generator/language_converters/python/service_generator.py,sha256=
|
|
12
|
+
openapi_python_generator/language_converters/python/service_generator.py,sha256=38pyA53vOjd173WwCF5Bp3OhCkmOSKaBjCC2WhGiG4A,18547
|
|
13
13
|
openapi_python_generator/language_converters/python/templates/aiohttp.jinja2,sha256=Ym3-KX8JH9-V75GqkfcXVgh7rnqlkOQU5DLaNd1Wma0,2135
|
|
14
14
|
openapi_python_generator/language_converters/python/templates/apiconfig.jinja2,sha256=bvYMJV6YB2NZLLcqwozISdS86XLH8J6D8o3ZpfgJCjc,1256
|
|
15
15
|
openapi_python_generator/language_converters/python/templates/apiconfig_pydantic_2.jinja2,sha256=_MzcHYEq9aoqSUEhZ-5SLbO80zgBeJnx5d7q3Q_usSo,1319
|
|
@@ -25,8 +25,8 @@ openapi_python_generator/parsers/openapi_30.py,sha256=YLA5_rIv_wkV2dyQp7M1_87170
|
|
|
25
25
|
openapi_python_generator/parsers/openapi_31.py,sha256=c3YpAp6wg6PijM1YScHJgivFk6DLhAP_N6pnTLyRUck,1912
|
|
26
26
|
openapi_python_generator/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
openapi_python_generator/version_detector.py,sha256=Cn7iG6_EnBdmjGmefJQ1cIBzbT28F0BeCEpoqksBGyQ,2142
|
|
28
|
-
openapi_python_generator-2.0.
|
|
29
|
-
openapi_python_generator-2.0.
|
|
30
|
-
openapi_python_generator-2.0.
|
|
31
|
-
openapi_python_generator-2.0.
|
|
32
|
-
openapi_python_generator-2.0.
|
|
28
|
+
openapi_python_generator-2.0.1.dev1758361866.dist-info/METADATA,sha256=o_-8h8Cz5R33y51fWLZ2DX_UEA1azAPdPhdPPkYN1Ms,5441
|
|
29
|
+
openapi_python_generator-2.0.1.dev1758361866.dist-info/LICENSE,sha256=0myanGwJ2vUOZN12aN95o0My6XEysnnVlbKikYw3pHg,1070
|
|
30
|
+
openapi_python_generator-2.0.1.dev1758361866.dist-info/entry_points.txt,sha256=hqE8T8yX5Pkeb2g__7yQrEazkBPwNgTbEHmoOkaYh80,83
|
|
31
|
+
openapi_python_generator-2.0.1.dev1758361866.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
|
|
32
|
+
openapi_python_generator-2.0.1.dev1758361866.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|