Skip to content

Commit a51c29c

Browse files
Reroute HTTP generation through our requests wrapper.
- Disable switching between HTTP implementations. - Add relative import to local requests wrapper.
1 parent 202e868 commit a51c29c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/openapi_python_generator/language_converters/python/templates/requests.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def {{ operation_id }}({{ params }} api_config_override : Optional[APIConfig] =
1717

1818
query_params = {key:value for (key,value) in query_params.items() if value is not None}
1919

20-
response = requests.request(
20+
response = request(
2121
'{{ method }}',
2222
f'{base_path}{path}',
2323
headers=headers,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from typing import *
2-
import {{ library_import }}
32
import json
43
{% if use_orjson %}
54
import orjson
65
{% endif %}
76

87
from ..models import *
8+
from ..requests import request
99
from ..api_config import APIConfig, HTTPException
1010

1111
{{ content | safe}}

0 commit comments

Comments
 (0)