Skip to content

Commit

Permalink
Merge pull request #437 from atlanhq/FT-838
Browse files Browse the repository at this point in the history
FT-838: Fix generator to correctly handle the DOMAIN_GUIDS keyword field
  • Loading branch information
Aryamanz29 authored Dec 6, 2024
2 parents 1f0ce43 + 8c1a585 commit ac704ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyatlan/generator/class_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def get_mapped_type(type_name: str) -> MappedType:


def get_class_var_for_attr(attr_name: str) -> str:
attr_name = re.sub(r"GUIDs$", "Guids", attr_name)
replace1 = re.sub(r"([A-Z]+)([A-Z][a-z])", r"\1_\2", attr_name.replace("_", ""))
replace2 = re.sub(r"([a-z])([A-Z])", r"\1_\2", replace1)
return replace2.upper()
Expand Down
2 changes: 1 addition & 1 deletion pyatlan/model/assets/business_policy_incident.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __setattr__(self, name, value):
"""
count of noncompliant assets in the incident
"""
BUSINESS_POLICY_INCIDENT_RELATED_POLICY_GUI_DS: ClassVar[KeywordField] = (
BUSINESS_POLICY_INCIDENT_RELATED_POLICY_GUIDS: ClassVar[KeywordField] = (
KeywordField(
"businessPolicyIncidentRelatedPolicyGUIDs",
"businessPolicyIncidentRelatedPolicyGUIDs",
Expand Down
6 changes: 3 additions & 3 deletions pyatlan/model/assets/core/asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ def __setattr__(self, name, value):
"""
Whether this asset has contract (true) or not (false).
"""
ASSET_POLICY_GUI_DS: ClassVar[KeywordField] = KeywordField(
ASSET_POLICY_GUIDS: ClassVar[KeywordField] = KeywordField(
"assetPolicyGUIDs", "assetPolicyGUIDs"
)
"""
Expand All @@ -1073,11 +1073,11 @@ def __setattr__(self, name, value):
"""
Count of policies inside the asset
"""
DOMAIN_GUI_DS: ClassVar[KeywordField] = KeywordField("domainGUIDs", "domainGUIDs")
DOMAIN_GUIDS: ClassVar[KeywordField] = KeywordField("domainGUIDs", "domainGUIDs")
"""
Array of domain guids linked to this asset
"""
NON_COMPLIANT_ASSET_POLICY_GUI_DS: ClassVar[KeywordField] = KeywordField(
NON_COMPLIANT_ASSET_POLICY_GUIDS: ClassVar[KeywordField] = KeywordField(
"nonCompliantAssetPolicyGUIDs", "nonCompliantAssetPolicyGUIDs"
)
"""
Expand Down
1 change: 1 addition & 0 deletions pyatlan/model/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -2545,6 +2545,7 @@ class DataProductStatus(str, Enum):
ACTIVE = "Active"
SUNSET = "Sunset"
ARCHIVED = "Archived"
DRAFT = "Draft"


class DataProductVisibility(str, Enum):
Expand Down

0 comments on commit ac704ea

Please sign in to comment.