python-rest-client-codegen 1.12.3__py3-none-any.whl → 1.12.4__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.
@@ -26,7 +26,7 @@ def get_codegen_path():
26
26
  return pkg_resources.path(__package__, "python-rest-client-codegen.jar")
27
27
 
28
28
 
29
- def generate_consumer(api_spec_file_name, out_dir):
29
+ def generate_consumer(api_spec_file_name, out_dir, library=None):
30
30
  with get_api_path(api_spec_file_name) as api_spec_file_path:
31
31
  api_name = get_api_name_from_spec_file_path(api_spec_file_path)
32
32
 
@@ -37,7 +37,7 @@ def generate_consumer(api_spec_file_name, out_dir):
37
37
  openapi_codegen_java_classpath = compute_codegen_java_classpath(cli_jar_path, client_codegen_jar_path)
38
38
 
39
39
  execute_consumer_codegen(openapi_codegen_java_classpath, client_codegen_jar_path.stem, api_spec_file_abs_path,
40
- out_dir, "api.consume.gen", api_name)
40
+ out_dir, "api.consume.gen", api_name, library=library)
41
41
 
42
42
  def get_api_name_from_spec_file_path(api_spec_file_path):
43
43
  api_name = os.path.basename(api_spec_file_path).split(".")[0]
@@ -51,9 +51,11 @@ def compute_codegen_java_classpath(cli_jar_path, codegen_jar_path):
51
51
 
52
52
  def execute_consumer_codegen(openapi_codegen_java_classpath, codegen_name,
53
53
  api_spec_file_path, outdir,
54
- package_name, api_name):
54
+ package_name, api_name, library=None):
55
55
  """
56
- Consumer is generated in leaf
56
+ Consumer is generated in leaf.
57
+ library: HTTP library used by openapi-generator (generator default: urllib3).
58
+ Pass "httpx" for an httpx-sync client (LDS-5451, opt-in per spec).
57
59
  """
58
60
 
59
61
  properties = [
@@ -66,6 +68,10 @@ def execute_consumer_codegen(openapi_codegen_java_classpath, codegen_name,
66
68
  "generateSourceCodeOnly=true", # Used on client generation to not build setup.py, etc...
67
69
  ]
68
70
 
71
+ # Opt-in (LDS-5451): urllib3 default unchanged; "httpx" also enables the *_sync wrappers.
72
+ if library:
73
+ properties += ["--library", library]
74
+
69
75
  execute_codegen_command(openapi_codegen_java_classpath, codegen_name, api_spec_file_path, outdir, properties,
70
76
  additional_properties)
71
77
 
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-rest-client-codegen
3
- Version: 1.12.3
3
+ Version: 1.12.4
4
4
  Summary: Python rest client codegen for Le Comptoir Des Pharmacies
5
5
  Home-page: https://bitbucket.org/lecomptoirdespharmacies/lcdp-openapi-codegen
6
6
  Author: Le Comptoir Des Pharmacies
7
7
  Author-email: g.thrasibule@lecomptoirdespharmacies.fr
8
8
  License: Apache-2.0
9
9
  Keywords: openapi,python-rest-client-codegen,openapi3
10
- Requires-Dist: pydantic==2.9.2
10
+ Requires-Dist: pydantic<3,>=2.11
11
11
  Dynamic: author
12
12
  Dynamic: author-email
13
13
  Dynamic: description
@@ -0,0 +1,9 @@
1
+ python_rest_client_codegen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ python_rest_client_codegen/codegen.py,sha256=3I8UXEC1XjOzlzVr40eczF3f9ARTiRkwJWW1QpSxCR4,3359
3
+ python_rest_client_codegen/openapi-generator-cli.jar,sha256=S4PMxv1DBWyMYxzQGV5RAL0FUJElAlJ7qwmsdhUtqww,31904922
4
+ python_rest_client_codegen/python-rest-client-codegen-tests.jar,sha256=Ztm20IIacb8YRyyZQoYV5AjStSLBD9YAQuiEkF3gS88,516629
5
+ python_rest_client_codegen/python-rest-client-codegen.jar,sha256=h1dJUhkvW3lZd9uBs8eEPyWRs-gjQcYQW-rfHQ_ePH4,22067
6
+ python_rest_client_codegen-1.12.4.dist-info/METADATA,sha256=h3-FfmFWeNaUMbLJEY3dHAhterLd9QyBy1bFic_ANvY,624
7
+ python_rest_client_codegen-1.12.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
8
+ python_rest_client_codegen-1.12.4.dist-info/top_level.txt,sha256=JBvqPcg3-ZBy_oSMQaLm9EWsLmlEetFmk0s47GGyYW8,27
9
+ python_rest_client_codegen-1.12.4.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- python_rest_client_codegen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- python_rest_client_codegen/codegen.py,sha256=vC6UVwFcoW9wItrWtdRqJ_lXfa4rUoyFoqz2-t70z0U,3003
3
- python_rest_client_codegen/openapi-generator-cli.jar,sha256=0Yec9C2jH4z2HPaHmLjvJBivDGvZOlwYcOH_VD-7k2U,29755831
4
- python_rest_client_codegen/python-rest-client-codegen-tests.jar,sha256=7u9RrCCOhGzOQSQE7A68yjn9ZnNltvWVcMdB3_IEm7E,458090
5
- python_rest_client_codegen/python-rest-client-codegen.jar,sha256=HkkiYQtr20_49SgiSHGgEPGuf2no2CDtiIuAg3q-_JA,21400
6
- python_rest_client_codegen-1.12.3.dist-info/METADATA,sha256=F2NnzlDRfmrxxuoxIWLSNVgBGT4Hw96NOe35E6LucBk,622
7
- python_rest_client_codegen-1.12.3.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
8
- python_rest_client_codegen-1.12.3.dist-info/top_level.txt,sha256=JBvqPcg3-ZBy_oSMQaLm9EWsLmlEetFmk0s47GGyYW8,27
9
- python_rest_client_codegen-1.12.3.dist-info/RECORD,,