Skip to content

Commit 1b8299e

Browse files
committed
Add enumerate_duplicate_model_names config option
1 parent d46544c commit 1b8299e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

openapi_python_client/config.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ class ConfigFile(BaseModel):
4040
package_name_override: Optional[str] = None
4141
package_version_override: Optional[str] = None
4242
use_path_prefixes_for_title_model_names: bool = True
43+
enumerate_duplicate_model_names: bool = False
4344
post_hooks: Optional[list[str]] = None
4445
docstrings_on_attributes: bool = False
4546
field_prefix: str = "field_"
@@ -70,6 +71,7 @@ class Config:
7071
package_name_override: Optional[str]
7172
package_version_override: Optional[str]
7273
use_path_prefixes_for_title_model_names: bool
74+
enumerate_duplicate_model_names: bool
7375
post_hooks: list[str]
7476
docstrings_on_attributes: bool
7577
field_prefix: str
@@ -112,6 +114,7 @@ def from_sources(
112114
package_name_override=config_file.package_name_override,
113115
package_version_override=config_file.package_version_override,
114116
use_path_prefixes_for_title_model_names=config_file.use_path_prefixes_for_title_model_names,
117+
enumerate_duplicate_model_names=config_file.enumerate_duplicate_model_names,
115118
post_hooks=post_hooks,
116119
docstrings_on_attributes=config_file.docstrings_on_attributes,
117120
field_prefix=config_file.field_prefix,

0 commit comments

Comments
 (0)