openapi-python-generator 1.2.1.dev1757316547__py3-none-any.whl → 1.2.1.dev1757316968__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.
@@ -191,7 +191,9 @@ def type_converter( # noqa: C901
191
191
  converted_type = pre_type + "bool" + post_type
192
192
  elif schema.type == "array" or str(schema.type) == "DataType.ARRAY":
193
193
  retVal = pre_type + "List["
194
- if isinstance(schema.items, Reference30) or isinstance(schema.items, Reference31):
194
+ if isinstance(schema.items, Reference30) or isinstance(
195
+ schema.items, Reference31
196
+ ):
195
197
  converted_reference = _generate_property_from_reference(
196
198
  model_name or "", "", schema.items, schema, required
197
199
  )
@@ -61,7 +61,7 @@ def is_response_type(obj) -> bool:
61
61
 
62
62
 
63
63
  def create_media_type_for_reference(
64
- reference_obj: Union[Response30, Reference30 , Response31 , Reference31],
64
+ reference_obj: Union[Response30, Reference30, Response31, Reference31],
65
65
  ):
66
66
  """Create a MediaType wrapper for a reference object, using the correct version"""
67
67
  # Check which version the reference object belongs to
@@ -96,7 +96,9 @@ def generate_body_param(operation: Operation) -> Union[str, None]:
96
96
  if operation.requestBody is None:
97
97
  return None
98
98
  else:
99
- if isinstance(operation.requestBody, Reference30) or isinstance(operation.requestBody, Reference31):
99
+ if isinstance(operation.requestBody, Reference30) or isinstance(
100
+ operation.requestBody, Reference31
101
+ ):
100
102
  return "data.dict()"
101
103
 
102
104
  if operation.requestBody.content is None:
@@ -156,18 +158,24 @@ def generate_params(operation: Operation) -> str:
156
158
  required = False
157
159
  param_name_cleaned = common.normalize_symbol(param.name)
158
160
 
159
- if isinstance(param.param_schema, Schema30) or isinstance(param.param_schema, Schema31):
161
+ if isinstance(param.param_schema, Schema30) or isinstance(
162
+ param.param_schema, Schema31
163
+ ):
160
164
  converted_result = (
161
165
  f"{param_name_cleaned} : {type_converter(param.param_schema, param.required).converted_type}"
162
166
  + ("" if param.required else " = None")
163
167
  )
164
168
  required = param.required
165
- elif isinstance(param.param_schema, Reference30) or isinstance(param.param_schema, Reference31):
169
+ elif isinstance(param.param_schema, Reference30) or isinstance(
170
+ param.param_schema, Reference31
171
+ ):
166
172
  converted_result = (
167
173
  f"{param_name_cleaned} : {param.param_schema.ref.split('/')[-1] }"
168
174
  + (
169
175
  ""
170
- if isinstance(param, Reference30) or isinstance(param, Reference31) or param.required
176
+ if isinstance(param, Reference30)
177
+ or isinstance(param, Reference31)
178
+ or param.required
171
179
  else " = None"
172
180
  )
173
181
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openapi-python-generator
3
- Version: 1.2.1.dev1757316547
3
+ Version: 1.2.1.dev1757316968
4
4
  Summary: Openapi Python Generator
5
5
  Home-page: https://github.com/MarcoMuellner/openapi-python-generator
6
6
  License: MIT
@@ -8,8 +8,8 @@ openapi_python_generator/language_converters/python/api_config_generator.py,sha2
8
8
  openapi_python_generator/language_converters/python/common.py,sha256=DJkX9AKTLkrSm3NVNw4KMVObP0B9w4r63UXKI_pc61w,1474
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
- openapi_python_generator/language_converters/python/model_generator.py,sha256=jRWaqd7ZS525xgdvi-8ZvF6B2RiboWrfcjB-nQmhQWU,19497
12
- openapi_python_generator/language_converters/python/service_generator.py,sha256=heEVql1_wQ0pF7emJZFBSNfPBhlaAp---XK-XByH5cY,18016
11
+ openapi_python_generator/language_converters/python/model_generator.py,sha256=BHNqkcqvcu8GoyG9vWC61NYmPQH86fr10CTxCKsI2lU,19519
12
+ openapi_python_generator/language_converters/python/service_generator.py,sha256=8sU3rrEW50BCuK9j9K33O6Sx7ArHAQSOIVLWub13S5I,18144
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-1.2.1.dev1757316547.dist-info/METADATA,sha256=PENsyGA1fn-DFSA24jYoMVQEKwUXJ80r48Cd8P00NfQ,5441
29
- openapi_python_generator-1.2.1.dev1757316547.dist-info/LICENSE,sha256=0myanGwJ2vUOZN12aN95o0My6XEysnnVlbKikYw3pHg,1070
30
- openapi_python_generator-1.2.1.dev1757316547.dist-info/entry_points.txt,sha256=hqE8T8yX5Pkeb2g__7yQrEazkBPwNgTbEHmoOkaYh80,83
31
- openapi_python_generator-1.2.1.dev1757316547.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
32
- openapi_python_generator-1.2.1.dev1757316547.dist-info/RECORD,,
28
+ openapi_python_generator-1.2.1.dev1757316968.dist-info/METADATA,sha256=JxwS3VUJmJUg-NGfTLKI_i2HWDaYy1hwHeew3ZRhe1U,5441
29
+ openapi_python_generator-1.2.1.dev1757316968.dist-info/LICENSE,sha256=0myanGwJ2vUOZN12aN95o0My6XEysnnVlbKikYw3pHg,1070
30
+ openapi_python_generator-1.2.1.dev1757316968.dist-info/entry_points.txt,sha256=hqE8T8yX5Pkeb2g__7yQrEazkBPwNgTbEHmoOkaYh80,83
31
+ openapi_python_generator-1.2.1.dev1757316968.dist-info/WHEEL,sha256=vVCvjcmxuUltf8cYhJ0sJMRDLr1XsPuxEId8YDzbyCY,88
32
+ openapi_python_generator-1.2.1.dev1757316968.dist-info/RECORD,,