-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1174 from atlanhq/FT-858
Fixes typedef toolkit to generate appropriate AttributeDefs on RelationshipDefs
- Loading branch information
Showing
4 changed files
with
85 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* SPDX-License-Identifier: Apache-2.0 | ||
Copyright 2024 Atlan Pte. Ltd. */ | ||
amends "modulepath:/Model.pkl" | ||
|
||
t = "Custom" | ||
a = t.decapitalize() | ||
|
||
shared { | ||
supertypeDefinition { | ||
name = t | ||
description = "Base class for all \(t) types." | ||
superTypes { "Catalog" } | ||
attributes {} | ||
} | ||
} | ||
|
||
customTypes { | ||
["\(t)Entity"] { | ||
label = "Custom" | ||
icon = entityIcon | ||
description = "Instances of \(t)Entity in Atlan." | ||
relationships { | ||
["\(a)EntityAggregation"] { | ||
description = "Containment relationship between two custom entities." | ||
parent { | ||
type = "\(t)Entity" | ||
attribute = "\(a)ChildEntities" | ||
description = "Custom entities contained within this entity." | ||
} | ||
children { | ||
type = "\(t)Entity" | ||
attribute = "\(a)ParentEntity" | ||
description = "Custom entity that contains this entity." | ||
} | ||
relationshipAttributes { | ||
["\(a)EntityChildrenLabel"] { | ||
type = "string" | ||
description = "Name for the relationship when referring from the parent entity to its children entities." | ||
} | ||
["\(a)EntityParentLabel"] { | ||
type = "string" | ||
description = "Name for the relationship when referring from a child entity to its parent entity." | ||
} | ||
} | ||
} | ||
["\(a)EntityAssociation"] { | ||
description = "Inter-relationship between two custom assets." | ||
peers { | ||
new { | ||
type = "\(t)Entity" | ||
attribute = "\(a)RelatedToEntities" | ||
description = "Target custom entity indicating where the relationship is directed." | ||
} | ||
new { | ||
type = "\(t)Entity" | ||
attribute = "\(a)RelatedFromEntities" | ||
description = "Source custom entity indicating where the relationship originates." | ||
} | ||
} | ||
relationshipAttributes { | ||
["\(a)EntityToLabel"] { | ||
type = "string" | ||
description = "Name for the relationship when referring from endDef1 entity to endDef2 entity." | ||
} | ||
["\(a)EntityFromLabel"] { | ||
type = "string" | ||
description = "Name for the relationship when referring from endDef2 entity to endDef1 entity." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
local entityIcon = new Icon { | ||
name = "EntityGray" | ||
nameActive = "Entity" | ||
svg = "entity-gray.svg" | ||
svgActive = "entity.svg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters