openapi-python-client 0.19.0__tar.gz → 0.19.1__tar.gz
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_client-0.19.0 → openapi_python_client-0.19.1}/PKG-INFO +13 -3
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/README.md +10 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/config.py +3 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/bodies.py +1 -1
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/responses.py +3 -3
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/client.py.jinja +8 -8
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/utils.py +4 -1
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/pyproject.toml +2 -2
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/.gitignore +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/LICENSE +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/__init__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/__main__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/cli.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/__init__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/errors.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/openapi.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/__init__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/any.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/boolean.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/const.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/date.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/datetime.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/enum_property.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/file.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/float.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/int.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/list_property.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/model_property.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/none.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/property.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/protocol.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/schemas.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/string.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/properties/union.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/py.typed +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/3.0.3.md +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/3.1.0.md +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/__init__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/data_type.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/LICENSE +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/README.md +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/__init__.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/callback.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/components.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/contact.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/discriminator.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/encoding.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/example.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/external_documentation.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/header.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/info.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/license.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/link.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/media_type.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/oauth_flow.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/oauth_flows.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/open_api.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/operation.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/parameter.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/path_item.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/paths.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/reference.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/request_body.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/response.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/responses.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/schema.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/security_requirement.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/security_scheme.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/server.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/server_variable.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/tag.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/openapi_schema_pydantic/xml.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/parameter_location.py +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/.gitignore.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/README.md.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/api_init.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/endpoint_init.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/endpoint_macros.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/endpoint_module.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/errors.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/helpers.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/int_enum.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/model.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/models_init.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/package_init.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/any_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/boolean_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/date_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/datetime_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/enum_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/file_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/float_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/helpers.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/int_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/list_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/model_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/property_macros.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/property_templates/union_property.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/pyproject.toml.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/pyproject_ruff.toml.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/setup.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/str_enum.py.jinja +0 -0
- {openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/templates/types.py.jinja +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: openapi-python-client
|
|
3
|
-
Version: 0.19.
|
|
3
|
+
Version: 0.19.1
|
|
4
4
|
Summary: Generate modern Python clients from OpenAPI
|
|
5
5
|
Project-URL: repository, https://github.com/openapi-generators/openapi-python-client
|
|
6
6
|
Author-email: Dylan Anthony <contact@dylananthony.com>
|
|
@@ -28,7 +28,7 @@ Requires-Dist: python-dateutil<3.0.0,>=2.8.1
|
|
|
28
28
|
Requires-Dist: pyyaml<7.0,>=6.0
|
|
29
29
|
Requires-Dist: ruff<0.4,>=0.2
|
|
30
30
|
Requires-Dist: shellingham<2.0.0,>=1.3.2
|
|
31
|
-
Requires-Dist: typer<0.
|
|
31
|
+
Requires-Dist: typer<0.12,>0.6
|
|
32
32
|
Requires-Dist: typing-extensions<5.0.0,>=4.8.0
|
|
33
33
|
Description-Content-Type: text/markdown
|
|
34
34
|
|
|
@@ -190,6 +190,16 @@ If this option results in conflicts, you will need to manually override class na
|
|
|
190
190
|
|
|
191
191
|
By default, the timeout for retrieving the schema file via HTTP is 5 seconds. In case there is an error when retrieving the schema, you might try and increase this setting to a higher value.
|
|
192
192
|
|
|
193
|
+
### content_type_overrides
|
|
194
|
+
|
|
195
|
+
Normally, `openapi-python-client` will skip any bodies or responses that it doesn't recognize the content type for.
|
|
196
|
+
This config tells the generator to treat a given content type like another.
|
|
197
|
+
|
|
198
|
+
```yaml
|
|
199
|
+
content_type_overrides:
|
|
200
|
+
application/zip: application/octet-stream
|
|
201
|
+
```
|
|
202
|
+
|
|
193
203
|
[changelog.md]: CHANGELOG.md
|
|
194
204
|
[poetry]: https://python-poetry.org/
|
|
195
205
|
[PDM]: https://pdm-project.org/latest/
|
|
@@ -156,6 +156,16 @@ If this option results in conflicts, you will need to manually override class na
|
|
|
156
156
|
|
|
157
157
|
By default, the timeout for retrieving the schema file via HTTP is 5 seconds. In case there is an error when retrieving the schema, you might try and increase this setting to a higher value.
|
|
158
158
|
|
|
159
|
+
### content_type_overrides
|
|
160
|
+
|
|
161
|
+
Normally, `openapi-python-client` will skip any bodies or responses that it doesn't recognize the content type for.
|
|
162
|
+
This config tells the generator to treat a given content type like another.
|
|
163
|
+
|
|
164
|
+
```yaml
|
|
165
|
+
content_type_overrides:
|
|
166
|
+
application/zip: application/octet-stream
|
|
167
|
+
```
|
|
168
|
+
|
|
159
169
|
[changelog.md]: CHANGELOG.md
|
|
160
170
|
[poetry]: https://python-poetry.org/
|
|
161
171
|
[PDM]: https://pdm-project.org/latest/
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/config.py
RENAMED
|
@@ -35,6 +35,7 @@ class ConfigFile(BaseModel):
|
|
|
35
35
|
"""
|
|
36
36
|
|
|
37
37
|
class_overrides: Optional[Dict[str, ClassOverride]] = None
|
|
38
|
+
content_type_overrides: Optional[Dict[str, str]] = None
|
|
38
39
|
project_name_override: Optional[str] = None
|
|
39
40
|
package_name_override: Optional[str] = None
|
|
40
41
|
package_version_override: Optional[str] = None
|
|
@@ -70,6 +71,7 @@ class Config:
|
|
|
70
71
|
http_timeout: int
|
|
71
72
|
document_source: Union[Path, str]
|
|
72
73
|
file_encoding: str
|
|
74
|
+
content_type_overrides: Dict[str, str]
|
|
73
75
|
|
|
74
76
|
@staticmethod
|
|
75
77
|
def from_sources(
|
|
@@ -91,6 +93,7 @@ class Config:
|
|
|
91
93
|
config = Config(
|
|
92
94
|
meta_type=meta_type,
|
|
93
95
|
class_overrides=config_file.class_overrides or {},
|
|
96
|
+
content_type_overrides=config_file.content_type_overrides or {},
|
|
94
97
|
project_name_override=config_file.project_name_override,
|
|
95
98
|
package_name_override=config_file.package_name_override,
|
|
96
99
|
package_version_override=config_file.package_version_override,
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/bodies.py
RENAMED
|
@@ -56,7 +56,7 @@ def body_from_data(
|
|
|
56
56
|
prefix_type_names = len(body_content) > 1
|
|
57
57
|
|
|
58
58
|
for content_type, media_type in body_content.items():
|
|
59
|
-
simplified_content_type = get_content_type(content_type)
|
|
59
|
+
simplified_content_type = get_content_type(content_type, config)
|
|
60
60
|
if simplified_content_type is None:
|
|
61
61
|
bodies.append(
|
|
62
62
|
ParseError(
|
|
@@ -37,8 +37,8 @@ class Response:
|
|
|
37
37
|
data: Union[oai.Response, oai.Reference] # Original data which created this response, useful for custom templates
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
def _source_by_content_type(content_type: str) -> Optional[_ResponseSource]:
|
|
41
|
-
parsed_content_type = utils.get_content_type(content_type)
|
|
40
|
+
def _source_by_content_type(content_type: str, config: Config) -> Optional[_ResponseSource]:
|
|
41
|
+
parsed_content_type = utils.get_content_type(content_type, config)
|
|
42
42
|
if parsed_content_type is None:
|
|
43
43
|
return None
|
|
44
44
|
|
|
@@ -114,7 +114,7 @@ def response_from_data(
|
|
|
114
114
|
)
|
|
115
115
|
|
|
116
116
|
for content_type, media_type in content.items():
|
|
117
|
-
source = _source_by_content_type(content_type)
|
|
117
|
+
source = _source_by_content_type(content_type, config)
|
|
118
118
|
if source is not None:
|
|
119
119
|
schema_data = media_type.media_type_schema
|
|
120
120
|
break
|
|
@@ -37,13 +37,13 @@ class Client:
|
|
|
37
37
|
"""
|
|
38
38
|
{% macro attributes() %}
|
|
39
39
|
raise_on_unexpected_status: bool = field(default=False, kw_only=True)
|
|
40
|
-
_base_url: str
|
|
41
|
-
_cookies: Dict[str, str] = field(factory=dict, kw_only=True)
|
|
42
|
-
_headers: Dict[str, str] = field(factory=dict, kw_only=True)
|
|
43
|
-
_timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True)
|
|
44
|
-
_verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True)
|
|
45
|
-
_follow_redirects: bool = field(default=False, kw_only=True)
|
|
46
|
-
_httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True)
|
|
40
|
+
_base_url: str = field(alias="base_url")
|
|
41
|
+
_cookies: Dict[str, str] = field(factory=dict, kw_only=True, alias="cookies")
|
|
42
|
+
_headers: Dict[str, str] = field(factory=dict, kw_only=True, alias="headers")
|
|
43
|
+
_timeout: Optional[httpx.Timeout] = field(default=None, kw_only=True, alias="timeout")
|
|
44
|
+
_verify_ssl: Union[str, bool, ssl.SSLContext] = field(default=True, kw_only=True, alias="verify_ssl")
|
|
45
|
+
_follow_redirects: bool = field(default=False, kw_only=True, alias="follow_redirects")
|
|
46
|
+
_httpx_args: Dict[str, Any] = field(factory=dict, kw_only=True, alias="httpx_args")
|
|
47
47
|
_client: Optional[httpx.Client] = field(default=None, init=False)
|
|
48
48
|
_async_client: Optional[httpx.AsyncClient] = field(default=None, init=False)
|
|
49
49
|
{% endmacro %}{{ attributes() }}
|
|
@@ -163,4 +163,4 @@ class AuthenticatedClient:
|
|
|
163
163
|
auth_header_name: str = "Authorization"
|
|
164
164
|
|
|
165
165
|
{{ builders("AuthenticatedClient") }}
|
|
166
|
-
{{ httpx_stuff("AuthenticatedClient", "self._headers[self.auth_header_name] = f\"{self.prefix} {self.token}\" if self.prefix else self.token") }}
|
|
166
|
+
{{ httpx_stuff("AuthenticatedClient", "self._headers[self.auth_header_name] = f\"{self.prefix} {self.token}\" if self.prefix else self.token") }}
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/utils.py
RENAMED
|
@@ -6,6 +6,8 @@ from email.message import Message
|
|
|
6
6
|
from keyword import iskeyword
|
|
7
7
|
from typing import Any
|
|
8
8
|
|
|
9
|
+
from .config import Config
|
|
10
|
+
|
|
9
11
|
DELIMITERS = r"\. _-"
|
|
10
12
|
|
|
11
13
|
|
|
@@ -105,10 +107,11 @@ def remove_string_escapes(value: str) -> str:
|
|
|
105
107
|
return value.replace('"', r"\"")
|
|
106
108
|
|
|
107
109
|
|
|
108
|
-
def get_content_type(content_type: str) -> str | None:
|
|
110
|
+
def get_content_type(content_type: str, config: Config) -> str | None:
|
|
109
111
|
"""
|
|
110
112
|
Given a string representing a content type with optional parameters, returns the content type only
|
|
111
113
|
"""
|
|
114
|
+
content_type = config.content_type_overrides.get(content_type, content_type)
|
|
112
115
|
message = Message()
|
|
113
116
|
message.add_header("Content-Type", content_type)
|
|
114
117
|
|
|
@@ -6,7 +6,7 @@ license = { text = "MIT" }
|
|
|
6
6
|
requires-python = ">=3.8,<4.0"
|
|
7
7
|
dependencies = [
|
|
8
8
|
"jinja2>=3.0.0,<4.0.0",
|
|
9
|
-
"typer>0.6,<0.
|
|
9
|
+
"typer>0.6,<0.12",
|
|
10
10
|
"colorama>=0.4.3; sys_platform == \"win32\"",
|
|
11
11
|
"shellingham>=1.3.2,<2.0.0",
|
|
12
12
|
"pydantic>=2.1.1,<3.0.0",
|
|
@@ -18,7 +18,7 @@ dependencies = [
|
|
|
18
18
|
"typing-extensions>=4.8.0,<5.0.0",
|
|
19
19
|
]
|
|
20
20
|
name = "openapi-python-client"
|
|
21
|
-
version = "0.19.
|
|
21
|
+
version = "0.19.1"
|
|
22
22
|
description = "Generate modern Python clients from OpenAPI"
|
|
23
23
|
keywords = [
|
|
24
24
|
"OpenAPI",
|
|
File without changes
|
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/__init__.py
RENAMED
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/parser/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/py.typed
RENAMED
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/3.0.3.md
RENAMED
|
File without changes
|
{openapi_python_client-0.19.0 → openapi_python_client-0.19.1}/openapi_python_client/schema/3.1.0.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|