acoustic-carpenter-78188
02/14/2026, 2:31 AMgenerate_attribute_list_from_dataclass_json_mixin(), when a $ref resolves to an enum definition (has enum key, no properties), map the field to str instead of trying to construct a dataclass from it. Previously this crashed with KeyError: 'properties' because the code assumed every $ref pointed to a model.
## How was this patch tested?
Test (test_enum_in_pydantic.py): Defines a Job(BaseModel) with a Status(str, Enum) field, roundtrips it through to_literal_type -> to_literal -> to_python_value -> guess_python_type, and verifies the guessed dataclass accepts enum values as strings.
### Setup process
### Screenshots
## Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
## Related PRs
## Docs link
flyteorg/flytekitacoustic-carpenter-78188
02/18/2026, 5:36 AM