Skip to content

Commit 3346805

Browse files
committed
fix: relax AttributeDef.default_value and index_type_es_fields to Any
Atlas API responses can return non-string scalars for these fields: - default_value: native bool/int (e.g. false, 0) where str was expected - index_type_es_fields values: int (e.g. {"ignore_above": 256}) where str was expected msgspec strict=False does not coerce int/bool -> str, causing ValidationError on live typedef responses. Widening to Any lets the decoder accept whatever the API returns without pre-decode traversal.
1 parent 95b1974 commit 3346805

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pyatlan_v9/model/typedef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ def creator(
627627
description: Union[str, None, msgspec.UnsetType] = msgspec.UNSET
628628
"""Description of the attribute definition."""
629629

630-
default_value: Union[str, None, msgspec.UnsetType] = msgspec.UNSET
630+
default_value: Union[Any, None, msgspec.UnsetType] = msgspec.UNSET
631631
"""Default value for this attribute (if any)."""
632632

633633
display_name: Union[str, None, msgspec.UnsetType] = msgspec.UNSET
@@ -674,7 +674,7 @@ def creator(
674674
)
675675
"""Internal use only."""
676676

677-
index_type_es_fields: Union[Dict[str, Dict[str, str]], None, msgspec.UnsetType] = (
677+
index_type_es_fields: Union[Dict[str, Dict[str, Any]], None, msgspec.UnsetType] = (
678678
msgspec.field(default=msgspec.UNSET, name="indexTypeESFields")
679679
)
680680
"""Internal use only."""

0 commit comments

Comments
 (0)