Repository: openapi-generators/openapi-python-client (language: python)

Issue:
Since  d28bc12 we generate broken code if there is a field called `field`
**Describe the bug**

Prior to d28bc12aca14f8ef03c6848b94cdd812840434c7 the generated code says `import attr` afterwards the generated code says `from attrs import define, field` instead. This new import of `field` can be shadowed by a field called `field`. Resulting in generated code that makes Python complain:

    some_dict: Dict[str, Any] = field(init=False, factory=dict)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: 'Unset' object is not callable

**To Reproduce**

Put the OpenAPI Spec File below into `demo.json`.

Put this Python into demo.py:

	import sys
	sys.path.append('demo-api-client')
	from demo_api_client.models import *

Then give these commands:

	openapi-python-client generate --path demo.json
	demo.py
	
The response from `demo.py` is

	Traceback (most recent call last):
	  File "C:\projects\dot\openapi-python-client7\demo.py", line 4, in <module>
		from demo_api_client.models.get_user_response_200 import GetUserResponse200
	  File "C:\projects\dot\openapi-python-client7\demo-api-client\demo_api_client\models\__init__.py", line 3, in <module>
		from .field_defs import FieldDefs
	  File "C:\projects\dot\openapi-python-client7\demo-api-client\demo_api_client\models\field_defs.py", line 11, in <module>
		class FieldDefs:
	  File "C:\projects\dot\openapi-python-client7\demo-api-client\demo_api_client\models\field_defs.py", line 18, in FieldDefs
		additional_properties: Dict[str, Any] = field(init=False, factory=dict)
												^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	TypeError: 'Unset' object is not callable

**Expected behavior**
A field called `field` should continue to work.

**OpenAPI Spec File**

	{
		"openapi": "3.0.3",
		"servers": [
			{
				"url": "https://localhost:8080",
				"description": "___"
			}
		],
		"info": {
			"title": "Demo API",
			"version": "1.1.1"
		},
		"paths": {
			"/user": {
				"get": {
					"description": "___",
					"responses": {
						"200": {
							"description": "___"
						}
					},
					"summary": "___",
					"tags": [
						"utility"
					]
				}
			}
		},
		"components": {
			"schemas": {
				"FieldDefs": {
					"type": "object",
					"properties": {
						"field": {
							"type": "string",
							"description": "___"
						}
					}
				}
			}
		}
	}





Discussion / hints:
Whoops! Thanks for reporting, I'll prioritize fixing this!
Good news. Thank you!

For now, as I work around, I'm using the previous version `pip install openapi-python-client==0.14.1`.
I have this issue as well, thanks for prioritizing it!

Fix patch:
diff --git a/openapi_python_client/templates/model.py.jinja b/openapi_python_client/templates/model.py.jinja
index 64d67795d..3d5b55515 100644
--- a/openapi_python_client/templates/model.py.jinja
+++ b/openapi_python_client/templates/model.py.jinja
@@ -5,7 +5,8 @@ from typing import List
 
 {% endif %}
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 {% if model.is_multipart_body %}
 import json
 {% endif %}
@@ -58,7 +59,7 @@ T = TypeVar("T", bound="{{ class_name }}")
     {% endfor %}{% endif %}
 {% endmacro %}
 
-@define
+@_attrs_define
 class {{ class_name }}:
     {{ safe_docstring(class_docstring_content(model)) | indent(4) }}
 
@@ -73,7 +74,7 @@ class {{ class_name }}:
     {% endif %}
     {% endfor %}
     {% if model.additional_properties %}
-    additional_properties: Dict[str, {{ additional_property_type }}] = field(init=False, factory=dict)
+    additional_properties: Dict[str, {{ additional_property_type }}] = _attrs_field(init=False, factory=dict)
     {% endif %}
 
 {% macro _to_dict(multipart=False) %}


Test patch:
diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py
index 15e304e77..969248a72 100644
--- a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py
+++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/__init__.py
@@ -4,6 +4,7 @@
 
 from .default import DefaultEndpoints
 from .location import LocationEndpoints
+from .naming import NamingEndpoints
 from .parameter_references import ParameterReferencesEndpoints
 from .parameters import ParametersEndpoints
 from .responses import ResponsesEndpoints
@@ -41,6 +42,10 @@ def location(cls) -> Type[LocationEndpoints]:
     def true_(cls) -> Type[True_Endpoints]:
         return True_Endpoints
 
+    @classmethod
+    def naming(cls) -> Type[NamingEndpoints]:
+        return NamingEndpoints
+
     @classmethod
     def parameter_references(cls) -> Type[ParameterReferencesEndpoints]:
         return ParameterReferencesEndpoints
diff --git a/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py
new file mode 100644
index 000000000..2931a25d4
--- /dev/null
+++ b/end_to_end_tests/custom-templates-golden-record/my_test_api_client/api/naming/__init__.py
@@ -0,0 +1,11 @@
+""" Contains methods for accessing the API Endpoints """
+
+import types
+
+from . import post_naming_property_conflict_with_import
+
+
+class NamingEndpoints:
+    @classmethod
+    def post_naming_property_conflict_with_import(cls) -> types.ModuleType:
+        return post_naming_property_conflict_with_import
diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/naming/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/api/naming/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py b/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py
new file mode 100644
index 000000000..ef3b0acfd
--- /dev/null
+++ b/end_to_end_tests/golden-record/my_test_api_client/api/naming/post_naming_property_conflict_with_import.py
@@ -0,0 +1,153 @@
+from http import HTTPStatus
+from typing import Any, Dict, Optional, Union
+
+import httpx
+
+from ... import errors
+from ...client import AuthenticatedClient, Client
+from ...models.post_naming_property_conflict_with_import_json_body import PostNamingPropertyConflictWithImportJsonBody
+from ...models.post_naming_property_conflict_with_import_response_200 import (
+    PostNamingPropertyConflictWithImportResponse200,
+)
+from ...types import Response
+
+
+def _get_kwargs(
+    *,
+    json_body: PostNamingPropertyConflictWithImportJsonBody,
+) -> Dict[str, Any]:
+    pass
+
+    json_json_body = json_body.to_dict()
+
+    return {
+        "method": "post",
+        "url": "/naming/property-conflict-with-import",
+        "json": json_json_body,
+    }
+
+
+def _parse_response(
+    *, client: Union[AuthenticatedClient, Client], response: httpx.Response
+) -> Optional[PostNamingPropertyConflictWithImportResponse200]:
+    if response.status_code == HTTPStatus.OK:
+        response_200 = PostNamingPropertyConflictWithImportResponse200.from_dict(response.json())
+
+        return response_200
+    if client.raise_on_unexpected_status:
+        raise errors.UnexpectedStatus(response.status_code, response.content)
+    else:
+        return None
+
+
+def _build_response(
+    *, client: Union[AuthenticatedClient, Client], response: httpx.Response
+) -> Response[PostNamingPropertyConflictWithImportResponse200]:
+    return Response(
+        status_code=HTTPStatus(response.status_code),
+        content=response.content,
+        headers=response.headers,
+        parsed=_parse_response(client=client, response=response),
+    )
+
+
+def sync_detailed(
+    *,
+    client: Union[AuthenticatedClient, Client],
+    json_body: PostNamingPropertyConflictWithImportJsonBody,
+) -> Response[PostNamingPropertyConflictWithImportResponse200]:
+    """
+    Args:
+        json_body (PostNamingPropertyConflictWithImportJsonBody):
+
+    Raises:
+        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+        httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+    Returns:
+        Response[PostNamingPropertyConflictWithImportResponse200]
+    """
+
+    kwargs = _get_kwargs(
+        json_body=json_body,
+    )
+
+    response = client.get_httpx_client().request(
+        **kwargs,
+    )
+
+    return _build_response(client=client, response=response)
+
+
+def sync(
+    *,
+    client: Union[AuthenticatedClient, Client],
+    json_body: PostNamingPropertyConflictWithImportJsonBody,
+) -> Optional[PostNamingPropertyConflictWithImportResponse200]:
+    """
+    Args:
+        json_body (PostNamingPropertyConflictWithImportJsonBody):
+
+    Raises:
+        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+        httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+    Returns:
+        PostNamingPropertyConflictWithImportResponse200
+    """
+
+    return sync_detailed(
+        client=client,
+        json_body=json_body,
+    ).parsed
+
+
+async def asyncio_detailed(
+    *,
+    client: Union[AuthenticatedClient, Client],
+    json_body: PostNamingPropertyConflictWithImportJsonBody,
+) -> Response[PostNamingPropertyConflictWithImportResponse200]:
+    """
+    Args:
+        json_body (PostNamingPropertyConflictWithImportJsonBody):
+
+    Raises:
+        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+        httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+    Returns:
+        Response[PostNamingPropertyConflictWithImportResponse200]
+    """
+
+    kwargs = _get_kwargs(
+        json_body=json_body,
+    )
+
+    response = await client.get_async_httpx_client().request(**kwargs)
+
+    return _build_response(client=client, response=response)
+
+
+async def asyncio(
+    *,
+    client: Union[AuthenticatedClient, Client],
+    json_body: PostNamingPropertyConflictWithImportJsonBody,
+) -> Optional[PostNamingPropertyConflictWithImportResponse200]:
+    """
+    Args:
+        json_body (PostNamingPropertyConflictWithImportJsonBody):
+
+    Raises:
+        errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
+        httpx.TimeoutException: If the request takes longer than Client.timeout.
+
+    Returns:
+        PostNamingPropertyConflictWithImportResponse200
+    """
+
+    return (
+        await asyncio_detailed(
+            client=client,
+            json_body=json_body,
+        )
+    ).parsed
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py b/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py
index f63501d10..d5be8c46c 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/__init__.py
@@ -64,6 +64,8 @@
 from .model_with_union_property_inlined_fruit_type_1 import ModelWithUnionPropertyInlinedFruitType1
 from .none import None_
 from .post_form_data_inline_data import PostFormDataInlineData
+from .post_naming_property_conflict_with_import_json_body import PostNamingPropertyConflictWithImportJsonBody
+from .post_naming_property_conflict_with_import_response_200 import PostNamingPropertyConflictWithImportResponse200
 from .post_responses_unions_simple_before_complex_response_200 import PostResponsesUnionsSimpleBeforeComplexResponse200
 from .post_responses_unions_simple_before_complex_response_200a_type_1 import (
     PostResponsesUnionsSimpleBeforeComplexResponse200AType1,
@@ -129,6 +131,8 @@
     "ModelWithUnionPropertyInlinedFruitType1",
     "None_",
     "PostFormDataInlineData",
+    "PostNamingPropertyConflictWithImportJsonBody",
+    "PostNamingPropertyConflictWithImportResponse200",
     "PostResponsesUnionsSimpleBeforeComplexResponse200",
     "PostResponsesUnionsSimpleBeforeComplexResponse200AType1",
     "TestInlineObjectsJsonBody",
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py
index 935cbcdc9..cbc06dded 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_form_data.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="AFormData")
 
 
-@define
+@_attrs_define
 class AFormData:
     """
     Attributes:
@@ -17,7 +18,7 @@ class AFormData:
 
     an_required_field: str
     an_optional_field: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         an_required_field = self.an_required_field
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py
index 398b471be..6ac9c21b2 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_model.py
@@ -1,7 +1,7 @@
 import datetime
 from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type, TypeVar, Union, cast
 
-from attrs import define
+from attrs import define as _attrs_define
 from dateutil.parser import isoparse
 
 from ..models.an_all_of_enum import AnAllOfEnum
@@ -17,7 +17,7 @@
 T = TypeVar("T", bound="AModel")
 
 
-@define
+@_attrs_define
 class AModel:
     """A Model for testing all the ways custom objects can be used
 
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py
index c252fd73b..5dd1c1d9b 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/a_model_with_properties_reference_that_are_not_object.py
@@ -2,7 +2,8 @@
 from io import BytesIO
 from typing import Any, Dict, List, Type, TypeVar, cast
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 from dateutil.parser import isoparse
 
 from ..models.an_enum import AnEnum
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="AModelWithPropertiesReferenceThatAreNotObject")
 
 
-@define
+@_attrs_define
 class AModelWithPropertiesReferenceThatAreNotObject:
     """
     Attributes:
@@ -77,7 +78,7 @@ class AModelWithPropertiesReferenceThatAreNotObject:
     double_property_ref: float
     file_property_ref: File
     bytestream_property_ref: str
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         enum_properties_ref = []
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py
index a0aaa36ba..2fb61da98 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_has_properties_but_no_type.py
@@ -1,6 +1,7 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..models.all_of_has_properties_but_no_type_type_enum import AllOfHasPropertiesButNoTypeTypeEnum
 from ..types import UNSET, Unset
@@ -8,7 +9,7 @@
 T = TypeVar("T", bound="AllOfHasPropertiesButNoType")
 
 
-@define
+@_attrs_define
 class AllOfHasPropertiesButNoType:
     """
     Attributes:
@@ -20,7 +21,7 @@ class AllOfHasPropertiesButNoType:
     a_sub_property: Union[Unset, str] = UNSET
     type: Union[Unset, str] = UNSET
     type_enum: Union[Unset, AllOfHasPropertiesButNoTypeTypeEnum] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_sub_property = self.a_sub_property
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py
index 715b799dd..f7e8dc4c2 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/all_of_sub_model.py
@@ -1,6 +1,7 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..models.all_of_sub_model_type_enum import AllOfSubModelTypeEnum
 from ..types import UNSET, Unset
@@ -8,7 +9,7 @@
 T = TypeVar("T", bound="AllOfSubModel")
 
 
-@define
+@_attrs_define
 class AllOfSubModel:
     """
     Attributes:
@@ -20,7 +21,7 @@ class AllOfSubModel:
     a_sub_property: Union[Unset, str] = UNSET
     type: Union[Unset, str] = UNSET
     type_enum: Union[Unset, AllOfSubModelTypeEnum] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_sub_property = self.a_sub_property
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py
index 522060c3d..90a7c75a2 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_a_item.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="AnArrayWithACircularRefInItemsObjectAItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithACircularRefInItemsObjectAItem:
     """
     Attributes:
@@ -19,7 +20,7 @@ class AnArrayWithACircularRefInItemsObjectAItem:
     """
 
     circular: Union[Unset, List["AnArrayWithACircularRefInItemsObjectBItem"]] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         circular: Union[Unset, List[Dict[str, Any]]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py
index 642c0a2c6..01f4cd92f 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_a_item.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.an_array_with_a_circular_ref_in_items_object_additional_properties_b_item import (
@@ -11,13 +12,13 @@
 T = TypeVar("T", bound="AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem:
     """ """
 
-    additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]] = field(
-        init=False, factory=dict
-    )
+    additional_properties: Dict[
+        str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem"]
+    ] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         pass
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py
index b8663c92f..c6074744b 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_additional_properties_b_item.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.an_array_with_a_circular_ref_in_items_object_additional_properties_a_item import (
@@ -11,13 +12,13 @@
 T = TypeVar("T", bound="AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithACircularRefInItemsObjectAdditionalPropertiesBItem:
     """ """
 
-    additional_properties: Dict[str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]] = field(
-        init=False, factory=dict
-    )
+    additional_properties: Dict[
+        str, List["AnArrayWithACircularRefInItemsObjectAdditionalPropertiesAItem"]
+    ] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         pass
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py
index f544e03cb..c1fb4a307 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_circular_ref_in_items_object_b_item.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="AnArrayWithACircularRefInItemsObjectBItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithACircularRefInItemsObjectBItem:
     """
     Attributes:
@@ -19,7 +20,7 @@ class AnArrayWithACircularRefInItemsObjectBItem:
     """
 
     circular: Union[Unset, List["AnArrayWithACircularRefInItemsObjectAItem"]] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         circular: Union[Unset, List[Dict[str, Any]]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py
index 53510fb08..37869fe03 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_additional_properties_item.py
@@ -1,17 +1,18 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem:
     """ """
 
-    additional_properties: Dict[str, List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]] = field(
-        init=False, factory=dict
-    )
+    additional_properties: Dict[
+        str, List["AnArrayWithARecursiveRefInItemsObjectAdditionalPropertiesItem"]
+    ] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py
index 5131c6f5d..f0ba27860 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/an_array_with_a_recursive_ref_in_items_object_item.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="AnArrayWithARecursiveRefInItemsObjectItem")
 
 
-@define
+@_attrs_define
 class AnArrayWithARecursiveRefInItemsObjectItem:
     """
     Attributes:
@@ -15,7 +16,7 @@ class AnArrayWithARecursiveRefInItemsObjectItem:
     """
 
     recursive: Union[Unset, List["AnArrayWithARecursiveRefInItemsObjectItem"]] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         recursive: Union[Unset, List[Dict[str, Any]]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py
index cb8d859ab..73d7cbb94 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/another_all_of_sub_model.py
@@ -1,6 +1,7 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..models.another_all_of_sub_model_type import AnotherAllOfSubModelType
 from ..models.another_all_of_sub_model_type_enum import AnotherAllOfSubModelTypeEnum
@@ -9,7 +10,7 @@
 T = TypeVar("T", bound="AnotherAllOfSubModel")
 
 
-@define
+@_attrs_define
 class AnotherAllOfSubModel:
     """
     Attributes:
@@ -21,7 +22,7 @@ class AnotherAllOfSubModel:
     another_sub_property: Union[Unset, str] = UNSET
     type: Union[Unset, AnotherAllOfSubModelType] = UNSET
     type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         another_sub_property = self.another_sub_property
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py
index e12262723..5217c4929 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post.py
@@ -3,7 +3,8 @@
 from io import BytesIO
 from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 from dateutil.parser import isoparse
 
 from ..models.different_enum import DifferentEnum
@@ -25,7 +26,7 @@
 T = TypeVar("T", bound="BodyUploadFileTestsUploadPost")
 
 
-@define
+@_attrs_define
 class BodyUploadFileTestsUploadPost:
     """
     Attributes:
@@ -53,7 +54,7 @@ class BodyUploadFileTestsUploadPost:
     some_array: Union[Unset, List[float]] = UNSET
     some_optional_object: Union[Unset, "BodyUploadFileTestsUploadPostSomeOptionalObject"] = UNSET
     some_enum: Union[Unset, DifferentEnum] = UNSET
-    additional_properties: Dict[str, "BodyUploadFileTestsUploadPostAdditionalProperty"] = field(
+    additional_properties: Dict[str, "BodyUploadFileTestsUploadPostAdditionalProperty"] = _attrs_field(
         init=False, factory=dict
     )
 
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py
index 0344ca91b..f855d9c61 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_additional_property.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="BodyUploadFileTestsUploadPostAdditionalProperty")
 
 
-@define
+@_attrs_define
 class BodyUploadFileTestsUploadPostAdditionalProperty:
     """
     Attributes:
@@ -15,7 +16,7 @@ class BodyUploadFileTestsUploadPostAdditionalProperty:
     """
 
     foo: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         foo = self.foo
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py
index 118dc4e65..9762b7efa 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_nullable_object.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="BodyUploadFileTestsUploadPostSomeNullableObject")
 
 
-@define
+@_attrs_define
 class BodyUploadFileTestsUploadPostSomeNullableObject:
     """
     Attributes:
@@ -15,7 +16,7 @@ class BodyUploadFileTestsUploadPostSomeNullableObject:
     """
 
     bar: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         bar = self.bar
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py
index 6e4fe5b5e..c59c287c9 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_object.py
@@ -1,11 +1,12 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="BodyUploadFileTestsUploadPostSomeObject")
 
 
-@define
+@_attrs_define
 class BodyUploadFileTestsUploadPostSomeObject:
     """
     Attributes:
@@ -15,7 +16,7 @@ class BodyUploadFileTestsUploadPostSomeObject:
 
     num: float
     text: str
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         num = self.num
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py
index c84222b31..711b34e63 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/body_upload_file_tests_upload_post_some_optional_object.py
@@ -1,11 +1,12 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="BodyUploadFileTestsUploadPostSomeOptionalObject")
 
 
-@define
+@_attrs_define
 class BodyUploadFileTestsUploadPostSomeOptionalObject:
     """
     Attributes:
@@ -13,7 +14,7 @@ class BodyUploadFileTestsUploadPostSomeOptionalObject:
     """
 
     foo: str
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         foo = self.foo
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py b/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py
index 36c751f02..327a5d3d7 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/free_form_model.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="FreeFormModel")
 
 
-@define
+@_attrs_define
 class FreeFormModel:
     """ """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py b/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py
index 7e57b8016..e89e3d212 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/http_validation_error.py
@@ -1,6 +1,6 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define
+from attrs import define as _attrs_define
 
 from ..types import UNSET, Unset
 
@@ -11,7 +11,7 @@
 T = TypeVar("T", bound="HTTPValidationError")
 
 
-@define
+@_attrs_define
 class HTTPValidationError:
     """
     Attributes:
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/import_.py b/end_to_end_tests/golden-record/my_test_api_client/models/import_.py
index 36c14a4ff..f5a7deecf 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/import_.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/import_.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="Import")
 
 
-@define
+@_attrs_define
 class Import:
     """ """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py
index e6932c37a..d03595a4b 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_from_all_of.py
@@ -1,6 +1,7 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..models.another_all_of_sub_model_type import AnotherAllOfSubModelType
 from ..models.another_all_of_sub_model_type_enum import AnotherAllOfSubModelTypeEnum
@@ -9,7 +10,7 @@
 T = TypeVar("T", bound="ModelFromAllOf")
 
 
-@define
+@_attrs_define
 class ModelFromAllOf:
     """
     Attributes:
@@ -23,7 +24,7 @@ class ModelFromAllOf:
     type: Union[Unset, AnotherAllOfSubModelType] = UNSET
     type_enum: Union[Unset, AnotherAllOfSubModelTypeEnum] = UNSET
     another_sub_property: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_sub_property = self.a_sub_property
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py
index c243d6d00..fa840976e 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_name.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="ModelName")
 
 
-@define
+@_attrs_define
 class ModelName:
     """ """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py
index f58db6ca6..492b4f8f7 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_reference_with_periods.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="ModelReferenceWithPeriods")
 
 
-@define
+@_attrs_define
 class ModelReferenceWithPeriods:
     """A Model with periods in its reference"""
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py
index fa5e81ae8..048856548 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -13,7 +14,7 @@
 T = TypeVar("T", bound="ModelWithAdditionalPropertiesInlined")
 
 
-@define
+@_attrs_define
 class ModelWithAdditionalPropertiesInlined:
     """
     Attributes:
@@ -21,7 +22,7 @@ class ModelWithAdditionalPropertiesInlined:
     """
 
     a_number: Union[Unset, float] = UNSET
-    additional_properties: Dict[str, "ModelWithAdditionalPropertiesInlinedAdditionalProperty"] = field(
+    additional_properties: Dict[str, "ModelWithAdditionalPropertiesInlinedAdditionalProperty"] = _attrs_field(
         init=False, factory=dict
     )
 
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py
index 8ab4b7ac5..e06a94bfc 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_inlined_additional_property.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="ModelWithAdditionalPropertiesInlinedAdditionalProperty")
 
 
-@define
+@_attrs_define
 class ModelWithAdditionalPropertiesInlinedAdditionalProperty:
     """
     Attributes:
@@ -15,7 +16,7 @@ class ModelWithAdditionalPropertiesInlinedAdditionalProperty:
     """
 
     extra_props_prop: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         extra_props_prop = self.extra_props_prop
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py
index 05a57116c..181829a2c 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_additional_properties_refed.py
@@ -1,17 +1,18 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..models.an_enum import AnEnum
 
 T = TypeVar("T", bound="ModelWithAdditionalPropertiesRefed")
 
 
-@define
+@_attrs_define
 class ModelWithAdditionalPropertiesRefed:
     """ """
 
-    additional_properties: Dict[str, AnEnum] = field(init=False, factory=dict)
+    additional_properties: Dict[str, AnEnum] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py
index 2aa80ff96..d9c4561a4 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.model_with_any_json_properties_additional_property_type_0 import (
@@ -11,13 +12,13 @@
 T = TypeVar("T", bound="ModelWithAnyJsonProperties")
 
 
-@define
+@_attrs_define
 class ModelWithAnyJsonProperties:
     """ """
 
     additional_properties: Dict[
         str, Union["ModelWithAnyJsonPropertiesAdditionalPropertyType0", List[str], bool, float, int, str]
-    ] = field(init=False, factory=dict)
+    ] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         from ..models.model_with_any_json_properties_additional_property_type_0 import (
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property_type_0.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property_type_0.py
index 91554ccfb..d167d50d7 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property_type_0.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_any_json_properties_additional_property_type_0.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="ModelWithAnyJsonPropertiesAdditionalPropertyType0")
 
 
-@define
+@_attrs_define
 class ModelWithAnyJsonPropertiesAdditionalPropertyType0:
     """ """
 
-    additional_properties: Dict[str, str] = field(init=False, factory=dict)
+    additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py
index 8b5fa87b9..5485cf978 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_backslash_in_description.py
@@ -1,17 +1,18 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="ModelWithBackslashInDescription")
 
 
-@define
+@_attrs_define
 class ModelWithBackslashInDescription:
     r""" Description with special character: \
 
      """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py
index 444e01a5a..73cfb1287 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_a.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="ModelWithCircularRefA")
 
 
-@define
+@_attrs_define
 class ModelWithCircularRefA:
     """
     Attributes:
@@ -19,7 +20,7 @@ class ModelWithCircularRefA:
     """
 
     circular: Union[Unset, "ModelWithCircularRefB"] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         circular: Union[Unset, Dict[str, Any]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py
index 57f267882..0628d89ae 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_b.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="ModelWithCircularRefB")
 
 
-@define
+@_attrs_define
 class ModelWithCircularRefB:
     """
     Attributes:
@@ -19,7 +20,7 @@ class ModelWithCircularRefB:
     """
 
     circular: Union[Unset, "ModelWithCircularRefA"] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         circular: Union[Unset, Dict[str, Any]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py
index a55ac59f4..206568f8b 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_a.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.model_with_circular_ref_in_additional_properties_b import ModelWithCircularRefInAdditionalPropertiesB
@@ -9,11 +10,13 @@
 T = TypeVar("T", bound="ModelWithCircularRefInAdditionalPropertiesA")
 
 
-@define
+@_attrs_define
 class ModelWithCircularRefInAdditionalPropertiesA:
     """ """
 
-    additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesB"] = field(init=False, factory=dict)
+    additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesB"] = _attrs_field(
+        init=False, factory=dict
+    )
 
     def to_dict(self) -> Dict[str, Any]:
         pass
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py
index e2a6f8a64..7efc724c7 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_circular_ref_in_additional_properties_b.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.model_with_circular_ref_in_additional_properties_a import ModelWithCircularRefInAdditionalPropertiesA
@@ -9,11 +10,13 @@
 T = TypeVar("T", bound="ModelWithCircularRefInAdditionalPropertiesB")
 
 
-@define
+@_attrs_define
 class ModelWithCircularRefInAdditionalPropertiesB:
     """ """
 
-    additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesA"] = field(init=False, factory=dict)
+    additional_properties: Dict[str, "ModelWithCircularRefInAdditionalPropertiesA"] = _attrs_field(
+        init=False, factory=dict
+    )
 
     def to_dict(self) -> Dict[str, Any]:
         pass
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py
index f6daa6b8e..658b2352d 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py
@@ -1,7 +1,8 @@
 import datetime
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 from dateutil.parser import isoparse
 
 from ..types import UNSET, Unset
@@ -9,7 +10,7 @@
 T = TypeVar("T", bound="ModelWithDateTimeProperty")
 
 
-@define
+@_attrs_define
 class ModelWithDateTimeProperty:
     """
     Attributes:
@@ -17,7 +18,7 @@ class ModelWithDateTimeProperty:
     """
 
     datetime_: Union[Unset, datetime.datetime] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         datetime_: Union[Unset, str] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py
index 1d009fa92..94afa7653 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -13,7 +14,7 @@
 T = TypeVar("T", bound="ModelWithPrimitiveAdditionalProperties")
 
 
-@define
+@_attrs_define
 class ModelWithPrimitiveAdditionalProperties:
     """
     Attributes:
@@ -21,7 +22,7 @@ class ModelWithPrimitiveAdditionalProperties:
     """
 
     a_date_holder: Union[Unset, "ModelWithPrimitiveAdditionalPropertiesADateHolder"] = UNSET
-    additional_properties: Dict[str, str] = field(init=False, factory=dict)
+    additional_properties: Dict[str, str] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_date_holder: Union[Unset, Dict[str, Any]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py
index 520b243ad..20afb41d6 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_primitive_additional_properties_a_date_holder.py
@@ -1,17 +1,18 @@
 import datetime
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 from dateutil.parser import isoparse
 
 T = TypeVar("T", bound="ModelWithPrimitiveAdditionalPropertiesADateHolder")
 
 
-@define
+@_attrs_define
 class ModelWithPrimitiveAdditionalPropertiesADateHolder:
     """ """
 
-    additional_properties: Dict[str, datetime.datetime] = field(init=False, factory=dict)
+    additional_properties: Dict[str, datetime.datetime] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py
index 4513579ed..f54afdee8 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_property_ref.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="ModelWithPropertyRef")
 
 
-@define
+@_attrs_define
 class ModelWithPropertyRef:
     """
     Attributes:
@@ -19,7 +20,7 @@ class ModelWithPropertyRef:
     """
 
     inner: Union[Unset, "ModelName"] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         inner: Union[Unset, Dict[str, Any]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py
index 6b3bb6249..578bca7e0 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="ModelWithRecursiveRef")
 
 
-@define
+@_attrs_define
 class ModelWithRecursiveRef:
     """
     Attributes:
@@ -15,7 +16,7 @@ class ModelWithRecursiveRef:
     """
 
     recursive: Union[Unset, "ModelWithRecursiveRef"] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         recursive: Union[Unset, Dict[str, Any]] = UNSET
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py
index cbe5ca645..ebaca3f31 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_recursive_ref_in_additional_properties.py
@@ -1,15 +1,18 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="ModelWithRecursiveRefInAdditionalProperties")
 
 
-@define
+@_attrs_define
 class ModelWithRecursiveRefInAdditionalProperties:
     """ """
 
-    additional_properties: Dict[str, "ModelWithRecursiveRefInAdditionalProperties"] = field(init=False, factory=dict)
+    additional_properties: Dict[str, "ModelWithRecursiveRefInAdditionalProperties"] = _attrs_field(
+        init=False, factory=dict
+    )
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py
index 40b0575b7..fcaf135b1 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property.py
@@ -1,6 +1,6 @@
 from typing import Any, Dict, Type, TypeVar, Union
 
-from attrs import define
+from attrs import define as _attrs_define
 
 from ..models.an_enum import AnEnum
 from ..models.an_int_enum import AnIntEnum
@@ -9,7 +9,7 @@
 T = TypeVar("T", bound="ModelWithUnionProperty")
 
 
-@define
+@_attrs_define
 class ModelWithUnionProperty:
     """
     Attributes:
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py
index 53ec5d916..d5078ed0d 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined.py
@@ -1,6 +1,6 @@
 from typing import TYPE_CHECKING, Any, Dict, Type, TypeVar, Union
 
-from attrs import define
+from attrs import define as _attrs_define
 
 from ..types import UNSET, Unset
 
@@ -12,7 +12,7 @@
 T = TypeVar("T", bound="ModelWithUnionPropertyInlined")
 
 
-@define
+@_attrs_define
 class ModelWithUnionPropertyInlined:
     """
     Attributes:
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py
index e7cc993bd..b0f25360a 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_0.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="ModelWithUnionPropertyInlinedFruitType0")
 
 
-@define
+@_attrs_define
 class ModelWithUnionPropertyInlinedFruitType0:
     """
     Attributes:
@@ -15,7 +16,7 @@ class ModelWithUnionPropertyInlinedFruitType0:
     """
 
     apples: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         apples = self.apples
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py
index bf616090b..1a32f2445 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/model_with_union_property_inlined_fruit_type_1.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="ModelWithUnionPropertyInlinedFruitType1")
 
 
-@define
+@_attrs_define
 class ModelWithUnionPropertyInlinedFruitType1:
     """
     Attributes:
@@ -15,7 +16,7 @@ class ModelWithUnionPropertyInlinedFruitType1:
     """
 
     bananas: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         bananas = self.bananas
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/none.py b/end_to_end_tests/golden-record/my_test_api_client/models/none.py
index 4bb03e928..724990e3e 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/none.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/none.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="None_")
 
 
-@define
+@_attrs_define
 class None_:
     """ """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_data.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_data.py
index 673a512fe..6ecd3055b 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_data.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_form_data_inline_data.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="PostFormDataInlineData")
 
 
-@define
+@_attrs_define
 class PostFormDataInlineData:
     """
     Attributes:
@@ -17,7 +18,7 @@ class PostFormDataInlineData:
 
     a_required_field: str
     an_optional_field: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_required_field = self.a_required_field
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_json_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_json_body.py
new file mode 100644
index 000000000..fd4aa2de7
--- /dev/null
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_json_body.py
@@ -0,0 +1,66 @@
+from typing import Any, Dict, List, Type, TypeVar, Union
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+from ..types import UNSET, Unset
+
+T = TypeVar("T", bound="PostNamingPropertyConflictWithImportJsonBody")
+
+
+@_attrs_define
+class PostNamingPropertyConflictWithImportJsonBody:
+    """
+    Attributes:
+        field (Union[Unset, str]): A python_name of field should not interfere with attrs field
+        define (Union[Unset, str]): A python_name of define should not interfere with attrs define
+    """
+
+    field: Union[Unset, str] = UNSET
+    define: Union[Unset, str] = UNSET
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+    def to_dict(self) -> Dict[str, Any]:
+        field = self.field
+        define = self.define
+
+        field_dict: Dict[str, Any] = {}
+        field_dict.update(self.additional_properties)
+        field_dict.update({})
+        if field is not UNSET:
+            field_dict["Field"] = field
+        if define is not UNSET:
+            field_dict["Define"] = define
+
+        return field_dict
+
+    @classmethod
+    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
+        d = src_dict.copy()
+        field = d.pop("Field", UNSET)
+
+        define = d.pop("Define", UNSET)
+
+        post_naming_property_conflict_with_import_json_body = cls(
+            field=field,
+            define=define,
+        )
+
+        post_naming_property_conflict_with_import_json_body.additional_properties = d
+        return post_naming_property_conflict_with_import_json_body
+
+    @property
+    def additional_keys(self) -> List[str]:
+        return list(self.additional_properties.keys())
+
+    def __getitem__(self, key: str) -> Any:
+        return self.additional_properties[key]
+
+    def __setitem__(self, key: str, value: Any) -> None:
+        self.additional_properties[key] = value
+
+    def __delitem__(self, key: str) -> None:
+        del self.additional_properties[key]
+
+    def __contains__(self, key: str) -> bool:
+        return key in self.additional_properties
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py
new file mode 100644
index 000000000..d90bb80c7
--- /dev/null
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_naming_property_conflict_with_import_response_200.py
@@ -0,0 +1,66 @@
+from typing import Any, Dict, List, Type, TypeVar, Union
+
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
+
+from ..types import UNSET, Unset
+
+T = TypeVar("T", bound="PostNamingPropertyConflictWithImportResponse200")
+
+
+@_attrs_define
+class PostNamingPropertyConflictWithImportResponse200:
+    """
+    Attributes:
+        field (Union[Unset, str]): A python_name of field should not interfere with attrs field
+        define (Union[Unset, str]): A python_name of define should not interfere with attrs define
+    """
+
+    field: Union[Unset, str] = UNSET
+    define: Union[Unset, str] = UNSET
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
+
+    def to_dict(self) -> Dict[str, Any]:
+        field = self.field
+        define = self.define
+
+        field_dict: Dict[str, Any] = {}
+        field_dict.update(self.additional_properties)
+        field_dict.update({})
+        if field is not UNSET:
+            field_dict["Field"] = field
+        if define is not UNSET:
+            field_dict["Define"] = define
+
+        return field_dict
+
+    @classmethod
+    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
+        d = src_dict.copy()
+        field = d.pop("Field", UNSET)
+
+        define = d.pop("Define", UNSET)
+
+        post_naming_property_conflict_with_import_response_200 = cls(
+            field=field,
+            define=define,
+        )
+
+        post_naming_property_conflict_with_import_response_200.additional_properties = d
+        return post_naming_property_conflict_with_import_response_200
+
+    @property
+    def additional_keys(self) -> List[str]:
+        return list(self.additional_properties.keys())
+
+    def __getitem__(self, key: str) -> Any:
+        return self.additional_properties[key]
+
+    def __setitem__(self, key: str, value: Any) -> None:
+        self.additional_properties[key] = value
+
+    def __delitem__(self, key: str) -> None:
+        del self.additional_properties[key]
+
+    def __contains__(self, key: str) -> bool:
+        return key in self.additional_properties
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py
index f7ffbc177..281906c31 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 if TYPE_CHECKING:
     from ..models.post_responses_unions_simple_before_complex_response_200a_type_1 import (
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="PostResponsesUnionsSimpleBeforeComplexResponse200")
 
 
-@define
+@_attrs_define
 class PostResponsesUnionsSimpleBeforeComplexResponse200:
     """
     Attributes:
@@ -19,7 +20,7 @@ class PostResponsesUnionsSimpleBeforeComplexResponse200:
     """
 
     a: Union["PostResponsesUnionsSimpleBeforeComplexResponse200AType1", str]
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         from ..models.post_responses_unions_simple_before_complex_response_200a_type_1 import (
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a_type_1.py b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a_type_1.py
index 137ef64ff..018926222 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a_type_1.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/post_responses_unions_simple_before_complex_response_200a_type_1.py
@@ -1,15 +1,16 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="PostResponsesUnionsSimpleBeforeComplexResponse200AType1")
 
 
-@define
+@_attrs_define
 class PostResponsesUnionsSimpleBeforeComplexResponse200AType1:
     """ """
 
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         field_dict: Dict[str, Any] = {}
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_json_body.py b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_json_body.py
index fe74d1c3e..bf4c7d023 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_json_body.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_json_body.py
@@ -1,13 +1,13 @@
 from typing import Any, Dict, Type, TypeVar, Union
 
-from attrs import define
+from attrs import define as _attrs_define
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="TestInlineObjectsJsonBody")
 
 
-@define
+@_attrs_define
 class TestInlineObjectsJsonBody:
     """
     Attributes:
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py
index 1ca5a2261..6a0ade77f 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/test_inline_objects_response_200.py
@@ -1,13 +1,13 @@
 from typing import Any, Dict, Type, TypeVar, Union
 
-from attrs import define
+from attrs import define as _attrs_define
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="TestInlineObjectsResponse200")
 
 
-@define
+@_attrs_define
 class TestInlineObjectsResponse200:
     """
     Attributes:
diff --git a/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py b/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py
index f2031eaad..290d84bbb 100644
--- a/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py
+++ b/end_to_end_tests/golden-record/my_test_api_client/models/validation_error.py
@@ -1,11 +1,11 @@
 from typing import Any, Dict, List, Type, TypeVar, cast
 
-from attrs import define
+from attrs import define as _attrs_define
 
 T = TypeVar("T", bound="ValidationError")
 
 
-@define
+@_attrs_define
 class ValidationError:
     """
     Attributes:
diff --git a/end_to_end_tests/openapi.json b/end_to_end_tests/openapi.json
index 1dfeb8322..e57de9dca 100644
--- a/end_to_end_tests/openapi.json
+++ b/end_to_end_tests/openapi.json
@@ -1179,6 +1179,53 @@
         }
       }
     },
+    "/naming/property-conflict-with-import": {
+      "description": "Ensure that property names don't conflict with imports",
+      "post": {
+        "tags": ["naming"],
+        "requestBody": {
+          "content": {
+            "application/json": {
+              "schema": {
+                "type": "object",
+                "properties": {
+                  "Field": {
+                    "type": "string",
+                    "description": "A python_name of field should not interfere with attrs field"
+                  },
+                  "Define": {
+                    "type": "string",
+                    "description": "A python_name of define should not interfere with attrs define"
+                  }
+                }
+              }
+            }
+          }
+        },
+        "responses": {
+          "200": {
+            "description": "Response that contains conflicting properties",
+            "content": {
+              "application/json": {
+                "schema": {
+                  "type": "object",
+                  "properties": {
+                    "Field": {
+                      "type": "string",
+                      "description": "A python_name of field should not interfere with attrs field"
+                    },
+                    "Define": {
+                      "type": "string",
+                      "description": "A python_name of define should not interfere with attrs define"
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+    },
     "/parameter-references/{path_param}": {
       "get": {
         "tags": [
diff --git a/integration-tests/integration_tests/models/post_body_multipart_multipart_data.py b/integration-tests/integration_tests/models/post_body_multipart_multipart_data.py
index 525243447..be94fc27e 100644
--- a/integration-tests/integration_tests/models/post_body_multipart_multipart_data.py
+++ b/integration-tests/integration_tests/models/post_body_multipart_multipart_data.py
@@ -1,14 +1,15 @@
 from io import BytesIO
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, File, Unset
 
 T = TypeVar("T", bound="PostBodyMultipartMultipartData")
 
 
-@define
+@_attrs_define
 class PostBodyMultipartMultipartData:
     """
     Attributes:
@@ -21,7 +22,7 @@ class PostBodyMultipartMultipartData:
     a_string: str
     file: File
     description: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_string = self.a_string
diff --git a/integration-tests/integration_tests/models/post_body_multipart_response_200.py b/integration-tests/integration_tests/models/post_body_multipart_response_200.py
index a29d7161d..b1ca022db 100644
--- a/integration-tests/integration_tests/models/post_body_multipart_response_200.py
+++ b/integration-tests/integration_tests/models/post_body_multipart_response_200.py
@@ -1,11 +1,12 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="PostBodyMultipartResponse200")
 
 
-@define
+@_attrs_define
 class PostBodyMultipartResponse200:
     """
     Attributes:
@@ -21,7 +22,7 @@ class PostBodyMultipartResponse200:
     description: str
     file_name: str
     file_content_type: str
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         a_string = self.a_string
diff --git a/integration-tests/integration_tests/models/post_parameters_header_response_200.py b/integration-tests/integration_tests/models/post_parameters_header_response_200.py
index ead8eae42..cc633bc4a 100644
--- a/integration-tests/integration_tests/models/post_parameters_header_response_200.py
+++ b/integration-tests/integration_tests/models/post_parameters_header_response_200.py
@@ -1,11 +1,12 @@
 from typing import Any, Dict, List, Type, TypeVar
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 T = TypeVar("T", bound="PostParametersHeaderResponse200")
 
 
-@define
+@_attrs_define
 class PostParametersHeaderResponse200:
     """
     Attributes:
@@ -19,7 +20,7 @@ class PostParametersHeaderResponse200:
     string: str
     number: float
     integer: int
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         boolean = self.boolean
diff --git a/integration-tests/integration_tests/models/problem.py b/integration-tests/integration_tests/models/problem.py
index ad33a5f66..3b5f102cd 100644
--- a/integration-tests/integration_tests/models/problem.py
+++ b/integration-tests/integration_tests/models/problem.py
@@ -1,13 +1,14 @@
 from typing import Any, Dict, List, Type, TypeVar, Union
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
 T = TypeVar("T", bound="Problem")
 
 
-@define
+@_attrs_define
 class Problem:
     """
     Attributes:
@@ -17,7 +18,7 @@ class Problem:
 
     parameter_name: Union[Unset, str] = UNSET
     description: Union[Unset, str] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         parameter_name = self.parameter_name
diff --git a/integration-tests/integration_tests/models/public_error.py b/integration-tests/integration_tests/models/public_error.py
index a79d3c025..74e3fc67c 100644
--- a/integration-tests/integration_tests/models/public_error.py
+++ b/integration-tests/integration_tests/models/public_error.py
@@ -1,6 +1,7 @@
 from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
 
-from attrs import define, field
+from attrs import define as _attrs_define
+from attrs import field as _attrs_field
 
 from ..types import UNSET, Unset
 
@@ -11,7 +12,7 @@
 T = TypeVar("T", bound="PublicError")
 
 
-@define
+@_attrs_define
 class PublicError:
     """
     Attributes:
@@ -25,7 +26,7 @@ class PublicError:
     extra_parameters: Union[Unset, List[str]] = UNSET
     invalid_parameters: Union[Unset, List["Problem"]] = UNSET
     missing_parameters: Union[Unset, List[str]] = UNSET
-    additional_properties: Dict[str, Any] = field(init=False, factory=dict)
+    additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
 
     def to_dict(self) -> Dict[str, Any]:
         errors: Union[Unset, List[str]] = UNSET