Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Alias Import #20

5 changes: 5 additions & 0 deletions lib/metamodel.cto
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ concept LongDomainValidator {
o Long upper optional
}

concept AliasType{
salujajaskeerat marked this conversation as resolved.
Show resolved Hide resolved
o String name
o String aliasName
}
abstract concept Import {
o String namespace
o String uri optional
Expand All @@ -222,6 +226,7 @@ concept ImportType extends Import {

concept ImportTypes extends Import {
o String[] types
o AliasType[] aliasedTypes optional
}

concept Model {
Expand Down
30 changes: 30 additions & 0 deletions lib/metamodel.json
Original file line number Diff line number Diff line change
Expand Up @@ -997,6 +997,25 @@
}
]
},
{
"$class":"concerto.metamodel@1.0.0.ConceptDeclaration",
"name":"AliasType",
"isAbstract":false,
"properties":[
{
"$class": "concerto.metamodel@1.0.0.StringProperty",
"name": "name",
"isArray": false,
"isOptional": false
},
{
"$class": "concerto.metamodel@1.0.0.StringProperty",
"name": "aliasName",
"isArray": false,
"isOptional": false
}
]
},
{
"$class": "concerto.metamodel@1.0.0.ConceptDeclaration",
"name": "Import",
Expand Down Expand Up @@ -1053,13 +1072,24 @@
"name": "types",
"isArray": true,
"isOptional": false
},
{
"$class": "concerto.metamodel@1.0.0.ObjectProperty",
"name": "aliasedTypes",
"type": {
"$class": "concerto.metamodel@1.0.0.TypeIdentifier",
"name": "AliasType"
},
"isArray": true,
"isOptional": true
}
],
"superType": {
"$class": "concerto.metamodel@1.0.0.TypeIdentifier",
"name": "Import"
}
},

{
"$class": "concerto.metamodel@1.0.0.ConceptDeclaration",
"name": "Model",
Expand Down