We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fcaf72 commit 0a825aaCopy full SHA for 0a825aa
2 files changed
openapi_python_client/__init__.py
@@ -276,7 +276,11 @@ def _build_api(self) -> None:
276
endpoint_init_path = tag_dir / "__init__.py"
277
endpoint_init_template = self.env.get_template("endpoint_init.py.jinja")
278
endpoint_init_path.write_text(
279
- endpoint_init_template.render(endpoint_collection=collection),
+ endpoint_init_template.render(
280
+ endpoint_collection=collection,
281
+ modules=(utils.PythonIdentifier(endpoint.name, self.config.field_prefix) \
282
+ for endpoint in collection.endpoints),
283
+ ),
284
encoding=self.config.file_encoding,
285
)
286
openapi_python_client/templates/endpoint_init.py.jinja
@@ -1 +1,2 @@
1
""" Contains endpoint functions for accessing the API """
2
+from . import {{ modules | join(", ") }}
0 commit comments