From f3a16a2701e84753bcab75787b5c665cb0b38327 Mon Sep 17 00:00:00 2001 From: Juan Berzal Date: Tue, 23 May 2023 12:56:19 +0200 Subject: [PATCH] Update endpoint_module.py.jinja --- .../templates/endpoint_module.py.jinja | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/openapi_python_client/templates/endpoint_module.py.jinja b/openapi_python_client/templates/endpoint_module.py.jinja index a94c6f025..4906093f9 100644 --- a/openapi_python_client/templates/endpoint_module.py.jinja +++ b/openapi_python_client/templates/endpoint_module.py.jinja @@ -20,13 +20,6 @@ from ... import errors def _get_kwargs( {{ arguments(endpoint) | indent(4) }} ) -> Dict[str, Any]: - url = "{}{{ endpoint.path }}".format( - client.base_url - {%- for parameter in endpoint.path_parameters.values() -%} - ,{{parameter.name}}={{parameter.python_name}} - {%- endfor -%} - ) - headers: Dict[str, str] = client.get_headers() cookies: Dict[str, Any] = client.get_cookies() @@ -39,6 +32,13 @@ def _get_kwargs( {{ json_body(endpoint) | indent(4) }} {{ multipart_body(endpoint) | indent(4) }} + + url = "{}{{ endpoint.path }}".format( + client.base_url + {%- for parameter in endpoint.path_parameters.values() -%} + ,{{parameter.name}}={{parameter.python_name}} + {%- endfor -%} + ) return { "method": "{{ endpoint.method }}",